diff options
Diffstat (limited to 'drivers/net/fec_mpc52xx.c')
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index a8a0ee220da6..f91ee700e605 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -422,7 +422,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id) | |||
422 | 422 | ||
423 | rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status, | 423 | rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status, |
424 | (struct bcom_bd **)&bd); | 424 | (struct bcom_bd **)&bd); |
425 | dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_FROM_DEVICE); | 425 | dma_unmap_single(&dev->dev, bd->skb_pa, rskb->len, DMA_FROM_DEVICE); |
426 | 426 | ||
427 | /* Test for errors in received frame */ | 427 | /* Test for errors in received frame */ |
428 | if (status & BCOM_FEC_RX_BD_ERRORS) { | 428 | if (status & BCOM_FEC_RX_BD_ERRORS) { |
@@ -467,7 +467,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id) | |||
467 | bcom_prepare_next_buffer(priv->rx_dmatsk); | 467 | bcom_prepare_next_buffer(priv->rx_dmatsk); |
468 | 468 | ||
469 | bd->status = FEC_RX_BUFFER_SIZE; | 469 | bd->status = FEC_RX_BUFFER_SIZE; |
470 | bd->skb_pa = dma_map_single(&dev->dev, rskb->data, | 470 | bd->skb_pa = dma_map_single(&dev->dev, skb->data, |
471 | FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE); | 471 | FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE); |
472 | 472 | ||
473 | bcom_submit_next_buffer(priv->rx_dmatsk, skb); | 473 | bcom_submit_next_buffer(priv->rx_dmatsk, skb); |
@@ -568,8 +568,9 @@ static void mpc52xx_fec_reset_stats(struct net_device *dev) | |||
568 | struct mpc52xx_fec __iomem *fec = priv->fec; | 568 | struct mpc52xx_fec __iomem *fec = priv->fec; |
569 | 569 | ||
570 | out_be32(&fec->mib_control, FEC_MIB_DISABLE); | 570 | out_be32(&fec->mib_control, FEC_MIB_DISABLE); |
571 | memset_io(&fec->rmon_t_drop, 0, (__force u32)&fec->reserved10 - | 571 | memset_io(&fec->rmon_t_drop, 0, |
572 | (__force u32)&fec->rmon_t_drop); | 572 | offsetof(struct mpc52xx_fec, reserved10) - |
573 | offsetof(struct mpc52xx_fec, rmon_t_drop)); | ||
573 | out_be32(&fec->mib_control, 0); | 574 | out_be32(&fec->mib_control, 0); |
574 | 575 | ||
575 | memset(&dev->stats, 0, sizeof(dev->stats)); | 576 | memset(&dev->stats, 0, sizeof(dev->stats)); |
@@ -971,6 +972,8 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
971 | 972 | ||
972 | mpc52xx_fec_reset_stats(ndev); | 973 | mpc52xx_fec_reset_stats(ndev); |
973 | 974 | ||
975 | SET_NETDEV_DEV(ndev, &op->dev); | ||
976 | |||
974 | /* Register the new network device */ | 977 | /* Register the new network device */ |
975 | rv = register_netdev(ndev); | 978 | rv = register_netdev(ndev); |
976 | if (rv < 0) | 979 | if (rv < 0) |