diff options
author | Mark Brown <broonie@sirena.org.uk> | 2008-01-27 08:58:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-03 07:28:42 -0500 |
commit | 6344f0521aac9f93c312826216762f2185268390 (patch) | |
tree | 984ded12f15cb5ce71376ba6c6be3e72d3002427 /drivers/net/natsemi.c | |
parent | 35b5f6b1a82b5c586e0b24c711dc6ba944e88ef1 (diff) |
natsemi: Update locking documentation
The documentation regarding synchronisation at the head of the natsemi
driver was badly bitrotted so replace it with a general statement about
the techniques used which is less likely to bitrot.
Also remove the note saying these chips are uncommon - it makes little
difference but they were used in a number of laptops and at least one mass
market PCI ethernet card.
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/natsemi.c')
-rw-r--r-- | drivers/net/natsemi.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index c329a4f5840c..0a3e60418e53 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -203,22 +203,8 @@ skbuff at an offset of "+2", 16-byte aligning the IP header. | |||
203 | IIId. Synchronization | 203 | IIId. Synchronization |
204 | 204 | ||
205 | Most operations are synchronized on the np->lock irq spinlock, except the | 205 | Most operations are synchronized on the np->lock irq spinlock, except the |
206 | performance critical codepaths: | 206 | recieve and transmit paths which are synchronised using a combination of |
207 | 207 | hardware descriptor ownership, disabling interrupts and NAPI poll scheduling. | |
208 | The rx process only runs in the interrupt handler. Access from outside | ||
209 | the interrupt handler is only permitted after disable_irq(). | ||
210 | |||
211 | The rx process usually runs under the netif_tx_lock. If np->intr_tx_reap | ||
212 | is set, then access is permitted under spin_lock_irq(&np->lock). | ||
213 | |||
214 | Thus configuration functions that want to access everything must call | ||
215 | disable_irq(dev->irq); | ||
216 | netif_tx_lock_bh(dev); | ||
217 | spin_lock_irq(&np->lock); | ||
218 | |||
219 | IV. Notes | ||
220 | |||
221 | NatSemi PCI network controllers are very uncommon. | ||
222 | 208 | ||
223 | IVb. References | 209 | IVb. References |
224 | 210 | ||