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,6 +3697,7 @@ static void tg3_nvram_unlock(struct tg3 *tp) ...@@ -3697,6 +3697,7 @@ 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)
{ {
if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X))
tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX,
NIC_SRAM_FIRMWARE_MBOX_MAGIC1); NIC_SRAM_FIRMWARE_MBOX_MAGIC1);
...@@ -3902,6 +3903,7 @@ static int tg3_chip_reset(struct tg3 *tp) ...@@ -3902,6 +3903,7 @@ static int tg3_chip_reset(struct tg3 *tp)
tw32_f(MAC_MODE, 0); tw32_f(MAC_MODE, 0);
udelay(40); udelay(40);
if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
/* Wait for firmware initialization to complete. */ /* Wait for firmware initialization to complete. */
for (i = 0; i < 100000; i++) { for (i = 0; i < 100000; i++) {
tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val);
...@@ -3909,13 +3911,13 @@ static int tg3_chip_reset(struct tg3 *tp) ...@@ -3909,13 +3911,13 @@ static int tg3_chip_reset(struct tg3 *tp)
break; break;
udelay(10); udelay(10);
} }
if (i >= 100000 && if (i >= 100000) {
!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
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) &&
tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) { tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) {
......
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