android_kernel_motorola_sm6225/drivers
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
..
accessibility
acpi Merge branches 'apei', 'bz-13195' and 'doc' into acpi 2011-09-12 20:00:00 -04:00
amba
ata drivers/ata/sata_dwc_460ex.c: add missing kfree 2011-08-18 23:58:11 -04:00
atm atm/iphase : removal of PCI space dereferences. 2011-10-03 14:09:10 -04:00
auxdisplay
base PM / Clocks: Do not acquire a mutex under a spinlock 2011-09-26 19:40:23 +02:00
bcma Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
block floppy: use del_timer_sync() in init cleanup 2011-09-21 10:22:11 +02:00
bluetooth btusb: add device entry for Broadcom SoftSailing 2011-09-29 16:31:15 -03:00
cdrom
char TPM: Zero buffer after copying to userspace 2011-09-23 09:46:41 +10:00
clk
clocksource
connector connector: add comm change event report to proc connector 2011-09-28 13:41:50 -04:00
cpufreq drivers/cpufreq/pcc-cpufreq.c: avoid NULL pointer dereference 2011-09-14 18:09:38 -07:00
cpuidle
crypto
dca
dio
dma dmaengine/ste_dma40: fix memory leak due to prepared descriptors 2011-09-05 17:08:26 +05:30
edac i7core_edac: fixed typo in error count calculation 2011-08-18 14:07:15 -07:00
eisa
firewire firewire: ohci: add no MSI quirk for O2Micro controller 2011-09-16 22:22:10 +02:00
firmware
gpio drivers/gpio/gpio-generic.c: fix build errors 2011-09-14 18:09:38 -07:00
gpu drm/radeon/kms: fix channel_remap setup (v2) 2011-10-04 17:24:14 +01:00
hid Merge branch 'for-linus' of git://github.com/dtor/input 2011-09-16 14:09:19 -07:00
hwmon hwmon: (coretemp) Avoid leaving around dangling pointer 2011-09-28 08:19:21 -07:00
hwspinlock
i2c i2c-tegra: fix possible race condition after tx 2011-09-07 00:13:40 +01:00
ide ide-disk: Fix request requeuing 2011-10-03 14:28:18 -04:00
idle
ieee802154
infiniband Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
input Merge branch 'for-linus' of git://github.com/dtor/input 2011-10-05 09:22:38 -07:00
iommu x86, iommu: Mark DMAR IRQ as non-threaded 2011-09-13 23:44:53 +02:00
isdn
leds drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling 2011-09-14 18:09:38 -07:00
lguest
macintosh
mca
md Merge branch 'for-linus' of http://people.redhat.com/agk/git/linux-dm 2011-10-06 08:31:47 -07:00
media Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
memstick
message
mfd mfd: Fix generic irq chip ack function name for jz4740-adc 2011-09-21 13:06:34 +02:00
misc lis3: fix regression of HP DriveGuard with 8bit chip 2011-10-03 20:51:51 -07:00
mmc Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2011-09-21 13:20:21 -07:00
mtd UBI: do not link debug messages when debugging is disabled 2011-08-19 19:02:27 +03:00
net e1000e: locking bug introduced by commit 67fd4fcb 2011-10-16 07:13:17 -07:00
nfc nfc: NFC_WILINK depends on NFC_NCI 2011-09-21 16:19:44 -04:00
nubus
of
oprofile
parisc
parport
pci PCI: Disable MPS configuration by default 2011-10-04 09:52:28 -07:00
pcmcia
platform
pnp
power s3c-adc-battery: Fix compilation error due to missing header (module.h) 2011-08-19 21:01:46 +04:00
pps
ps3
ptp
rapidio rapidio: fix use of non-compatible registers 2011-08-25 16:25:34 -07:00
regulator
rtc drivers/rtc/rtc-s3c.c: fix no occurrence of alarm interrupt 2011-09-14 18:09:38 -07:00
s390 Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
sbus
scsi Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
sfi
sh
sn
spi spi-topcliff-pch: Fix overrun issue 2011-10-04 10:10:50 -06:00
ssb ssb: fix DMA translation for some specific boards 2011-08-24 14:41:41 -04:00
staging Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem 2011-10-11 15:35:42 -04:00
target iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets 2011-09-16 23:47:07 +00:00
tc
telephony
thermal
tty cris: fix a build error in drivers/tty/serial/crisv10.c 2011-09-14 18:09:38 -07:00
uio
usb USB: xHCI: prevent infinite loop when processing MSE event 2011-09-19 17:15:47 -07:00
uwb
vhost
video backlight: Declare backlight_types[] const 2011-09-10 14:00:02 -07:00
virt
virtio
vlynq
w1 MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
watchdog Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
xen xen/pciback: Add flag indicating device has been assigned by Xen 2011-09-27 00:48:34 -04:00
zorro zorro: Defer device_register() until all devices have been identified 2011-09-22 12:59:35 -07:00
Kconfig
Makefile