On Tuesday 26 June 2007, Peter Korsgaard wrote: > Usbnet adds a padding byte if a 0 byte packet would be sent. Zero > padding byte if there is tail room in skb. > > Signed-of-by: Peter Korsgaard <[EMAIL PROTECTED]> > --- > drivers/net/usb/usbnet.c | 9 ++++++---
drivers/net patches should go to the netdev list .. However, Acked-by: David Brownell <[EMAIL PROTECTED]> > 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 > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel