diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
| -rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index d4782b42401b..03a351300013 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
| @@ -389,12 +389,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
| 389 | netdev_err(ndev, "Tx DMA memory map failed\n"); | 389 | netdev_err(ndev, "Tx DMA memory map failed\n"); |
| 390 | return NETDEV_TX_OK; | 390 | return NETDEV_TX_OK; |
| 391 | } | 391 | } |
| 392 | /* Send it on its way. Tell FEC it's ready, interrupt when done, | ||
| 393 | * it's the last BD of the frame, and to put the CRC on the end. | ||
| 394 | */ | ||
| 395 | status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR | ||
| 396 | | BD_ENET_TX_LAST | BD_ENET_TX_TC); | ||
| 397 | bdp->cbd_sc = status; | ||
| 398 | 392 | ||
| 399 | if (fep->bufdesc_ex) { | 393 | if (fep->bufdesc_ex) { |
| 400 | 394 | ||
| @@ -416,6 +410,13 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
| 416 | } | 410 | } |
| 417 | } | 411 | } |
| 418 | 412 | ||
| 413 | /* Send it on its way. Tell FEC it's ready, interrupt when done, | ||
| 414 | * it's the last BD of the frame, and to put the CRC on the end. | ||
| 415 | */ | ||
| 416 | status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR | ||
| 417 | | BD_ENET_TX_LAST | BD_ENET_TX_TC); | ||
| 418 | bdp->cbd_sc = status; | ||
| 419 | |||
| 419 | bdp_pre = fec_enet_get_prevdesc(bdp, fep); | 420 | bdp_pre = fec_enet_get_prevdesc(bdp, fep); |
| 420 | if ((id_entry->driver_data & FEC_QUIRK_ERR006358) && | 421 | if ((id_entry->driver_data & FEC_QUIRK_ERR006358) && |
| 421 | !(bdp_pre->cbd_sc & BD_ENET_TX_READY)) { | 422 | !(bdp_pre->cbd_sc & BD_ENET_TX_READY)) { |
| @@ -527,13 +528,6 @@ fec_restart(struct net_device *ndev, int duplex) | |||
| 527 | /* Clear any outstanding interrupt. */ | 528 | /* Clear any outstanding interrupt. */ |
| 528 | writel(0xffc00000, fep->hwp + FEC_IEVENT); | 529 | writel(0xffc00000, fep->hwp + FEC_IEVENT); |
| 529 | 530 | ||
| 530 | /* Setup multicast filter. */ | ||
| 531 | set_multicast_list(ndev); | ||
| 532 | #ifndef CONFIG_M5272 | ||
| 533 | writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); | ||
| 534 | writel(0, fep->hwp + FEC_HASH_TABLE_LOW); | ||
| 535 | #endif | ||
| 536 | |||
| 537 | /* Set maximum receive buffer size. */ | 531 | /* Set maximum receive buffer size. */ |
| 538 | writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE); | 532 | writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE); |
| 539 | 533 | ||
| @@ -654,6 +648,13 @@ fec_restart(struct net_device *ndev, int duplex) | |||
| 654 | 648 | ||
| 655 | writel(rcntl, fep->hwp + FEC_R_CNTRL); | 649 | writel(rcntl, fep->hwp + FEC_R_CNTRL); |
| 656 | 650 | ||
| 651 | /* Setup multicast filter. */ | ||
| 652 | set_multicast_list(ndev); | ||
| 653 | #ifndef CONFIG_M5272 | ||
| 654 | writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); | ||
| 655 | writel(0, fep->hwp + FEC_HASH_TABLE_LOW); | ||
| 656 | #endif | ||
| 657 | |||
| 657 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) { | 658 | if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) { |
| 658 | /* enable ENET endian swap */ | 659 | /* enable ENET endian swap */ |
| 659 | ecntl |= (1 << 8); | 660 | ecntl |= (1 << 8); |
| @@ -1778,8 +1779,6 @@ fec_enet_open(struct net_device *ndev) | |||
| 1778 | struct fec_enet_private *fep = netdev_priv(ndev); | 1779 | struct fec_enet_private *fep = netdev_priv(ndev); |
| 1779 | int ret; | 1780 | int ret; |
| 1780 | 1781 | ||
| 1781 | napi_enable(&fep->napi); | ||
| 1782 | |||
| 1783 | /* I should reset the ring buffers here, but I don't yet know | 1782 | /* I should reset the ring buffers here, but I don't yet know |
| 1784 | * a simple way to do that. | 1783 | * a simple way to do that. |
| 1785 | */ | 1784 | */ |
| @@ -1794,6 +1793,8 @@ fec_enet_open(struct net_device *ndev) | |||
| 1794 | fec_enet_free_buffers(ndev); | 1793 | fec_enet_free_buffers(ndev); |
| 1795 | return ret; | 1794 | return ret; |
| 1796 | } | 1795 | } |
| 1796 | |||
| 1797 | napi_enable(&fep->napi); | ||
| 1797 | phy_start(fep->phy_dev); | 1798 | phy_start(fep->phy_dev); |
| 1798 | netif_start_queue(ndev); | 1799 | netif_start_queue(ndev); |
| 1799 | fep->opened = 1; | 1800 | fep->opened = 1; |
