lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 18 Jul 2014 17:26:15 +0530
From:	Amit Virdi <amit.virdi@...com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"rdunlap@...radead.org" <rdunlap@...radead.org>,
	"ming.lei@...onical.com" <ming.lei@...onical.com>,
	"hdegoede@...hat.com" <hdegoede@...hat.com>,
	"hsi-ss-sw-devel@...ts.codex.cro.st.com" 
	<hsi-ss-sw-devel@...ts.codex.cro.st.com>
Subject: Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

On 7/17/2014 8:25 PM, Alan Stern wrote:
> I can't say this is actually wrong, but have you ever encountered a
> situation where this would be needed?  How often does anyone need to do
> a multi-packet transfer over an interrupt endpoint?

Honestly, I haven't found any such real device yet. I did this change 
while I was going through the code when adding support for interrupt 
transfers in gadget zero. I'm a no expert, but the spec says it should 
be supported so this code should be added.

However, I messed up a little in this patch. It should have been
---
         case USB_ENDPOINT_XFER_ISOC:
                 allowed |= URB_ISO_ASAP;
                 break;
+       case USB_ENDPOINT_XFER_INT:
+               if (is_out)
+                       allowed |= URB_ZERO_PACKET;
+               else
+                       allowed |= URB_SHORT_NOT_OK;
+               break;
         }
         allowed &= urb->transfer_flags;

---
Otherwise, it sets zero packet flag for control out transfers too.

I'll send a V2 with this change if you agree to setting of the zero 
packet flag for interrupt transfers.

Regards
Amit Virdi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ