linux/drivers/net/irda
Herbert Xu 932ff279a4 [NET]: Add netif_tx_lock
Various drivers use xmit_lock internally to synchronise with their
transmission routines.  They do so without setting xmit_lock_owner.
This is fine as long as netpoll is not in use.

With netpoll it is possible for deadlocks to occur if xmit_lock_owner
isn't set.  This is because if a printk occurs while xmit_lock is held
and xmit_lock_owner is not set can cause netpoll to attempt to take
xmit_lock recursively.

While it is possible to resolve this by getting netpoll to use
trylock, it is suboptimal because netpoll's sole objective is to
maximise the chance of getting the printk out on the wire.  So
delaying or dropping the message is to be avoided as much as possible.

So the only alternative is to always set xmit_lock_owner.  The
following patch does this by introducing the netif_tx_lock family of
functions that take care of setting/unsetting xmit_lock_owner.

I renamed xmit_lock to _xmit_lock to indicate that it should not be
used directly.  I didn't provide irq versions of the netif_tx_lock
functions since xmit_lock is meant to be a BH-disabling lock.

This is pretty much a straight text substitution except for a small
bug fix in winbond.  It currently uses
netif_stop_queue/spin_unlock_wait to stop transmission.  This is
unsafe as an IRQ can potentially wake up the queue.  So it is safer to
use netif_tx_disable.

The hamradio bits used spin_lock_irq but it is unnecessary as
xmit_lock must never be taken in an IRQ handler.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-17 21:30:14 -07:00
..
Kconfig [IRDA]: Initial support for MCS7780 based dongles 2006-06-17 21:26:18 -07:00
Makefile [IRDA]: Initial support for MCS7780 based dongles 2006-06-17 21:26:18 -07:00
act200l-sir.c
act200l.c
actisys-sir.c
actisys.c
ali-ircc.c [IRDA]: ali-ircc: using device model power management 2006-06-17 21:26:22 -07:00
ali-ircc.h
au1k_ir.c
au1000_ircc.h
donauboe.c [IRDA]: pci_register_driver conversion 2006-03-20 19:00:27 -08:00
donauboe.h
ep7211_ir.c [IRDA]: sti/cli removal from EP7211 IrDA driver 2006-03-20 19:00:04 -08:00
esi-sir.c
esi.c
girbil-sir.c
girbil.c
irda-usb.c [IRDA] irda-usb: use NULL instead of 0 2006-05-06 18:34:10 -07:00
irda-usb.h [IRDA]: Support for Sigmatel STIR421x chip 2006-04-09 22:25:31 -07:00
irport.c [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00
irport.h
irtty-sir.c [IRDA] sem2mutex: drivers/net/irda 2006-03-20 22:32:53 -08:00
irtty-sir.h
litelink-sir.c
litelink.c
ma600-sir.c
ma600.c
mcp2120-sir.c
mcp2120.c
mcs7780.c [IRDA]: Initial support for MCS7780 based dongles 2006-06-17 21:26:18 -07:00
mcs7780.h [IRDA]: Initial support for MCS7780 based dongles 2006-06-17 21:26:18 -07:00
nsc-ircc.c [PATCH] Typo fixes 2006-03-28 09:16:08 -08:00
nsc-ircc.h [IRDA]: nsc-ircc: PM update 2006-03-20 18:59:05 -08:00
old_belkin-sir.c
old_belkin.c
pxaficp_ir.c Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
sa1100_ir.c BUG_ON() Conversion in drivers/net/ 2006-04-02 13:52:48 +02:00
sir-dev.h [IRDA]: Switching to a workqueue for the SIR work 2006-05-09 15:27:04 -07:00
sir_dev.c [IRDA]: Switching to a workqueue for the SIR work 2006-05-09 15:27:04 -07:00
sir_dongle.c [IRDA] sem2mutex: drivers/net/irda 2006-03-20 22:32:53 -08:00
smsc-ircc2.c [IRDA]: smsc-ircc: Minimal hotplug support. 2006-05-09 15:26:11 -07:00
smsc-ircc2.h [PATCH] smsc-ircc2: whitespace fixes 2005-09-07 16:57:57 -07:00
smsc-sio.h
stir4200.c [IRDA]: stir4200, switching to the kthread API 2006-06-17 21:26:20 -07:00
tekram-sir.c
tekram.c
toim3232-sir.c [IRDA]: remove MODULE_PARM() 2006-03-20 22:33:41 -08:00
via-ircc.c
via-ircc.h
vlsi_ir.c [NET]: Add netif_tx_lock 2006-06-17 21:30:14 -07:00
vlsi_ir.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
w83977af.h
w83977af_ir.c
w83977af_ir.h