On 2014-05-06 at 16:56:06 +0200, Tobias Klauser <tklau...@distanz.ch> wrote:
> On 2014-05-05 at 21:10:45 +0200, Darek Marcinkiewicz <rek...@newterm.pl> 
> wrote:
> > 
> > This driver adds support for EtherCAT master module located on CCAT
> > FPGA found on Beckhoff CX series industrial PCs. The driver exposes
> > EtherCAT master as an ethernet interface.
> > 
> > EtherCAT is a fieldbus protocol defined on top of ethernet and Beckhoff
> > CX5020 PCs come with built-in EtherCAT master module located on a FPGA,
> > which in turn is connected to a PCI bus.
> > 
> > Signed-off-by: Dariusz Marcinkiewicz <rek...@newterm.pl>
> > ---
> > 
> > Changes from v7:
> >   * added 'depends on PCI' to the driver's Kconfig entry
> > 
> > Changes from v6:
> >   * added memory barriers to avoid race between timer handler and xmit 
> > routine 
> >   * includes formatting/indeting changes from Francois Romieu
> > 
> > Changes from v5:
> >   * removal of needless locking on tx path
> >   * driver makes actual use of tx fifo
> >   * driver uses descriptors' array instead of descriptor list
> > 
> > Changes from v4: 
> >   * incorporates Francois Romieu comments
> >   * fixes typo spotted by Jesper Brouer
> > 
> > Changes from v3:
> >   * some clarificatoins around buffer allocations
> > 
> > Changes from v2:
> >   * removed all checkpatch warnings
> >   * driver makes use of device rx fifo
> > 
> > Changes from v1:
> >   * added endianess annotation to descriptors' structures
> >   * killed checkpath warnings about string literals being split into 
> > multiple
> >     lines
> > 
> >  drivers/net/ethernet/Kconfig  |   12 +
> >  drivers/net/ethernet/Makefile |    1 +
> >  drivers/net/ethernet/ec_bhf.c |  705 
> > +++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 718 insertions(+)
> >  create mode 100644 drivers/net/ethernet/ec_bhf.c
> 
> [...]
> 
> > +struct ec_bhf_priv {
> > +   struct net_device *net_dev;
> > +
> > +   struct pci_dev *dev;
> > +
> > +   void * __iomem io;
> > +   void * __iomem dma_io;
> > +
> > +   struct hrtimer hrtimer;
> > +
> > +   int tx_dma_chan;
> > +   int rx_dma_chan;
> > +   void * __iomem ec_io;
> > +   void * __iomem fifo_io;
> > +   void * __iomem mii_io;
> > +   void * __iomem mac_io;
> > +
> > +   struct bhf_dma rx_buf;
> > +   struct rx_desc *rx_descs;
> > +   int rx_dnext;
> > +   int rx_dcount;
> > +
> > +   struct bhf_dma tx_buf;
> > +   struct tx_desc *tx_descs;
> > +   int tx_dcount;
> > +   int tx_dnext;
> > +
> > +   u64 stat_rx_bytes;
> > +   u64 stat_tx_bytes;
> 
> netdev->stats already provides {rx,tx}_bytes members, so you can get rid
> of these two.

Actually, no. The net_device_stats members are unsigned long, so your
solution is fine. Please disregard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to