RE: [PATCH 1/5] USB: Add parsing of SuperSpeed endpoint companion descriptor.

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

 



> -----Original Message-----
> From: Sarah Sharp [mailto:sarah.a.sharp@xxxxxxxxxxxxxxx]
> Sent: Saturday, April 03, 2010 3:34 AM
> To: Greg KH
> Cc: linux-usb@xxxxxxxxxxxxxxx; usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx;
> Hrant Dalalyan; Alan Stern; Paul Zimmerman; Ashot Madatyan
> Subject: [PATCH 1/5] USB: Add parsing of SuperSpeed endpoint companion
> descriptor.
> 
> Allow the xHCI drivers (and any new USB 3.0 drivers) to parse the
> SuperSpeed endpoint companion descriptor to find the maximum number of
> bulk endpoint streams the endpoint supports.  This is used to calculate
> the maximum total number of streams the driver can allocate.
While implementing the pipe usage descriptors support, I got several
issues listed below.
First is the contradiction between UASP latest spec and USB3.0 spec.
UASP spec says that pipe usage descriptor is the first descriptor
following each endpoint descriptor, while USB3.0 says that superspeed
endpoint companion descriptor shall immediately follow the endpoint
descriptor. But because USB3.0 has highest priority I decided to place
superspeed endpoint companion descriptor after endpoint descriptor,
and pipe usage descriptor after superspeed endpoint companion descriptor.
And here I got the next issue. usbcore driver stores the pipe usage
descriptor raw data in the extra field of usb_host_ss_ep_comp structure,
but per my understanding the raw data should be stored in the extra field
of usb_host_endpoint structure. When the descriptors are ordered as follows
(endpoint descriptor -> pipe usage descriptor -> superspeed endpoint
companion descriptor), the usbcore driver stores the pipe usage descriptor
raw data in the extra field of the usb_host_endpoint descriptor, but that
order contradicts the USB3.0 spec.

Sarah, presuming the USB3.0 spec's higher priority, wouldn't that be
better to change the way the usbcore handles the descriptors?
> 
> Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
> ---
>  include/linux/usb/ch9.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
> index e58369f..603b61a 100644
> --- a/include/linux/usb/ch9.h
> +++ b/include/linux/usb/ch9.h
> @@ -556,6 +556,8 @@ struct usb_ss_ep_comp_descriptor {
>  } __attribute__ ((packed));
> 
>  #define USB_DT_SS_EP_COMP_SIZE		6
> +/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
> +#define USB_SS_MAX_STREAMS(p)		(1 << (p & 0x1f))
> 
>  /*--------------------------------------------------------------------
> -----*/
> 
> --
> 1.6.3.3

Thanks,
Hrant.
--
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