Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172091
b: refs/heads/master
c: 5eb6f3c
h: refs/heads/master
i:
  172089: e3906b7
  172087: 012ad5b
v: v3
  • Loading branch information
Bruce Allan authored and David S. Miller committed Dec 3, 2009
1 parent 71b8bdf commit 2c4d1e6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 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: 94e5b651595a8eb77665787f7559a6a7c916c195
refs/heads/master: 5eb6f3c70fcc0fb19b9087863e6e29f96a76f3bd
2 changes: 1 addition & 1 deletion trunk/drivers/net/e1000e/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ enum e1e_registers {
E1000_HICR = 0x08F00, /* Host Interface Control */
};

/* RSS registers */
#define E1000_MAX_PHY_ADDR 4

/* IGP01E1000 Specific Registers */
#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */
Expand Down
26 changes: 16 additions & 10 deletions trunk/drivers/net/e1000e/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,28 +2197,34 @@ enum e1000_phy_type e1000e_get_phy_type_from_id(u32 phy_id)
s32 e1000e_determine_phy_address(struct e1000_hw *hw)
{
s32 ret_val = -E1000_ERR_PHY_TYPE;
u32 phy_addr= 0;
u32 i = 0;
u32 phy_addr = 0;
u32 i;
enum e1000_phy_type phy_type = e1000_phy_unknown;

do {
for (phy_addr = 0; phy_addr < 4; phy_addr++) {
hw->phy.addr = phy_addr;
hw->phy.id = phy_type;

for (phy_addr = 0; phy_addr < E1000_MAX_PHY_ADDR; phy_addr++) {
hw->phy.addr = phy_addr;
i = 0;

do {
e1000e_get_phy_id(hw);
phy_type = e1000e_get_phy_type_from_id(hw->phy.id);

/*
/*
* If phy_type is valid, break - we found our
* PHY address
*/
if (phy_type != e1000_phy_unknown) {
ret_val = 0;
break;
goto out;
}
}
i++;
} while ((ret_val != 0) && (i < 100));
msleep(1);
i++;
} while (i < 10);
}

out:
return ret_val;
}

Expand Down

0 comments on commit 2c4d1e6

Please sign in to comment.