aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/via-rhine.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-12-08 04:14:16 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-08 04:14:16 -0500
commitb74ca3a896b9ab5f952bc440154758e708c48884 (patch)
treecc67fc67ddd6ac20e25b1060ab633a4d5c4e6ee8 /drivers/net/via-rhine.c
parent5a001a070e032bea1be563b13ebf9819cd5e54d4 (diff)
netdevice: Kill netdev->priv
This is the last shoot of this series. After I removing all directly reference of netdev->priv, I am killing "priv" of "struct net_device" and fixing relative comments/docs. Anyone will not be allowed to reference netdev->priv directly. If you want to reference the memory of private data, use netdev_priv() instead. If the private data is not allocted when alloc_netdev(), use netdev->ml_priv to point that memory after you creating that private data. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/via-rhine.c')
-rw-r--r--drivers/net/via-rhine.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 93b74b7b7077..8d405c83df8b 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -191,12 +191,13 @@ IIId. Synchronization
191 191
192The driver runs as two independent, single-threaded flows of control. One 192The driver runs as two independent, single-threaded flows of control. One
193is the send-packet routine, which enforces single-threaded use by the 193is the send-packet routine, which enforces single-threaded use by the
194dev->priv->lock spinlock. The other thread is the interrupt handler, which 194netdev_priv(dev)->lock spinlock. The other thread is the interrupt handler,
195is single threaded by the hardware and interrupt handling software. 195which is single threaded by the hardware and interrupt handling software.
196 196
197The send packet thread has partial control over the Tx ring. It locks the 197The send packet thread has partial control over the Tx ring. It locks the
198dev->priv->lock whenever it's queuing a Tx packet. If the next slot in the ring 198netdev_priv(dev)->lock whenever it's queuing a Tx packet. If the next slot in
199is not available it stops the transmit queue by calling netif_stop_queue. 199the ring is not available it stops the transmit queue by
200calling netif_stop_queue.
200 201
201The interrupt handler has exclusive control over the Rx ring and records stats 202The interrupt handler has exclusive control over the Rx ring and records stats
202from the Tx ring. After reaping the stats, it marks the Tx queue entry as 203from the Tx ring. After reaping the stats, it marks the Tx queue entry as