diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-10-15 03:19:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-15 03:19:05 -0400 |
commit | 35c5f8fef12a2e4b788aa45ff72206ce4ac8e4b4 (patch) | |
tree | ec8f02d834781cd6cc14e374340d7db70343ce7b /drivers/net/bnx2x_main.c | |
parent | 061bc702f6912b6e45b9aaf1c9bf2f8122406d47 (diff) |
bnx2x: Report the maximal available BW as link speed
The device is limited to the maximal BW allocation, so it should be displayed as
the link speed to notify the user.
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 42cd957c668b..ba131f463198 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -2163,11 +2163,23 @@ static void bnx2x_link_report(struct bnx2x *bp) | |||
2163 | } | 2163 | } |
2164 | 2164 | ||
2165 | if (bp->link_vars.link_up) { | 2165 | if (bp->link_vars.link_up) { |
2166 | u16 line_speed; | ||
2167 | |||
2166 | if (bp->state == BNX2X_STATE_OPEN) | 2168 | if (bp->state == BNX2X_STATE_OPEN) |
2167 | netif_carrier_on(bp->dev); | 2169 | netif_carrier_on(bp->dev); |
2168 | printk(KERN_INFO PFX "%s NIC Link is Up, ", bp->dev->name); | 2170 | printk(KERN_INFO PFX "%s NIC Link is Up, ", bp->dev->name); |
2169 | 2171 | ||
2170 | printk("%d Mbps ", bp->link_vars.line_speed); | 2172 | line_speed = bp->link_vars.line_speed; |
2173 | if (IS_E1HMF(bp)) { | ||
2174 | u16 vn_max_rate; | ||
2175 | |||
2176 | vn_max_rate = | ||
2177 | ((bp->mf_config & FUNC_MF_CFG_MAX_BW_MASK) >> | ||
2178 | FUNC_MF_CFG_MAX_BW_SHIFT) * 100; | ||
2179 | if (vn_max_rate < line_speed) | ||
2180 | line_speed = vn_max_rate; | ||
2181 | } | ||
2182 | printk("%d Mbps ", line_speed); | ||
2171 | 2183 | ||
2172 | if (bp->link_vars.duplex == DUPLEX_FULL) | 2184 | if (bp->link_vars.duplex == DUPLEX_FULL) |
2173 | printk("full duplex"); | 2185 | printk("full duplex"); |