diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-04-17 20:50:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-17 20:50:01 -0400 |
commit | 70dda99c41fc8a153e09bdba9adb7805ba2a4bb3 (patch) | |
tree | 52ae78da0e081098ff77a0e66546a09927942dbe /drivers/net/bnx2x | |
parent | c8a75b345b38a9b63ffd077c0eb71707fa194fc6 (diff) |
bnx2x: Fix port identification problem
This patch fixes port identification on optic devices when there's no link on the port.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_ethtool.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index f5050155c6b5..89cb977898cb 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c | |||
@@ -2114,19 +2114,18 @@ static int bnx2x_phys_id(struct net_device *dev, u32 data) | |||
2114 | for (i = 0; i < (data * 2); i++) { | 2114 | for (i = 0; i < (data * 2); i++) { |
2115 | if ((i % 2) == 0) | 2115 | if ((i % 2) == 0) |
2116 | bnx2x_set_led(&bp->link_params, &bp->link_vars, | 2116 | bnx2x_set_led(&bp->link_params, &bp->link_vars, |
2117 | LED_MODE_OPER, SPEED_1000); | 2117 | LED_MODE_ON, SPEED_1000); |
2118 | else | 2118 | else |
2119 | bnx2x_set_led(&bp->link_params, &bp->link_vars, | 2119 | bnx2x_set_led(&bp->link_params, &bp->link_vars, |
2120 | LED_MODE_OFF, 0); | 2120 | LED_MODE_FRONT_PANEL_OFF, 0); |
2121 | 2121 | ||
2122 | msleep_interruptible(500); | 2122 | msleep_interruptible(500); |
2123 | if (signal_pending(current)) | 2123 | if (signal_pending(current)) |
2124 | break; | 2124 | break; |
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | if (bp->link_vars.link_up) | 2127 | bnx2x_set_led(&bp->link_params, &bp->link_vars, |
2128 | bnx2x_set_led(&bp->link_params, &bp->link_vars, LED_MODE_OPER, | 2128 | LED_MODE_OPER, bp->link_vars.line_speed); |
2129 | bp->link_vars.line_speed); | ||
2130 | 2129 | ||
2131 | return 0; | 2130 | return 0; |
2132 | } | 2131 | } |