On Thu, Dec 08, 2016 at 05:20:28PM +0900, Jae Joong Kim wrote: > Hi Greg > > I think 'urb->transfer_flags' also has URB_ZERO_PACKET flag to handle > the data is aligned to an endpoint packet boundary. > > How do you think this change? > > diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c > index 5133a07..e5c9261b 100644 > --- a/drivers/usb/usb-skeleton.c > +++ b/drivers/usb/usb-skeleton.c > @@ -432,7 +432,7 @@ static ssize_t skel_write(struct file *file, const > char *user_buffer, > usb_fill_bulk_urb(urb, dev->udev, > usb_sndbulkpipe(dev->udev, > dev->bulk_out_endpointAddr), > buf, writesize, skel_write_bulk_callback, dev); > - urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; > + urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP | URB_ZERO_PACKET; Well, the patch is line-wrapped and whitespace is broken, so it doesn't apply, so of course I don't like the patch :) But, ZERO_PACKET all depends on your device, and what it expects/wants, so you don't always enable it in the flags, otherwise we would have done so in the USB core. So it doesn't make much sense to add this to the skeleton driver as that's not always needed by hardware. Do you have a driver that was based on this skeleton that needed this flag to be added to work properly? Has it been updated in the kernel source tree properly for it? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html