aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac/core.c
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-10-16 04:38:40 +0000
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-10-20 19:59:54 -0400
commit1ff0fcfcb1a6d0a4c4d065ed230be7beae087b83 (patch)
treef87ee18556af26da4b0923a7116371886e4ece70 /drivers/net/ibm_newemac/core.c
parent878e7556bfe7b10178ea58862bf9708f35afe001 (diff)
downloadkernel_samsung_smdk4412-1ff0fcfcb1a6d0a4c4d065ed230be7beae087b83.zip
kernel_samsung_smdk4412-1ff0fcfcb1a6d0a4c4d065ed230be7beae087b83.tar.gz
kernel_samsung_smdk4412-1ff0fcfcb1a6d0a4c4d065ed230be7beae087b83.tar.bz2
ibm_newemac: Fix new MAL feature handling
Support for new features needed by the PPC 405EZ boards introduced some errors in the MAL and EMAC feature handling. This broke 'allmodconfig' builds as CONFIG_PPC_DCR_NATIVE is not set for those. This patch fixes these errors by wrapping the code in the appropriate #ifdefs. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/net/ibm_newemac/core.c')
-rw-r--r--drivers/net/ibm_newemac/core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index efcf21c..2ee2622 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2604,8 +2604,16 @@ 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"))
+ if (of_device_is_compatible(np, "ibm,emac-405ez")) {
+#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL
dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
+#else
+ printk(KERN_ERR "%s: Flow control not disabled!\n",
+ np->full_name);
+ return -ENXIO;
+#endif
+ }
+
}
/* Fixup some feature bits based on the device tree */