summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/tg3.h
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2014-09-01 14:21:57 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-02 13:02:19 -0700
commit0486a063b1ffce4f37ef80970689c64bf7b99e98 (patch)
treef0a5e2997aa20d3d23ea7b23009e1e852e10a787 /drivers/net/ethernet/broadcom/tg3.h
parent88e4194712496ace4a24d7541a83f910f0326ef0 (diff)
tg3: prevent ifup/ifdown during PCI error recovery
The patch fixes race conditions between PCI error recovery callbacks and potential ifup/ifdown. First, if ifup (tg3_open) is called between tg3_io_error_detected() and tg3_io_resume() then tp->timer is armed twice before expiry. Once during tg3_open() and again during tg3_io_resume(). This results in BUG at kernel/time/timer.c:945. Second, if ifdown (tg3_close) is called between tg3_io_error_detected() and tg3_io_resume() then tg3_napi_disable() is called twice without a tg3_napi_enable between. Once during tg3_io_error_detected() and again during tg3_close(). The tg3_io_resume() then hangs on rtnl_lock(). v2: Added logging messages per Prashant's request Cc: Prashant Sreedharan <prashant@broadcom.com> Cc: Michael Chan <mchan@broadcom.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Prashant Sreedharan <prashant@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index 461accaf0aa4..31c9f8295953 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -3407,6 +3407,7 @@ struct tg3 {
struct device *hwmon_dev;
bool link_up;
+ bool pcierr_recovery;
};
/* Accessor macros for chip and asic attributes