usb: xhci: fix build error for USB_SPEED_SUPER_PLUS
Subsystems (2)
PATCH 1/1 usb: xhci: fix build error for USB_SPEED_SUPER_PLUS
A recent patch introduced support for superspeed plus (USB3.1), but that caused a new gcc warning in the XHCI code:
usb/host/xhci.c: In function 'xhci_drop_ep_from_interval_table':usb/host/xhci.c:2440:2: error: enumeration value 'USB_SPEED_SUPER_PLUS' not handled in switch [-Werror=switch]
This changes the XHCI driver to handle USB_SPEED_SUPER_PLUS the same way as USB_SPEED_SUPER in the xhci_drop_ep_from_interval_table and xhci_add_ep_to_interval_table functions, explicitly ignoring it.
---
Found on ARM randconfig builds last week
drivers/usb/host/xhci.c +2 -0
@@ -2448,6 +2448,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE ] -=1 ;break ;case USB_SPEED_SUPER : +case USB_SPEED_SUPER_PLUS :case USB_SPEED_UNKNOWN :case USB_SPEED_WIRELESS :/* Should never happen because only LS/FS/HS endpoints will get
@@ -2507,6 +2508,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE ] +=1 ;break ;case USB_SPEED_SUPER : +case USB_SPEED_SUPER_PLUS :case USB_SPEED_UNKNOWN :case USB_SPEED_WIRELESS :/* Should never happen because only LS/FS/HS endpoints will get
Quoted 11 lines · Arnd Bergmann
A recent patch introduced support for superspeed plus (USB3.1), but that caused a new gcc warning in the XHCI code:
usb/host/xhci.c: In function 'xhci_drop_ep_from_interval_table':usb/host/xhci.c:2440:2: error: enumeration value 'USB_SPEED_SUPER_PLUS' not handled in switch [-Werror=switch]This changes the XHCI driver to handle
USB_SPEED_SUPER_PLUSthe same way asUSB_SPEED_SUPERin thexhci_drop_ep_from_interval_tableandxhci_add_ep_to_interval_tablefunctions, explicitly ignoring it.
The original series that added USB_SPEED_SUPER_PLUS to both core and xhci was only partly accepted. The core part was applied, the rest was asked to be resubmitted.
Second part is still waiting to be applied.
http://www.spinics.net/lists/linux-usb/msg135493.html
-Mathias