aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2011-01-29 23:15:00 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-31 01:26:16 -0500
commitc8e64df48a814be1e7066f07b4f709ff63727abf (patch)
tree3f1904c1f12baeffe69c722c63541a91bd08ed76 /drivers/net/bnx2x
parent53eda06def26862c0a3c57348c71a240429fbaac (diff)
bnx2x: Fix port swap for BCM8073
Fix link on BCM57712 + BCM8073 when port swap is enabled. Common PHY reset was done on the wrong 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_link.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
index b1c667a0031e..dd1210fddfff 100644
--- a/drivers/net/bnx2x/bnx2x_link.c
+++ b/drivers/net/bnx2x/bnx2x_link.c
@@ -7688,10 +7688,13 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp,
7688 struct bnx2x_phy phy[PORT_MAX]; 7688 struct bnx2x_phy phy[PORT_MAX];
7689 struct bnx2x_phy *phy_blk[PORT_MAX]; 7689 struct bnx2x_phy *phy_blk[PORT_MAX];
7690 u16 val; 7690 u16 val;
7691 s8 port; 7691 s8 port = 0;
7692 s8 port_of_path = 0; 7692 s8 port_of_path = 0;
7693 7693 u32 swap_val, swap_override;
7694 bnx2x_ext_phy_hw_reset(bp, 0); 7694 swap_val = REG_RD(bp, NIG_REG_PORT_SWAP);
7695 swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE);
7696 port ^= (swap_val && swap_override);
7697 bnx2x_ext_phy_hw_reset(bp, port);
7695 /* PART1 - Reset both phys */ 7698 /* PART1 - Reset both phys */
7696 for (port = PORT_MAX - 1; port >= PORT_0; port--) { 7699 for (port = PORT_MAX - 1; port >= PORT_0; port--) {
7697 u32 shmem_base, shmem2_base; 7700 u32 shmem_base, shmem2_base;