summaryrefslogtreecommitdiff
path: root/drivers/net/cxgb3/t3_hw.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-05-28 15:23:08 +0400
committerDavid S. Miller <davem@davemloft.net>2009-05-29 12:54:41 +0400
commitc22c8149313ee85c912e7b77a7afd04be8b8cba8 (patch)
tree84f18d574d01a0e7222c54f38d8e9cba9ba1c468 /drivers/net/cxgb3/t3_hw.c
parent10b6d95612672f89deb39b5a60fb677c78ba4844 (diff)
downloadlinux-c22c8149313ee85c912e7b77a7afd04be8b8cba8.tar.xz
cxgb3: link fault fixes
Do not call t3_link_fault() under spinlock, as it calls msleep(). Besides, only the access to pi->link_fault needs to be serialized. Also initialize local variables before checking the link status, link state fields might otherwise end up containing garbage. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/t3_hw.c')
-rw-r--r--drivers/net/cxgb3/t3_hw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 4f68aeb2679a..4950d5d789ae 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1274,6 +1274,11 @@ void t3_link_fault(struct adapter *adapter, int port_id)
A_XGM_INT_STATUS + mac->offset);
link_fault &= F_LINKFAULTCHANGE;
+ link_ok = lc->link_ok;
+ speed = lc->speed;
+ duplex = lc->duplex;
+ fc = lc->fc;
+
phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc);
if (link_fault) {