0f73f2c5a3
Fixes the following: 1. POLL should not enable IRQ when work is not completed 2. No locking between TX descriptor cleaning and XMIT descriptor handling 3. No locking between RX POLL and XMIT modifying control register 4. Since TX cleaning (called from POLL) is running in parallel with XMIT unnecessary locking is needed. 5. IRQ handler looks at RX frame status solely, this is wrong when IRQ is temporarily disabled (in POLL), and when IRQ is shared. 6. IRQ handler clears IRQ status, which is unnecessary 7. TX queue was stopped in preventing cause when not MAX_SKB_FRAGS+1 descriptors were available after a SKB been scheduled by XMIT. Instead the TX queue is stopped first when not enough descriptors are available upon entering XMIT. It was hard to split up this patch in smaller pieces since all are tied together somehow. Note the RX flag used in the interrupt handler does not signal that interrupt was asserted, but that a frame was received. Same goes for TX. Also, IRQ is not asserted when the RX flag is set before enabling IRQ enable until a new frame is received. So extra care must be taken to avoid enabling IRQ and all descriptors are already used, hence dead lock will upon us. See new POLL implementation that enableds IRQ then look at the RX flag to determine if one or more IRQs may have been missed. TX/RX flags are cleared before handling previously enabled descriptors, this ensures that the RX/TX flags are valid when determining if IRQ should be turned on again. By moving TX cleaning from POLL to XMIT in the standard case, removes some locking trouble. Enabling TX cleaning from poll only when not enough TX descriptors are available is safe because the TX queue is at the same time stopped, thus XMIT will not be called. The TX queue is woken up again when enough descriptrs are available. TX Frames are always enabled with IRQ, however the TX IRQ Enable flag will not be enabled until XMIT must wait for free descriptors. Locking RX and XMIT parts of the driver from each other is needed because the RX/TX enable bits share the same register. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
appletalk | ||
arcnet | ||
arm | ||
atl1c | ||
atl1e | ||
atlx | ||
benet | ||
bna | ||
bnx2x | ||
bonding | ||
caif | ||
can | ||
chelsio | ||
cris | ||
cxgb3 | ||
cxgb4 | ||
cxgb4vf | ||
e1000 | ||
e1000e | ||
ehea | ||
enic | ||
fs_enet | ||
hamradio | ||
ibm_newemac | ||
igb | ||
igbvf | ||
irda | ||
ixgb | ||
ixgbe | ||
ixgbevf | ||
ixp2000 | ||
mlx4 | ||
myri10ge | ||
netxen | ||
octeon | ||
pch_gbe | ||
pcmcia | ||
phy | ||
qlcnic | ||
qlge | ||
sfc | ||
skfp | ||
stmmac | ||
tile | ||
tokenring | ||
tulip | ||
usb | ||
vmxnet3 | ||
vxge | ||
wan | ||
wimax | ||
wireless | ||
3c59x.c | ||
3c501.c | ||
3c501.h | ||
3c503.c | ||
3c503.h | ||
3c505.c | ||
3c505.h | ||
3c507.c | ||
3c509.c | ||
3c515.c | ||
3c523.c | ||
3c523.h | ||
3c527.c | ||
3c527.h | ||
7990.c | ||
7990.h | ||
8139cp.c | ||
8139too.c | ||
8390.c | ||
8390.h | ||
8390p.c | ||
82596.c | ||
a2065.c | ||
a2065.h | ||
ac3200.c | ||
acenic.c | ||
acenic.h | ||
amd8111e.c | ||
amd8111e.h | ||
apne.c | ||
ariadne.c | ||
ariadne.h | ||
at1700.c | ||
atarilance.c | ||
atp.c | ||
atp.h | ||
au1000_eth.c | ||
au1000_eth.h | ||
ax88796.c | ||
b44.c | ||
b44.h | ||
bcm63xx_enet.c | ||
bcm63xx_enet.h | ||
bfin_mac.c | ||
bfin_mac.h | ||
bmac.c | ||
bmac.h | ||
bnx2_fw.h | ||
bnx2.c | ||
bnx2.h | ||
bsd_comp.c | ||
cassini.c | ||
cassini.h | ||
cnic_defs.h | ||
cnic_if.h | ||
cnic.c | ||
cnic.h | ||
cpmac.c | ||
cs89x0.c | ||
cs89x0.h | ||
davinci_cpdma.c | ||
davinci_cpdma.h | ||
davinci_emac.c | ||
davinci_mdio.c | ||
de600.c | ||
de600.h | ||
de620.c | ||
de620.h | ||
declance.c | ||
defxx.c | ||
defxx.h | ||
depca.c | ||
depca.h | ||
dl2k.c | ||
dl2k.h | ||
dm9000.c | ||
dm9000.h | ||
dnet.c | ||
dnet.h | ||
dummy.c | ||
e100.c | ||
e2100.c | ||
eepro.c | ||
eexpress.c | ||
eexpress.h | ||
enc28j60_hw.h | ||
enc28j60.c | ||
epic100.c | ||
eql.c | ||
es3210.c | ||
eth16i.c | ||
ethoc.c | ||
ewrk3.c | ||
ewrk3.h | ||
fealnx.c | ||
fec_mpc52xx_phy.c | ||
fec_mpc52xx.c | ||
fec_mpc52xx.h | ||
fec.c | ||
fec.h | ||
forcedeth.c | ||
fsl_pq_mdio.c | ||
fsl_pq_mdio.h | ||
gianfar_ethtool.c | ||
gianfar_sysfs.c | ||
gianfar.c | ||
gianfar.h | ||
greth.c | ||
greth.h | ||
hamachi.c | ||
hp100.c | ||
hp100.h | ||
hp-plus.c | ||
hp.c | ||
hplance.c | ||
hplance.h | ||
hydra.c | ||
ibmlana.c | ||
ibmlana.h | ||
ibmveth.c | ||
ibmveth.h | ||
ifb.c | ||
ioc3-eth.c | ||
ipg.c | ||
ipg.h | ||
iseries_veth.c | ||
jazzsonic.c | ||
jme.c | ||
jme.h | ||
Kconfig | ||
korina.c | ||
ks8842.c | ||
ks8851_mll.c | ||
ks8851.c | ||
ks8851.h | ||
ksz884x.c | ||
lance.c | ||
lasi_82596.c | ||
lib8390.c | ||
lib82596.c | ||
LICENSE.SRC | ||
ll_temac_main.c | ||
ll_temac_mdio.c | ||
ll_temac.h | ||
lne390.c | ||
loopback.c | ||
lp486e.c | ||
mac89x0.c | ||
mac8390.c | ||
macb.c | ||
macb.h | ||
mace.c | ||
mace.h | ||
macmace.c | ||
macsonic.c | ||
macvlan.c | ||
macvtap.c | ||
Makefile | ||
mdio.c | ||
meth.c | ||
meth.h | ||
mii.c | ||
mipsnet.c | ||
mv643xx_eth.c | ||
mvme147.c | ||
myri_sbus.c | ||
myri_sbus.h | ||
natsemi.c | ||
ne2.c | ||
ne2k-pci.c | ||
ne3210.c | ||
ne-h8300.c | ||
ne.c | ||
netconsole.c | ||
netx-eth.c | ||
ni52.c | ||
ni52.h | ||
ni65.c | ||
ni65.h | ||
ni5010.c | ||
ni5010.h | ||
niu.c | ||
niu.h | ||
ns83820.c | ||
pasemi_mac_ethtool.c | ||
pasemi_mac.c | ||
pasemi_mac.h | ||
pci-skeleton.c | ||
pcnet32.c | ||
plip.c | ||
ppp_async.c | ||
ppp_deflate.c | ||
ppp_generic.c | ||
ppp_mppe.c | ||
ppp_mppe.h | ||
ppp_synctty.c | ||
pppoe.c | ||
pppox.c | ||
pptp.c | ||
ps3_gelic_net.c | ||
ps3_gelic_net.h | ||
ps3_gelic_wireless.c | ||
ps3_gelic_wireless.h | ||
pxa168_eth.c | ||
qla3xxx.c | ||
qla3xxx.h | ||
r6040.c | ||
r8169.c | ||
rionet.c | ||
rrunner.c | ||
rrunner.h | ||
s2io-regs.h | ||
s2io.c | ||
s2io.h | ||
s6gmac.c | ||
sb1000.c | ||
sb1250-mac.c | ||
sc92031.c | ||
seeq8005.c | ||
seeq8005.h | ||
sgiseeq.c | ||
sgiseeq.h | ||
sh_eth.c | ||
sh_eth.h | ||
sis190.c | ||
sis900.c | ||
sis900.h | ||
skge.c | ||
skge.h | ||
sky2.c | ||
sky2.h | ||
slhc.c | ||
slip.c | ||
slip.h | ||
smc91x.c | ||
smc91x.h | ||
smc911x.c | ||
smc911x.h | ||
smc9194.c | ||
smc9194.h | ||
smc-mca.c | ||
smc-ultra32.c | ||
smc-ultra.c | ||
smsc911x.c | ||
smsc911x.h | ||
smsc9420.c | ||
smsc9420.h | ||
sni_82596.c | ||
sonic.c | ||
sonic.h | ||
Space.c | ||
spider_net_ethtool.c | ||
spider_net.c | ||
spider_net.h | ||
starfire.c | ||
stnic.c | ||
sun3_82586.c | ||
sun3_82586.h | ||
sun3lance.c | ||
sunbmac.c | ||
sunbmac.h | ||
sundance.c | ||
sungem_phy.c | ||
sungem_phy.h | ||
sungem.c | ||
sungem.h | ||
sunhme.c | ||
sunhme.h | ||
sunlance.c | ||
sunqe.c | ||
sunqe.h | ||
sunvnet.c | ||
sunvnet.h | ||
tc35815.c | ||
tehuti.c | ||
tehuti.h | ||
tg3.c | ||
tg3.h | ||
tlan.c | ||
tlan.h | ||
tsi108_eth.c | ||
tsi108_eth.h | ||
tun.c | ||
typhoon.c | ||
typhoon.h | ||
ucc_geth_ethtool.c | ||
ucc_geth.c | ||
ucc_geth.h | ||
veth.c | ||
via-rhine.c | ||
via-velocity.c | ||
via-velocity.h | ||
virtio_net.c | ||
wd.c | ||
xen-netfront.c | ||
xilinx_emaclite.c | ||
xtsonic.c | ||
yellowfin.c | ||
znet.c | ||
zorro8390.c |