Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647719
| From | Corentin Labbe <clabbe.montjoie@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 4/4] net-next: stmmac: rework the speed selection |
| Date | 2017-05-23 09:20 +0200 |
| Message-ID | <tKcgP-8mw-35@gated-at.bofh.it> (permalink) |
| References | <tJUMV-5Hr-3@gated-at.bofh.it> <tJUMW-5Hr-7@gated-at.bofh.it> <tK0yZ-NW-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 22, 2017 at 02:49:44PM -0400, David Miller wrote: > From: Corentin Labbe <clabbe.montjoie@gmail.com> > Date: Mon, 22 May 2017 14:33:47 +0200 > > > - mac->link.port = GMAC_CONTROL_PS; > > mac->link.duplex = GMAC_CONTROL_DM; > > - mac->link.speed = GMAC_CONTROL_FES; > > + mac->link.speed10 = GMAC_CONTROL_PS; > > + mac->link.speed100 = GMAC_CONTROL_PS | GMAC_CONTROL_FES; > > + mac->link.speed1000 = 0; > > + mac->link.speed_mask = GENMASK(15, 14); > > Neither GMAC_CONTROL_PS nor GMAC_CONTROL_FES are defined with > the GENMASK() macro. So it is very confusing to see constant > bit specifications here in C code. > > There are two ways to do this properly: > > 1) Use "(GMAC_CONTROL_PS | GMAC_CONTROL_FES)" > > 2) Define a new GMAC_CONTROL_SPDMASK to "GMAC_CONTROL_PS | GMAC_CONTROL_FES" > and use that here. > Since dwmac100 use the #1, I will do the same on dwmac4/dwmac1000 Thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 4/4] net-next: stmmac: rework the speed selection Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-22 14:40 +0200
Re: [PATCH v2 4/4] net-next: stmmac: rework the speed selection David Miller <davem@davemloft.net> - 2017-05-22 20:50 +0200
Re: [PATCH v2 4/4] net-next: stmmac: rework the speed selection Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-23 09:20 +0200
csiph-web