Commit cbe7a673 authored by David S. Miller's avatar David S. Miller Committed by David S. Miller

[TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X.

There is no firmware on these chips, so accessing this
value is pointless.  But, more importantly, touching
this area on such chips results in PCI PIO timeouts.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8aac81f
...@@ -3697,8 +3697,9 @@ static void tg3_nvram_unlock(struct tg3 *tp) ...@@ -3697,8 +3697,9 @@ static void tg3_nvram_unlock(struct tg3 *tp)
/* tp->lock is held. */ /* tp->lock is held. */
static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind) static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind)
{ {
tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X))
NIC_SRAM_FIRMWARE_MBOX_MAGIC1); tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX,
NIC_SRAM_FIRMWARE_MBOX_MAGIC1);
if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) { if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) {
switch (kind) { switch (kind) {
...@@ -3902,19 +3903,20 @@ static int tg3_chip_reset(struct tg3 *tp) ...@@ -3902,19 +3903,20 @@ static int tg3_chip_reset(struct tg3 *tp)
tw32_f(MAC_MODE, 0); tw32_f(MAC_MODE, 0);
udelay(40); udelay(40);
/* Wait for firmware initialization to complete. */ if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
for (i = 0; i < 100000; i++) { /* Wait for firmware initialization to complete. */
tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); for (i = 0; i < 100000; i++) {
if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val);
break; if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1)
udelay(10); break;
} udelay(10);
if (i >= 100000 && }
!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { if (i >= 100000) {
printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, " printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, "
"firmware will not restart magic=%08x\n", "firmware will not restart magic=%08x\n",
tp->dev->name, val); tp->dev->name, val);
return -ENODEV; return -ENODEV;
}
} }
if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment