Thread (6 messages) flat view 6 messages, 2 authors, 2013-08-05

Re: [PATCH v2 3/4] USBNET: support DMA SG

From: Oliver Neukum <hidden>
Date: 2013-08-05 09:14:33

On Mon, 2013-08-05 at 16:47 +0800, Ming Lei wrote:
quoted hunk ↗ jump to hunk
@@ -1268,10 +1298,14 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
 	entry = (struct skb_data *) skb->cb;
 	entry->urb = urb;
 	entry->dev = dev;
-	entry->length = length;
 
 	usb_fill_bulk_urb (urb, dev->udev, dev->out,
 			skb->data, skb->len, tx_complete, skb);
+	if (dev->can_dma_sg) {
+		if (build_dma_sg(skb, urb) < 0)
+			goto drop;
This is still missing a kfree() for urb->sg in the error case
of usbnet_start_xmit().

	Regards
		Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help