Re: [PATCH v2 6/9] xhci: Make sure xhci handles USB_SPEED_SUPER_PLUS devices.

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

 



On Thu, Dec 10, 2015 at 09:59:30AM +0200, Mathias Nyman wrote:
> In most cases the devices with the speed set to USB_SPEED_SUPER_PLUS
> are handled like regular SuperSpeed devices.
> 
> Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/host/xhci-mem.c  | 11 ++++++++---
>  drivers/usb/host/xhci-ring.c |  3 ++-
>  drivers/usb/host/xhci.c      |  7 +++++--
>  3 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
> index 5cd080e..1c37988 100644
> --- a/drivers/usb/host/xhci-mem.c
> +++ b/drivers/usb/host/xhci-mem.c
> @@ -1070,7 +1070,7 @@ static u32 xhci_find_real_port_number(struct xhci_hcd *xhci,
>  	struct usb_device *top_dev;
>  	struct usb_hcd *hcd;
>  
> -	if (udev->speed == USB_SPEED_SUPER)
> +	if (udev->speed >= USB_SPEED_SUPER)
>  		hcd = xhci->shared_hcd;
>  	else
>  		hcd = xhci->main_hcd;
> @@ -1105,6 +1105,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
>  	/* 3) Only the control endpoint is valid - one endpoint context */
>  	slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(1) | udev->route);
>  	switch (udev->speed) {
> +	case USB_SPEED_SUPER_PLUS:
>  	case USB_SPEED_SUPER:
>  		slot_ctx->dev_info |= cpu_to_le32(SLOT_SPEED_SS);
>  		max_packets = MAX_PACKET(512);
> @@ -1292,6 +1293,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
>  		}
>  		/* Fall through - SS and HS isoc/int have same decoding */
>  
> +	case USB_SPEED_SUPER_PLUS:
>  	case USB_SPEED_SUPER:
>  		if (usb_endpoint_xfer_int(&ep->desc) ||
>  		    usb_endpoint_xfer_isoc(&ep->desc)) {
> @@ -1332,7 +1334,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
>  static u32 xhci_get_endpoint_mult(struct usb_device *udev,
>  		struct usb_host_endpoint *ep)
>  {
> -	if (udev->speed != USB_SPEED_SUPER ||
> +	if (udev->speed < USB_SPEED_SUPER ||
>  			!usb_endpoint_xfer_isoc(&ep->desc))
>  		return 0;
>  	return ep->ss_ep_comp.bmAttributes;
> @@ -1382,9 +1384,11 @@ static u32 xhci_get_max_esit_payload(struct usb_device *udev,
>  			usb_endpoint_xfer_bulk(&ep->desc))
>  		return 0;
>  
> -	if (udev->speed == USB_SPEED_SUPER)
> +	if (udev->speed >= USB_SPEED_SUPER)
> +	/* MATTU, requires attention in the SSP case */
>  		return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
>  
> +

Odd indentation and extra line added, did you mess something up here?

I'll not apply this patch and stop here in the series.  Can you fix this
up and resend the rest?

thanks,

greg k-h
--
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