Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43193
b: refs/heads/master
c: 9d57f01
h: refs/heads/master
i:
  43191: 6721553
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 7, 2006
1 parent 0d904ed commit 64411b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 9f88f29fc502192824aba092e90af1297a87eb82
refs/heads/master: 9d57f01c1331cb7bfd0a9d4f7723da5b9329394f
14 changes: 5 additions & 9 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -9467,16 +9467,12 @@ static void __devinit tg3_get_5906_nvram_info(struct tg3 *tp)
/* Chips other than 5700/5701 use the NVRAM for fetching info. */
static void __devinit tg3_nvram_init(struct tg3 *tp)
{
int j;

tw32_f(GRC_EEPROM_ADDR,
(EEPROM_ADDR_FSM_RESET |
(EEPROM_DEFAULT_CLOCK_PERIOD <<
EEPROM_ADDR_CLKPERD_SHIFT)));

/* XXX schedule_timeout() ... */
for (j = 0; j < 100; j++)
udelay(10);
msleep(1);

/* Enable seeprom accesses. */
tw32_f(GRC_LOCAL_CTRL,
Expand Down Expand Up @@ -9537,12 +9533,12 @@ static int tg3_nvram_read_using_eeprom(struct tg3 *tp,
EEPROM_ADDR_ADDR_MASK) |
EEPROM_ADDR_READ | EEPROM_ADDR_START);

for (i = 0; i < 10000; i++) {
for (i = 0; i < 1000; i++) {
tmp = tr32(GRC_EEPROM_ADDR);

if (tmp & EEPROM_ADDR_COMPLETE)
break;
udelay(100);
msleep(1);
}
if (!(tmp & EEPROM_ADDR_COMPLETE))
return -EBUSY;
Expand Down Expand Up @@ -9667,12 +9663,12 @@ static int tg3_nvram_write_block_using_eeprom(struct tg3 *tp,
EEPROM_ADDR_START |
EEPROM_ADDR_WRITE);

for (j = 0; j < 10000; j++) {
for (j = 0; j < 1000; j++) {
val = tr32(GRC_EEPROM_ADDR);

if (val & EEPROM_ADDR_COMPLETE)
break;
udelay(100);
msleep(1);
}
if (!(val & EEPROM_ADDR_COMPLETE)) {
rc = -EBUSY;
Expand Down

0 comments on commit 64411b1

Please sign in to comment.