RE: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-20 Thread David Laight
From: Stephen Hemminger ... > On Sat, 17 Oct 2015 00:21:44 -0400 > Michael Chan wrote: > > > +static bool bnxt_vf_pciid(int idx) > > +{ > > + if (idx == BCM57304_VF || idx == BCM57404_VF) > > + return true; > > + return false; > > +} > > + > > I prefer just

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-20 Thread John W. Linville
On Sat, Oct 17, 2015 at 12:21:44AM -0400, Michael Chan wrote: > Broadcom ethernet driver for the new family of NetXtreme-C/E > ethernet devices. > > v3: > - Fixed 2 more sparse warnings. > - Removed some unused structures in .h files. > > v2: > - Fixed all kbuild test robot reported

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-20 Thread John W. Linville
On Sat, Oct 17, 2015 at 12:21:44AM -0400, Michael Chan wrote: > Broadcom ethernet driver for the new family of NetXtreme-C/E > ethernet devices. > > v3: > - Fixed 2 more sparse warnings. > - Removed some unused structures in .h files. > > v2: > - Fixed all kbuild test robot reported

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-20 Thread John W. Linville
On Sat, Oct 17, 2015 at 12:21:44AM -0400, Michael Chan wrote: > Broadcom ethernet driver for the new family of NetXtreme-C/E > ethernet devices. > > v3: > - Fixed 2 more sparse warnings. > - Removed some unused structures in .h files. > > v2: > - Fixed all kbuild test robot reported

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-19 Thread Michael Chan
On Sun, 2015-10-18 at 22:19 -0700, Stephen Hemminger wrote: > On Sat, 17 Oct 2015 00:21:44 -0400 > Michael Chan wrote: > > > +static bool bnxt_vf_pciid(int idx) > > +{ > > + if (idx == BCM57304_VF || idx == BCM57404_VF) > > + return true; > > + return false; >

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-19 Thread Michael Chan
On Sun, 2015-10-18 at 22:21 -0700, Stephen Hemminger wrote: > On Sat, 17 Oct 2015 00:21:44 -0400 > Michael Chan wrote: > > > +static inline u32 bnxt_tx_avail(struct bnxt *bp, struct bnxt_tx_ring_info > > *txr) > > +{ > > + /* Tell compiler to fetch tx indices from memory.

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-18 Thread Stephen Hemminger
On Sat, 17 Oct 2015 00:21:44 -0400 Michael Chan wrote: > +/* indexed by enum above */ > +static struct { > + char *name; > +} board_info[] = { > + { "Broadcom BCM57302 NetXtreme-C Single-port 10Gb/25Gb/40Gb/50Gb > Ethernet" }, > + { "Broadcom BCM57304 NetXtreme-C

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-18 Thread Stephen Hemminger
On Sat, 17 Oct 2015 00:21:44 -0400 Michael Chan wrote: > +static bool bnxt_vf_pciid(int idx) > +{ > + if (idx == BCM57304_VF || idx == BCM57404_VF) > + return true; > + return false; > +} > + I prefer just returning result of logical operation rather than

Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

2015-10-18 Thread Stephen Hemminger
On Sat, 17 Oct 2015 00:21:44 -0400 Michael Chan wrote: > +static inline u32 bnxt_tx_avail(struct bnxt *bp, struct bnxt_tx_ring_info > *txr) > +{ > + /* Tell compiler to fetch tx indices from memory. */ > + barrier(); Actually, you are telling compiler not to