Re: [PATCH 2.6.0-test4][NET] ni5010.c: remove cli/sti

Manfred Spraul
2003-08-24T16:32:27Z

Vinay wrote:

>drivers/net/ni5010.c:
>This patch replaces cli/sti with spinlocks. Compiles fine though
>untested.
>
>
I don't have the hardware either, but the patch seems to be wrong:
The cli() call was in hardware_send_packet(). I assume that this
function should be synchronized against concurrent interrupts - both
functions access the hardware. Due to the dev_xmit_lock, the networking
core already guarantees that hardware_send_packet is never reentered.
cli() provided protection against concurrent interrupts on other cpus,
spin_lock_irqsave() doesn't.

Could you add a spin_lock()/spin_unlock() into ni5010_interrupt?

--
Manfred