diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-12-08 04:14:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-08 04:14:16 -0500 |
commit | b74ca3a896b9ab5f952bc440154758e708c48884 (patch) | |
tree | cc67fc67ddd6ac20e25b1060ab633a4d5c4e6ee8 /drivers/net/via-rhine.c | |
parent | 5a001a070e032bea1be563b13ebf9819cd5e54d4 (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.c | 9 |
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 | ||
192 | The driver runs as two independent, single-threaded flows of control. One | 192 | The driver runs as two independent, single-threaded flows of control. One |
193 | is the send-packet routine, which enforces single-threaded use by the | 193 | is the send-packet routine, which enforces single-threaded use by the |
194 | dev->priv->lock spinlock. The other thread is the interrupt handler, which | 194 | netdev_priv(dev)->lock spinlock. The other thread is the interrupt handler, |
195 | is single threaded by the hardware and interrupt handling software. | 195 | which is single threaded by the hardware and interrupt handling software. |
196 | 196 | ||
197 | The send packet thread has partial control over the Tx ring. It locks the | 197 | The send packet thread has partial control over the Tx ring. It locks the |
198 | dev->priv->lock whenever it's queuing a Tx packet. If the next slot in the ring | 198 | netdev_priv(dev)->lock whenever it's queuing a Tx packet. If the next slot in |
199 | is not available it stops the transmit queue by calling netif_stop_queue. | 199 | the ring is not available it stops the transmit queue by |
200 | calling netif_stop_queue. | ||
200 | 201 | ||
201 | The interrupt handler has exclusive control over the Rx ring and records stats | 202 | The interrupt handler has exclusive control over the Rx ring and records stats |
202 | from the Tx ring. After reaping the stats, it marks the Tx queue entry as | 203 | from the Tx ring. After reaping the stats, it marks the Tx queue entry as |