summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorAmit Virdi <amit.virdi@st.com>2014-07-21 10:46:18 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-22 16:30:58 -0700
commit9672f0feb566423deb245032a1c9a7a14dacb6eb (patch)
tree8524beac8a2737efb47527ed06e1e43955d13e3d /drivers/usb/core
parentb1bd3f1a398ef27dd09a594c38dde34472b453af (diff)
usb: core: allow zero packet flag for interrupt urbs
Section 4.4.7.2 "Interrupt Transfer Bandwidth Requirements" of the USB3.0 spec says: A zero-length data payload is a valid transfer and may be useful for some implementations. So, extend the logic of allowing URB_ZERO_PACKET to interrupt urbs too. Otherwise, the kernel throws warning of BOGUS transfer flags. Signed-off-by: Amit Virdi <amit.virdi@st.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/urb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 991386ceb4e..c9e8ee81b6b 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -454,6 +454,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
URB_FREE_BUFFER);
switch (xfertype) {
case USB_ENDPOINT_XFER_BULK:
+ case USB_ENDPOINT_XFER_INT:
if (is_out)
allowed |= URB_ZERO_PACKET;
/* FALLTHROUGH */