xhci: Make sure xhci handles USB_SPEED_SUPER_PLUS devices.
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@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
8df0d77d8c
commit
0caf6b3345
@@ -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,7 +1384,7 @@ 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)
|
||||
return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
|
||||
|
||||
max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc));
|
||||
@@ -1453,6 +1455,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
|
||||
max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc));
|
||||
max_burst = 0;
|
||||
switch (udev->speed) {
|
||||
case USB_SPEED_SUPER_PLUS:
|
||||
case USB_SPEED_SUPER:
|
||||
/* dig out max burst from ep companion desc */
|
||||
max_burst = ep->ss_ep_comp.bMaxBurst;
|
||||
|
Reference in New Issue
Block a user