Re: [PATCH v2 2/4] usb: usbtest: support usb2 extension descriptor test

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

 



On Mon, 28 Oct 2013, Huang Rui wrote:

> In Test 9 of usbtest module, it is used for performing chapter 9 tests N
> times.
> 
> USB2.0 Extension descriptor is one of the generic device-level capbility
> descriptors which added in section 9.6.2.1 of USB 3.0 spec.
> 
> This patch adds to support getting usb2.0 extension descriptor test
> scenario for USB 3.0.
> 
> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
> ---

> +		length = sizeof(*udev->bos->desc);
> +		buf = (char *)dev->buf;
> +		for (i = 0; i < num; i++) {
> +			buf += length;
> +			if (buf >= dev->buf + total)

This should be (buf + sizeof(struct usb_dev_cap_header) > dev->buf + 
total).

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




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

  Powered by Linux