ibm_newemac: Allow the "no flow control" EMAC feature to work
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>
Thu, 4 Sep 2008 02:57:57 +0000 (02:57 +0000)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Tue, 30 Sep 2008 13:22:45 +0000 (09:22 -0400)
Some PowerPC 40x chips have errata that force us not to use the integrated
flow control.  We have the feature defined, but it currently can't be used
because it is never added to EMAC_FTRS_POSSIBLE.

This adds a Kconfig option for affected platforms to select and puts the
feature in the EMAC_FTRS_POSSIBLE list.  This is set for PowerPC 405EZ
platforms as well.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
drivers/net/ibm_newemac/Kconfig
drivers/net/ibm_newemac/core.c
drivers/net/ibm_newemac/core.h

index 70a3272ee998d646abf7b1c870237d827bc2967f..dfb6547c37cb69a1300819fbba7633c9b8ef064c 100644 (file)
@@ -62,3 +62,7 @@ config IBM_NEW_EMAC_TAH
 config IBM_NEW_EMAC_EMAC4
        bool
        default n
+
+config IBM_NEW_EMAC_NO_FLOW_CTRL
+       bool
+       default n
index ccd9d9058f6dfa48c298926058f03af4a0f82876..4e633870e6e7ea2f7c324a2fbd72204dd14108df 100644 (file)
@@ -2567,6 +2567,8 @@ static int __devinit emac_init_config(struct emac_instance *dev)
                if (of_device_is_compatible(np, "ibm,emac-440ep") ||
                    of_device_is_compatible(np, "ibm,emac-440gr"))
                        dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;
+               if (of_device_is_compatible(np, "ibm,emac-405ez"))
+                       dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
        }
 
        /* Fixup some feature bits based on the device tree */
index 6545e69d12c31425d75413535a286ab19b804119..59e5a5d802f3991fd25118e7a2ae332fb387cb3d 100644 (file)
@@ -340,6 +340,9 @@ enum {
 #endif
 #ifdef CONFIG_IBM_NEW_EMAC_RGMII
            EMAC_FTR_HAS_RGMII  |
+#endif
+#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL
+           EMAC_FTR_NO_FLOW_CONTROL_40x |
 #endif
        EMAC_FTR_440EP_PHY_CLK_FIX,
 };