X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fgianfar.h;h=d37d5401be6ece4fb506527cb7104956b0723f50;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=127c98cf33362b199c51c4a470f3a488ccdcdf28;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 127c98cf3..d37d5401b 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h @@ -656,62 +656,43 @@ struct gfar { * the buffer descriptor determines the actual condition. */ struct gfar_private { - /* Fields controlled by TX lock */ - spinlock_t txlock; - - /* Pointer to the array of skbuffs */ + /* pointers to arrays of skbuffs for tx and rx */ struct sk_buff ** tx_skbuff; + struct sk_buff ** rx_skbuff; - /* next free skb in the array */ + /* indices pointing to the next free sbk in skb arrays */ u16 skb_curtx; + u16 skb_currx; - /* First skb in line to be transmitted */ + /* index of the first skb which hasn't been transmitted + * yet. */ u16 skb_dirtytx; /* Configuration info for the coalescing features */ unsigned char txcoalescing; unsigned short txcount; unsigned short txtime; - - /* Buffer descriptor pointers */ - struct txbd8 *tx_bd_base; /* First tx buffer descriptor */ - struct txbd8 *cur_tx; /* Next free ring entry */ - struct txbd8 *dirty_tx; /* First buffer in line - to be transmitted */ - unsigned int tx_ring_size; - - /* RX Locked fields */ - spinlock_t rxlock; - - /* skb array and index */ - struct sk_buff ** rx_skbuff; - u16 skb_currx; - - /* RX Coalescing values */ unsigned char rxcoalescing; unsigned short rxcount; unsigned short rxtime; - struct rxbd8 *rx_bd_base; /* First Rx buffers */ + /* GFAR addresses */ + struct rxbd8 *rx_bd_base; /* Base addresses of Rx and Tx Buffers */ + struct txbd8 *tx_bd_base; struct rxbd8 *cur_rx; /* Next free rx ring entry */ - - /* RX parameters */ - unsigned int rx_ring_size; + struct txbd8 *cur_tx; /* Next free ring entry */ + struct txbd8 *dirty_tx; /* The Ring entry to be freed. */ + struct gfar __iomem *regs; /* Pointer to the GFAR memory mapped Registers */ + u32 __iomem *hash_regs[16]; + int hash_width; + struct net_device_stats stats; /* linux network statistics */ + struct gfar_extra_stats extra_stats; + spinlock_t lock; unsigned int rx_buffer_size; unsigned int rx_stash_size; unsigned int rx_stash_index; - - struct vlan_group *vlgrp; - - /* Unprotected fields */ - /* Pointer to the GFAR memory mapped Registers */ - struct gfar __iomem *regs; - - /* Hash registers and their width */ - u32 __iomem *hash_regs[16]; - int hash_width; - - /* global parameters */ + unsigned int tx_ring_size; + unsigned int rx_ring_size; unsigned int fifo_threshold; unsigned int fifo_starve; unsigned int fifo_starve_off; @@ -721,15 +702,13 @@ struct gfar_private { extended_hash:1, bd_stash_en:1; unsigned short padding; - + struct vlan_group *vlgrp; + /* Info structure initialized by board setup code */ unsigned int interruptTransmit; unsigned int interruptReceive; unsigned int interruptError; - - /* info structure initialized by platform code */ struct gianfar_platform_data *einfo; - /* PHY stuff */ struct phy_device *phydev; struct mii_bus *mii_bus; int oldspeed; @@ -737,10 +716,6 @@ struct gfar_private { int oldlink; uint32_t msg_enable; - - /* Network Statistics */ - struct net_device_stats stats; - struct gfar_extra_stats extra_stats; }; static inline u32 gfar_read(volatile unsigned __iomem *addr)