Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159482
b: refs/heads/master
c: bc7f0a0
h: refs/heads/master
v: v3
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Aug 13, 2009
1 parent 0c0b64f commit faeed50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97b41dad385bce97d60b8cdd56342f07f93fc5d2
refs/heads/master: bc7f0a053021491e292fc00810c4f2a8524453dd
16 changes: 9 additions & 7 deletions trunk/drivers/net/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -6430,7 +6430,7 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp, u32 shmem_base)
static u8 bnx2x_8727_common_init_phy(struct bnx2x *bp, u32 shmem_base)
{
u8 ext_phy_addr[PORT_MAX];
s8 port;
s8 port, first_port, i;
u32 swap_val, swap_override;
DP(NETIF_MSG_LINK, "Executing BCM8727 common init\n");
swap_val = REG_RD(bp, NIG_REG_PORT_SWAP);
Expand All @@ -6439,8 +6439,13 @@ static u8 bnx2x_8727_common_init_phy(struct bnx2x *bp, u32 shmem_base)
bnx2x_hw_reset(bp, 1 ^ (swap_val && swap_override));
msleep(5);

if (swap_val && swap_override)
first_port = PORT_0;
else
first_port = PORT_1;

/* PART1 - Reset both phys */
for (port = PORT_MAX - 1; port >= PORT_0; port--) {
for (i = 0, port = first_port; i < PORT_MAX; i++, port = !port) {
/* Extract the ext phy address for the port */
u32 ext_phy_config = REG_RD(bp, shmem_base +
offsetof(struct shmem_region,
Expand Down Expand Up @@ -6470,7 +6475,7 @@ static u8 bnx2x_8727_common_init_phy(struct bnx2x *bp, u32 shmem_base)
msleep(150);

/* PART2 - Download firmware to both phys */
for (port = PORT_MAX - 1; port >= PORT_0; port--) {
for (i = 0, port = first_port; i < PORT_MAX; i++, port = !port) {
u16 fw_ver1;

bnx2x_bcm8727_external_rom_boot(bp, port,
Expand All @@ -6482,16 +6487,13 @@ static u8 bnx2x_8727_common_init_phy(struct bnx2x *bp, u32 shmem_base)
MDIO_PMA_REG_ROM_VER1, &fw_ver1);
if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
DP(NETIF_MSG_LINK,
"bnx2x_8073_common_init_phy port %x:"
"bnx2x_8727_common_init_phy port %x:"
"Download failed. fw version = 0x%x\n",
port, fw_ver1);
return -EINVAL;
}

}



return 0;
}

Expand Down

0 comments on commit faeed50

Please sign in to comment.