Re: [PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

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

 



Hi,

John Youn <johnyoun@xxxxxxxxxxxx> writes:
> Set the reserved fields of the SuperSpeed Plus Device Capability
> descriptor to 0. Otherwise there might be stale data there which will
> cause USB CV to fail.
>
> Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor")
> Signed-off-by: John Youn <johnyoun@xxxxxxxxxxxx>
> ---
>
> v2:
> * Use cpu_to_le16() to set wReserved
> * Correct Felipe's email address
>
>  drivers/usb/gadget/composite.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
> index de9ffd6..556c78f 100644
> --- a/drivers/usb/gadget/composite.c
> +++ b/drivers/usb/gadget/composite.c
> @@ -651,6 +651,8 @@ static int bos_desc(struct usb_composite_dev *cdev)
>  		ssp_cap->bLength = USB_DT_USB_SSP_CAP_SIZE(1);
>  		ssp_cap->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
>  		ssp_cap->bDevCapabilityType = USB_SSP_CAP_TYPE;
> +		ssp_cap->bReserved = 0;
> +		ssp_cap->wReserved = cpu_to_le16(0);

fixing endianness of 0 is kinda pointless, right ?

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux