[lkml]   [2000]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[Q] net_device methods and disable_irq interaction (SMP&UP)
Can spin_lock_irqsave and the disable_irq & spin_lock combinations be
safely mixed, particularly with regards to the networking layer? This does
not seem to be done anywhere in the kernel so I suspect that I'm trying
to do something wrong/bogus ...

More specifically, I have a card that requires lengthy reconfiguration
sequences during its normal operation. This card is an old, very slow ISA
card. For most of the driver I'd like to use spin_*lock_irq*. During the
long reconfiguration sequences I'd like to do (allowing servicing of other
interrupts, particularly on UP):


/* ... hardware reconfig (critical section) ... */


where the following is used elsewhere:

unsigned long flags;

spin_lock_irqsave (&driver_lock, flags);

/* ... hardware stuff (critical section) ... */

spin_unlock_irqrestore (&driver_lock, flags);

Since this driver is a network driver, the spin_lock in the first fragment
would be to prevent unsafe interaction with the network layer (via the
net_device methods).

Would this work or have I missed something? What would be the best
why to handle this situation (i.e. very slow ISA card, long port
access sequences, 2.4.x, SMP & UP)?

-- Hans

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.050 / U:3.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site