Commit 71175225 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

usb: define HCD_USB31 speed option for hosts that support USB 3.1 features

Hosts that support USB 3.1 Enhaned SuperSpeed can set their speed to
HCD_USB31 to let usb core and host drivers know that the controller
supports new USB 3.1 features.

make sure usb core handle HCD_USB31 hosts correctly, for now similar
to HCD_USB3.
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2338b9e4
...@@ -555,6 +555,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) ...@@ -555,6 +555,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
switch (wValue & 0xff00) { switch (wValue & 0xff00) {
case USB_DT_DEVICE << 8: case USB_DT_DEVICE << 8:
switch (hcd->speed) { switch (hcd->speed) {
case HCD_USB31:
case HCD_USB3: case HCD_USB3:
bufp = usb3_rh_dev_descriptor; bufp = usb3_rh_dev_descriptor;
break; break;
...@@ -576,6 +577,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) ...@@ -576,6 +577,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
break; break;
case USB_DT_CONFIG << 8: case USB_DT_CONFIG << 8:
switch (hcd->speed) { switch (hcd->speed) {
case HCD_USB31:
case HCD_USB3: case HCD_USB3:
bufp = ss_rh_config_descriptor; bufp = ss_rh_config_descriptor;
len = sizeof ss_rh_config_descriptor; len = sizeof ss_rh_config_descriptor;
...@@ -2775,6 +2777,7 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2775,6 +2777,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
rhdev->speed = USB_SPEED_WIRELESS; rhdev->speed = USB_SPEED_WIRELESS;
break; break;
case HCD_USB3: case HCD_USB3:
case HCD_USB31:
rhdev->speed = USB_SPEED_SUPER; rhdev->speed = USB_SPEED_SUPER;
break; break;
default: default:
......
...@@ -250,6 +250,7 @@ struct hc_driver { ...@@ -250,6 +250,7 @@ struct hc_driver {
#define HCD_USB2 0x0020 /* USB 2.0 */ #define HCD_USB2 0x0020 /* USB 2.0 */
#define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/ #define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/
#define HCD_USB3 0x0040 /* USB 3.0 */ #define HCD_USB3 0x0040 /* USB 3.0 */
#define HCD_USB31 0x0050 /* USB 3.1 */
#define HCD_MASK 0x0070 #define HCD_MASK 0x0070
#define HCD_BH 0x0100 /* URB complete in BH context */ #define HCD_BH 0x0100 /* URB complete in BH context */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment