Usbnet adds a padding byte if a 0 byte USB packet would be sent. Zero
padding byte if there is tail room in skb.
Signed-of-by: Peter Korsgaard [EMAIL PROTECTED]
Acked-by: David Brownell [EMAIL PROTECTED]
---
drivers/net/usb/usbnet.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6.22-rc6/drivers/net/usb/usbnet.c
===
--- linux-2.6.22-rc6.orig/drivers/net/usb/usbnet.c
+++ linux-2.6.22-rc6/drivers/net/usb/usbnet.c
@@ -953,11 +953,14 @@
/* don't assume the hardware handles USB_ZERO_PACKET
* NOTE: strictly conforming cdc-ether devices should expect
* the ZLP here, but ignore the one-byte packet.
-*
-* FIXME zero that byte, if it doesn't require a new skb.
*/
- if ((length % dev-maxpacket) == 0)
+ if ((length % dev-maxpacket) == 0) {
urb-transfer_buffer_length++;
+ if (skb_tailroom(skb)) {
+ skb-data[skb-len] = 0;
+ __skb_put(skb, 1);
+ }
+ }
spin_lock_irqsave (dev-txq.lock, flags);
--
Bye, Peter Korsgaard
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html