aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 861387928e6d..506c5ccd7156 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1717,7 +1717,6 @@ bnx2_remote_phy_event(struct bnx2 *bp)
1717 break; 1717 break;
1718 } 1718 }
1719 1719
1720 spin_lock(&bp->phy_lock);
1721 bp->flow_ctrl = 0; 1720 bp->flow_ctrl = 0;
1722 if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) != 1721 if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) !=
1723 (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) { 1722 (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) {
@@ -1739,7 +1738,6 @@ bnx2_remote_phy_event(struct bnx2 *bp)
1739 if (old_port != bp->phy_port) 1738 if (old_port != bp->phy_port)
1740 bnx2_set_default_link(bp); 1739 bnx2_set_default_link(bp);
1741 1740
1742 spin_unlock(&bp->phy_lock);
1743 } 1741 }
1744 if (bp->link_up != link_up) 1742 if (bp->link_up != link_up)
1745 bnx2_report_link(bp); 1743 bnx2_report_link(bp);
@@ -2447,14 +2445,15 @@ bnx2_phy_event_is_set(struct bnx2 *bp, struct bnx2_napi *bnapi, u32 event)
2447static void 2445static void
2448bnx2_phy_int(struct bnx2 *bp, struct bnx2_napi *bnapi) 2446bnx2_phy_int(struct bnx2 *bp, struct bnx2_napi *bnapi)
2449{ 2447{
2450 if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_LINK_STATE)) { 2448 spin_lock(&bp->phy_lock);
2451 spin_lock(&bp->phy_lock); 2449
2450 if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_LINK_STATE))
2452 bnx2_set_link(bp); 2451 bnx2_set_link(bp);
2453 spin_unlock(&bp->phy_lock);
2454 }
2455 if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_TIMER_ABORT)) 2452 if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_TIMER_ABORT))
2456 bnx2_set_remote_link(bp); 2453 bnx2_set_remote_link(bp);
2457 2454
2455 spin_unlock(&bp->phy_lock);
2456
2458} 2457}
2459 2458
2460static inline u16 2459static inline u16