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>
This commit is contained in:

committed by
David S. Miller

parent
10b6d95612
commit
c22c814931
@@ -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) {
|
||||
|
Reference in New Issue
Block a user