From: Simon Horman <horms+renesas@xxxxxxxxxxxx> Date: Thu, 12 Jan 2017 14:53:37 +0100 > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index 92d7692c840d..3b4d2504285e 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -1508,6 +1508,8 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev) > buffer = PTR_ALIGN(priv->tx_align[q], DPTR_ALIGN) + > entry / NUM_TX_DESC * DPTR_ALIGN; > len = PTR_ALIGN(skb->data, DPTR_ALIGN) - skb->data; > + if (len == 0) > + len = skb->len > 4 ? 4 : skb->len; > memcpy(buffer, skb->data, len); > dma_addr = dma_map_single(ndev->dev.parent, buffer, len, DMA_TO_DEVICE); > if (dma_mapping_error(ndev->dev.parent, dma_addr)) Assume len ends up being skb->len, then the second DMA mapping will be made of zero length. This code needs a bit of TLC.