linux/drivers/net
Bruce Allan a90b412cb8 e1000e: locking bug introduced by commit 67fd4fcb
Commit 67fd4fcb (e1000e: convert to stats64) added the ability to update
statistics more accurately and on-demand through the net_device_ops
.ndo_get_stats64 hook, but introduced a locking bug on 82577/8/9 when
linked at half-duplex (seen on kernels with CONFIG_DEBUG_ATOMIC_SLEEP=y and
CONFIG_PROVE_LOCKING=y).  The commit introduced code paths that caused a
mutex to be locked in atomic contexts, e.g. an rcu_read_lock is held when
irqbalance reads the stats from /sys/class/net/ethX/statistics causing the
mutex to be locked to read the Phy half-duplex statistics registers.

The mutex was originally introduced to prevent concurrent accesses of
resources (the NVM and Phy) shared by the driver, firmware and hardware
a few years back when there was an issue with the NVM getting corrupted.
It was later split into two mutexes - one for the NVM and one for the Phy
when it was determined the NVM, unlike the Phy, should not be protected by
the software/firmware/hardware semaphore (arbitration of which is done in
part with the SWFLAG bit in the EXTCNF_CTRL register).  This latter
semaphore should be sufficient to prevent resource contention of the Phy in
the driver (i.e. the mutex for Phy accesses is not needed), but to be sure
the mutex is replaced with an atomic bit flag which will warn if any
contention is possible.

Also add additional debug output to help determine when the sw/fw/hw
semaphore is owned by the firmware or hardware.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Reported-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
2011-10-16 07:13:17 -07:00
..
appletalk net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
arcnet drivers/net: Kconfig & Makefile cleanup 2011-08-27 00:58:49 -07:00
bonding Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
caif caif: Remove OOM messages, use kzalloc 2011-08-28 17:16:13 -04:00
can candev: allow SJW user setting for bittiming calculation 2011-09-28 13:41:51 -04:00
cris net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
ethernet e1000e: locking bug introduced by commit 67fd4fcb 2011-10-16 07:13:17 -07:00
fddi skfp: Fix SysKonnect FDDI driver compile issues 2011-08-27 00:58:23 -07:00
hamradio
hippi hippi: Move the HIPPI driver 2011-08-27 00:58:30 -07:00
irda net/irda: sh_irda: add PM support 2011-09-15 17:19:28 -04:00
phy Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
plip plip: Move the PLIP driver 2011-08-27 00:58:33 -07:00
ppp Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
slip slip: Move the SLIP drivers 2011-08-27 00:58:36 -07:00
tokenring drivers/net: Kconfig & Makefile cleanup 2011-08-27 00:58:49 -07:00
usb NET: white space/coding style cleanup of asix driver 2011-10-04 16:25:31 -04:00
vmxnet3 vmxnet3: fix skb truesize underestimation 2011-10-13 22:25:21 -04:00
wan wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
wimax
wireless Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-11 15:35:42 -04:00
xen-netback Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
Kconfig pch_gbe: support ML7831 IOH 2011-09-15 17:31:45 -04:00
LICENSE.SRC
Makefile net: Fix duplicate CONFIG_SLIP entry in driver/net/Makefile 2011-08-29 22:55:53 -04:00
Space.c
dummy.c net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
eql.c
ifb.c
loopback.c
macvlan.c Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
macvtap.c macvtap: fix the uninitialized var using in macvtap_alloc_skb() 2011-09-20 14:37:22 -04:00
mdio.c
mii.c
netconsole.c netconsole: switch init_netconsole() to late_initcall 2011-09-20 15:45:07 -04:00
rionet.c rapidio: fix use of non-compatible registers 2011-08-25 16:25:34 -07:00
sb1000.c
sungem_phy.c net: Fix sungem_phy sharing. 2011-08-16 00:16:49 -07:00
tun.c net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
veth.c
virtio_net.c virtio-net: Verify page list size before fitting into skb 2011-10-06 15:39:40 -04:00
xen-netfront.c xen: netfront: convert to SKB paged frag API. 2011-10-05 17:36:00 -04:00