Thread (12 messages) flat view 12 messages, 2 authors, 2020-02-22

Re: [PATCH net 2/4] net: ll_temac: Add more error handling of dma_map_single() calls

From: David Miller <davem@davemloft.net>
Date: 2020-02-19 18:59:57
Also in: linux-arm-kernel, lkml

From: Esben Haabendal <redacted>
Date: Wed, 19 Feb 2020 11:54:00 +0100
quoted hunk ↗ jump to hunk
@@ -863,12 +865,13 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 	skb_dma_addr = dma_map_single(ndev->dev.parent, skb->data,
 				      skb_headlen(skb), DMA_TO_DEVICE);
 	cur_p->len = cpu_to_be32(skb_headlen(skb));
+	if (WARN_ON_ONCE(dma_mapping_error(ndev->dev.parent, skb_dma_addr)))
+		return NETDEV_TX_BUSY;
The appropriate behavior in this situation is to drop the packet and return
NETDEV_TX_OK.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help