summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2013-05-01 04:27:57 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-01 15:07:43 -0400
commitb0261926ef666142ff9f7de92622172bf1164a26 (patch)
tree2d83d45cae72be2bf419bcd921e4fe05f2343d77 /drivers/net/ethernet
parentbe3e45810bb1ee0bdfa93f6b9532d8c451e50f48 (diff)
downloadblackbird-obmc-linux-b0261926ef666142ff9f7de92622172bf1164a26.tar.gz
blackbird-obmc-linux-b0261926ef666142ff9f7de92622172bf1164a26.zip
bnx2x: correct reading of speed capabilities
When the bnx2x driver reads the port configuration - mask irrelevant bits. Without this change, the unintended bits may cause the driver to needlessly toggle the link, as a comparison in the link flap avoidance flow will show that the old link did not advertise the same capabilities and thus cannot be retained. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index a024eec94be1..ad98c296b1a1 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10667,10 +10667,12 @@ static void bnx2x_get_port_hwinfo(struct bnx2x *bp)
bp->link_params.speed_cap_mask[0] =
SHMEM_RD(bp,
- dev_info.port_hw_config[port].speed_capability_mask);
+ dev_info.port_hw_config[port].speed_capability_mask) &
+ PORT_HW_CFG_SPEED_CAPABILITY_D0_MASK;
bp->link_params.speed_cap_mask[1] =
SHMEM_RD(bp,
- dev_info.port_hw_config[port].speed_capability_mask2);
+ dev_info.port_hw_config[port].speed_capability_mask2) &
+ PORT_HW_CFG_SPEED_CAPABILITY_D0_MASK;
bp->port.link_config[0] =
SHMEM_RD(bp, dev_info.port_feature_config[port].link_config);
OpenPOWER on IntegriCloud