On Mon, 28 Oct 2013, Huang Rui wrote: > Hi all, > > The following patches implement Binary Device Object Store (BOS) descriptor > set tests in section 9.6.2 of USB 3.0 SPEC. At current usbtest module, it > only supports USB 2.0 chapter 9 tests, so this updates extend the testing > scope to cover the USB 3.0 new descriptors. > > Changes from v1 -> v2: > - Update bcdUSB >= 0x0300 to support USB 3.1 in Patch 1. > - Add "if total > TBUF_SIZE" to avoid buffer overflow. > - Add local pointer "buf" to avoid change dev->buf. > - Add "if buf >= dev->buf + total" to avoid to lie beyond the end of the > dev->buf. > - Add "if buf + USB_DT_..._SIZE > dev->buf + total" to make "header" > pointer always available. > > Changes from v2 -> v3: > - Update "if buf + sizeof(struct usb_dev_cap_header) > dev->buf + total" to > make "buf" pointer always available. > > Thanks, > Rui > > Huang Rui (4): > usb: usbtest: support bos descriptor test for usb 3.0 > usb: usbtest: support usb2 extension descriptor test > usb: usbtest: support superspeed device capbility descriptor test > usb: usbtest: support container id descriptor test > > drivers/usb/misc/usbtest.c | 154 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 154 insertions(+) These patches look okay now. Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> If we ever come across a device whose extension descriptors take up more than 256 bytes, the code will have to be revised. For now, it should be good. Alan Stern -- 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