tg3: Disable MAC loopback test for CPMU devices
authorMatt Carlson <mcarlson@broadcom.com>
Tue, 25 Jan 2011 15:58:53 +0000 (15:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jan 2011 03:38:19 +0000 (19:38 -0800)
On CPMU devices, the MAC loopback test does not test any important paths
the phy loopback test doesn't also test.  The phy loopback test is the
more comprehensive test.  This patch disables the MAC loopback test for
these devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index 9c5690366f37408ec5b4d4ac2e77b193e843a97c..f52466d2ece3afc8b0f1805be948d3d03079cf07 100644 (file)
@@ -10840,9 +10840,11 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
        if (loopback_mode == TG3_MAC_LOOPBACK) {
                /* HW errata - mac loopback fails in some cases on 5780.
                 * Normal traffic and PHY loopback are not affected by
-                * errata.
+                * errata.  Also, the MAC loopback test is deprecated for
+                * all newer ASIC revisions.
                 */
-               if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5780)
+               if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5780 ||
+                   (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT))
                        return 0;
 
                mac_mode = tp->mac_mode &