aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ibm_newemac')
-rw-r--r--drivers/net/ibm_newemac/core.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index cb06280dced5..b24bd2dfb725 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -1297,7 +1297,6 @@ static int emac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
1297 return emac_xmit_finish(dev, len); 1297 return emac_xmit_finish(dev, len);
1298} 1298}
1299 1299
1300#ifdef CONFIG_IBM_NEW_EMAC_TAH
1301static inline int emac_xmit_split(struct emac_instance *dev, int slot, 1300static inline int emac_xmit_split(struct emac_instance *dev, int slot,
1302 u32 pd, int len, int last, u16 base_ctrl) 1301 u32 pd, int len, int last, u16 base_ctrl)
1303{ 1302{
@@ -1410,9 +1409,6 @@ static int emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev)
1410 DBG2(dev, "stopped TX queue" NL); 1409 DBG2(dev, "stopped TX queue" NL);
1411 return 1; 1410 return 1;
1412} 1411}
1413#else
1414# define emac_start_xmit_sg emac_start_xmit
1415#endif /* !defined(CONFIG_IBM_NEW_EMAC_TAH) */
1416 1412
1417/* Tx lock BHs */ 1413/* Tx lock BHs */
1418static void emac_parse_tx_error(struct emac_instance *dev, u16 ctrl) 1414static void emac_parse_tx_error(struct emac_instance *dev, u16 ctrl)
@@ -2683,13 +2679,8 @@ static int __devinit emac_probe(struct of_device *ofdev,
2683 2679
2684 /* Fill in the driver function table */ 2680 /* Fill in the driver function table */
2685 ndev->open = &emac_open; 2681 ndev->open = &emac_open;
2686#ifdef CONFIG_IBM_NEW_EMAC_TAH 2682 if (dev->tah_dev)
2687 if (dev->tah_dev) {
2688 ndev->hard_start_xmit = &emac_start_xmit_sg;
2689 ndev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; 2683 ndev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
2690 } else
2691#endif
2692 ndev->hard_start_xmit = &emac_start_xmit;
2693 ndev->tx_timeout = &emac_tx_timeout; 2684 ndev->tx_timeout = &emac_tx_timeout;
2694 ndev->watchdog_timeo = 5 * HZ; 2685 ndev->watchdog_timeo = 5 * HZ;
2695 ndev->stop = &emac_close; 2686 ndev->stop = &emac_close;
@@ -2697,8 +2688,11 @@ static int __devinit emac_probe(struct of_device *ofdev,
2697 ndev->set_multicast_list = &emac_set_multicast_list; 2688 ndev->set_multicast_list = &emac_set_multicast_list;
2698 ndev->do_ioctl = &emac_ioctl; 2689 ndev->do_ioctl = &emac_ioctl;
2699 if (emac_phy_supports_gige(dev->phy_mode)) { 2690 if (emac_phy_supports_gige(dev->phy_mode)) {
2691 ndev->hard_start_xmit = &emac_start_xmit_sg;
2700 ndev->change_mtu = &emac_change_mtu; 2692 ndev->change_mtu = &emac_change_mtu;
2701 dev->commac.ops = &emac_commac_sg_ops; 2693 dev->commac.ops = &emac_commac_sg_ops;
2694 } else {
2695 ndev->hard_start_xmit = &emac_start_xmit;
2702 } 2696 }
2703 SET_ETHTOOL_OPS(ndev, &emac_ethtool_ops); 2697 SET_ETHTOOL_OPS(ndev, &emac_ethtool_ops);
2704 2698