add URB_ZERO_PACKET in transfer_flags for usb-skeleton.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
        usb_anchor_urb(urb, &dev->submitted);

Thanks, jaejoong
--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux