]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tg3: tg3_disable_ints using uninitialized mailbox value to disable interrupts
authorPrashant Sreedharan <prashant@broadcom.com>
Sat, 20 Dec 2014 20:16:17 +0000 (12:16 -0800)
committerJiri Slaby <jslaby@suse.cz>
Mon, 26 Jan 2015 13:39:15 +0000 (14:39 +0100)
commite6f7e1dc44d6cbc3ca844b8d1f6c0bab6672f77a
treea4899e55279c822248065b8ad4500e7a276e3609
parentef260858f4bdef913410e825b1f9590a0b9db213
tg3: tg3_disable_ints using uninitialized mailbox value to disable interrupts

[ Upstream commit 05b0aa579397b734f127af58e401a30784a1e315 ]

During driver load in tg3_init_one, if the driver detects DMA activity before
intializing the chip tg3_halt is called. As part of tg3_halt interrupts are
disabled using routine tg3_disable_ints. This routine was using mailbox value
which was not initialized (default value is 0). As a result driver was writing
0x00000001 to pci config space register 0, which is the vendor id / device id.

This driver bug was exposed because of the commit a7877b17a667 (PCI: Check only
the Vendor ID to identify Configuration Request Retry). Also this issue is only
seen in older generation chipsets like 5722 because config space write to offset
0 from driver is possible. The newer generation chips ignore writes to offset 0.
Also without commit a7877b17a667, for these older chips when a GRC reset is
issued the Bootcode would reprogram the vendor id/device id, which is the reason
this bug was masked earlier.

Fixed by initializing the interrupt mailbox registers before calling tg3_halt.

Please queue for -stable.

Reported-by: Nils Holland <nholland@tisys.org>
Reported-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/broadcom/tg3.c