diff options
-rw-r--r-- | drivers/net/tg3.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ef849b1eb110..25e57d8ddb51 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -9354,7 +9354,8 @@ static int tg3_test_loopback(struct tg3 *tp) | |||
9354 | if (err) | 9354 | if (err) |
9355 | return TG3_LOOPBACK_FAILED; | 9355 | return TG3_LOOPBACK_FAILED; |
9356 | 9356 | ||
9357 | if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) { | 9357 | if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || |
9358 | tp->pci_chip_rev_id == CHIPREV_ID_5761_A0) { | ||
9358 | int i; | 9359 | int i; |
9359 | u32 status; | 9360 | u32 status; |
9360 | 9361 | ||
@@ -9371,17 +9372,18 @@ static int tg3_test_loopback(struct tg3 *tp) | |||
9371 | if (status != CPMU_MUTEX_GNT_DRIVER) | 9372 | if (status != CPMU_MUTEX_GNT_DRIVER) |
9372 | return TG3_LOOPBACK_FAILED; | 9373 | return TG3_LOOPBACK_FAILED; |
9373 | 9374 | ||
9374 | cpmuctrl = tr32(TG3_CPMU_CTRL); | ||
9375 | |||
9376 | /* Turn off power management based on link speed. */ | 9375 | /* Turn off power management based on link speed. */ |
9376 | cpmuctrl = tr32(TG3_CPMU_CTRL); | ||
9377 | tw32(TG3_CPMU_CTRL, | 9377 | tw32(TG3_CPMU_CTRL, |
9378 | cpmuctrl & ~CPMU_CTRL_LINK_SPEED_MODE); | 9378 | cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE | |
9379 | CPMU_CTRL_LINK_AWARE_MODE)); | ||
9379 | } | 9380 | } |
9380 | 9381 | ||
9381 | if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) | 9382 | if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) |
9382 | err |= TG3_MAC_LOOPBACK_FAILED; | 9383 | err |= TG3_MAC_LOOPBACK_FAILED; |
9383 | 9384 | ||
9384 | if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) { | 9385 | if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || |
9386 | tp->pci_chip_rev_id == CHIPREV_ID_5761_A0) { | ||
9385 | tw32(TG3_CPMU_CTRL, cpmuctrl); | 9387 | tw32(TG3_CPMU_CTRL, cpmuctrl); |
9386 | 9388 | ||
9387 | /* Release the mutex */ | 9389 | /* Release the mutex */ |