diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2007-11-12 21:11:51 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-11-12 21:11:51 -0800 |
commit | e875093c9659d2a9f3923aa9ee1b89ef40cf95b9 (patch) | |
tree | 2ae7be842b38612b38805a22d6857eedda71f1e3 /drivers/net/tg3.c | |
parent | a5767dec1980463aef5614b7ad8a800bb4f4c353 (diff) |
[TG3]: CPMU adjustments for loopback tests
This patch adds the LINK_SPEED mode to the list of CPMU modes that can
cause the loopback tests to fail. These bugs are planned to be fixed in
future revisions of the chip, so the patch qualifies the fixes as such.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-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) if (err) return TG3_LOOPBACK_FAILED; - if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) { + if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || + tp->pci_chip_rev_id == CHIPREV_ID_5761_A0) { int i; u32 status; @@ -9371,17 +9372,18 @@ static int tg3_test_loopback(struct tg3 *tp) if (status != CPMU_MUTEX_GNT_DRIVER) return TG3_LOOPBACK_FAILED; - cpmuctrl = tr32(TG3_CPMU_CTRL); - /* Turn off power management based on link speed. */ + cpmuctrl = tr32(TG3_CPMU_CTRL); tw32(TG3_CPMU_CTRL, - cpmuctrl & ~CPMU_CTRL_LINK_SPEED_MODE); + cpmuctrl & ~(CPMU_CTRL_LINK_SPEED_MODE | + CPMU_CTRL_LINK_AWARE_MODE)); } if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) err |= TG3_MAC_LOOPBACK_FAILED; - if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) { + if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0 || + tp->pci_chip_rev_id == CHIPREV_ID_5761_A0) { tw32(TG3_CPMU_CTRL, cpmuctrl); /* Release the mutex */ |