Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130183
b: refs/heads/master
c: 3910c8a
h: refs/heads/master
i:
  130181: 93b4433
  130179: e033726
  130175: 84f8b34
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Jan 22, 2009
1 parent 391a683 commit dfc2b25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5650d9d4cbf3898d3f9725ccad5dfca6bc086324
refs/heads/master: 3910c8ae44c59cebed721e33aa496f0a385b4e03
13 changes: 7 additions & 6 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8750,18 +8750,17 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode, u8 link_up)

if (loopback_mode == BNX2X_MAC_LOOPBACK) {
bp->link_params.loopback_mode = LOOPBACK_BMAC;
bnx2x_acquire_phy_lock(bp);
bnx2x_phy_init(&bp->link_params, &bp->link_vars);
bnx2x_release_phy_lock(bp);

} else if (loopback_mode == BNX2X_PHY_LOOPBACK) {
u16 cnt = 1000;
bp->link_params.loopback_mode = LOOPBACK_XGXS_10;
bnx2x_acquire_phy_lock(bp);
bnx2x_phy_init(&bp->link_params, &bp->link_vars);
bnx2x_release_phy_lock(bp);
/* wait until link state is restored */
bnx2x_wait_for_link(bp, link_up);

if (link_up)
while (cnt-- && bnx2x_test_link(&bp->link_params,
&bp->link_vars))
msleep(10);
} else
return -EINVAL;

Expand Down Expand Up @@ -8867,6 +8866,7 @@ static int bnx2x_test_loopback(struct bnx2x *bp, u8 link_up)
return BNX2X_LOOPBACK_FAILED;

bnx2x_netif_stop(bp, 1);
bnx2x_acquire_phy_lock(bp);

if (bnx2x_run_loopback(bp, BNX2X_MAC_LOOPBACK, link_up)) {
DP(NETIF_MSG_PROBE, "MAC loopback failed\n");
Expand All @@ -8878,6 +8878,7 @@ static int bnx2x_test_loopback(struct bnx2x *bp, u8 link_up)
rc |= BNX2X_PHY_LOOPBACK_FAILED;
}

bnx2x_release_phy_lock(bp);
bnx2x_netif_start(bp);

return rc;
Expand Down

0 comments on commit dfc2b25

Please sign in to comment.