diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-05-31 17:27:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-01 16:10:56 -0400 |
commit | 27d024321cf4fc0a96c41c3b0f3c123796734a63 (patch) | |
tree | 8c6ef2a6ae4509bacf7d27f1052c0925bca79bab /drivers/net/bnx2x | |
parent | c688fe2fc0cab3a5d266f7f6fcb21f14e4ac39ba (diff) |
bnx2x: Fix over current port display
On 57712 chip, port number is enumerated per engine, so it requires adjustment in port display to the user.
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_link.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 87c5d9ff8163..ffc3c16166d4 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -4919,15 +4919,14 @@ static void bnx2x_8727_power_module(struct bnx2x *bp, | |||
4919 | */ | 4919 | */ |
4920 | if (phy->flags & FLAGS_NOC) | 4920 | if (phy->flags & FLAGS_NOC) |
4921 | return; | 4921 | return; |
4922 | if (!(phy->flags & | 4922 | if (is_power_up) |
4923 | FLAGS_NOC) && is_power_up) | ||
4924 | val = (1<<4); | 4923 | val = (1<<4); |
4925 | else | 4924 | else |
4926 | /* | 4925 | /* |
4927 | * Set GPIO control to OUTPUT, and set the power bit | 4926 | * Set GPIO control to OUTPUT, and set the power bit |
4928 | * to according to the is_power_up | 4927 | * to according to the is_power_up |
4929 | */ | 4928 | */ |
4930 | val = ((!(is_power_up)) << 1); | 4929 | val = (1<<1); |
4931 | 4930 | ||
4932 | bnx2x_cl45_write(bp, phy, | 4931 | bnx2x_cl45_write(bp, phy, |
4933 | MDIO_PMA_DEVAD, | 4932 | MDIO_PMA_DEVAD, |
@@ -5928,7 +5927,7 @@ static u8 bnx2x_8727_read_status(struct bnx2x_phy *phy, | |||
5928 | 5927 | ||
5929 | { | 5928 | { |
5930 | struct bnx2x *bp = params->bp; | 5929 | struct bnx2x *bp = params->bp; |
5931 | u8 link_up = 0; | 5930 | u8 link_up = 0, oc_port = params->port; |
5932 | u16 link_status = 0; | 5931 | u16 link_status = 0; |
5933 | u16 rx_alarm_status, lasi_ctrl, val1; | 5932 | u16 rx_alarm_status, lasi_ctrl, val1; |
5934 | 5933 | ||
@@ -5969,8 +5968,10 @@ static u8 bnx2x_8727_read_status(struct bnx2x_phy *phy, | |||
5969 | &val1); | 5968 | &val1); |
5970 | 5969 | ||
5971 | if ((val1 & (1<<8)) == 0) { | 5970 | if ((val1 & (1<<8)) == 0) { |
5971 | if (!CHIP_IS_E1x(bp)) | ||
5972 | oc_port = BP_PATH(bp) + (params->port << 1); | ||
5972 | DP(NETIF_MSG_LINK, "8727 Power fault has been detected" | 5973 | DP(NETIF_MSG_LINK, "8727 Power fault has been detected" |
5973 | " on port %d\n", params->port); | 5974 | " on port %d\n", oc_port); |
5974 | netdev_err(bp->dev, "Error: Power fault on Port %d has" | 5975 | netdev_err(bp->dev, "Error: Power fault on Port %d has" |
5975 | " been detected and the power to " | 5976 | " been detected and the power to " |
5976 | "that SFP+ module has been removed" | 5977 | "that SFP+ module has been removed" |
@@ -5978,7 +5979,7 @@ static u8 bnx2x_8727_read_status(struct bnx2x_phy *phy, | |||
5978 | " Please remove the SFP+ module and" | 5979 | " Please remove the SFP+ module and" |
5979 | " restart the system to clear this" | 5980 | " restart the system to clear this" |
5980 | " error.\n", | 5981 | " error.\n", |
5981 | params->port); | 5982 | oc_port); |
5982 | /* Disable all RX_ALARMs except for mod_abs */ | 5983 | /* Disable all RX_ALARMs except for mod_abs */ |
5983 | bnx2x_cl45_write(bp, phy, | 5984 | bnx2x_cl45_write(bp, phy, |
5984 | MDIO_PMA_DEVAD, | 5985 | MDIO_PMA_DEVAD, |