Message ID | 570FB998.2080900@boundarydevices.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> I think I've already fixed this, but I've only submitted once. > > commit 466cb4a2e5583d2e18470f30d5948edcf4b947f5 > Author: Troy Kisky <troy.kisky@boundarydevices.com> > Date: Wed Jan 20 12:52:10 2016 -0700 > > net: fec: update dirty_tx even if no skb > > If dirty_tx isn't updated, then dma_unmap_single > will be called twice. > > Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Thanks! This fixed the issue. Have a Tested-by: <holgerschurig@gmail.com>
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 452be9c..150a90a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1243,10 +1243,8 @@ static void fec_txq(struct net_device *ndev, struct fec_enet_priv_tx_q *txq) fec16_to_cpu(bdp->cbd_datlen), DMA_TO_DEVICE); bdp->cbd_bufaddr = cpu_to_fec32(0); - if (!skb) { - bdp = fec_enet_get_nextdesc(bdp, &txq->bd); - continue; - } + if (!skb) + goto skb_done; /* Check for errors. */ if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC | @@ -1285,7 +1283,7 @@ static void fec_txq(struct net_device *ndev, struct fec_enet_priv_tx_q *txq) /* Free the sk buffer associated with this last transmit */ dev_kfree_skb_any(skb); - +skb_done: /* Make sure the update to bdp and tx_skbuff are performed * before dirty_tx */