diff options
-rw-r--r-- | drivers/usb/core/hcd.c | 7 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 3ba27118adc5..a0adcac3da08 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -507,7 +507,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) | |||
507 | case DeviceRequest | USB_REQ_GET_DESCRIPTOR: | 507 | case DeviceRequest | USB_REQ_GET_DESCRIPTOR: |
508 | switch (wValue & 0xff00) { | 508 | switch (wValue & 0xff00) { |
509 | case USB_DT_DEVICE << 8: | 509 | case USB_DT_DEVICE << 8: |
510 | switch (hcd->driver->flags & HCD_MASK) { | 510 | switch (hcd->speed) { |
511 | case HCD_USB3: | 511 | case HCD_USB3: |
512 | bufp = usb3_rh_dev_descriptor; | 512 | bufp = usb3_rh_dev_descriptor; |
513 | break; | 513 | break; |
@@ -525,7 +525,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) | |||
525 | patch_protocol = 1; | 525 | patch_protocol = 1; |
526 | break; | 526 | break; |
527 | case USB_DT_CONFIG << 8: | 527 | case USB_DT_CONFIG << 8: |
528 | switch (hcd->driver->flags & HCD_MASK) { | 528 | switch (hcd->speed) { |
529 | case HCD_USB3: | 529 | case HCD_USB3: |
530 | bufp = ss_rh_config_descriptor; | 530 | bufp = ss_rh_config_descriptor; |
531 | len = sizeof ss_rh_config_descriptor; | 531 | len = sizeof ss_rh_config_descriptor; |
@@ -2216,6 +2216,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver, | |||
2216 | #endif | 2216 | #endif |
2217 | 2217 | ||
2218 | hcd->driver = driver; | 2218 | hcd->driver = driver; |
2219 | hcd->speed = driver->flags & HCD_MASK; | ||
2219 | hcd->product_desc = (driver->product_desc) ? driver->product_desc : | 2220 | hcd->product_desc = (driver->product_desc) ? driver->product_desc : |
2220 | "USB Host Controller"; | 2221 | "USB Host Controller"; |
2221 | return hcd; | 2222 | return hcd; |
@@ -2325,7 +2326,7 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
2325 | } | 2326 | } |
2326 | hcd->self.root_hub = rhdev; | 2327 | hcd->self.root_hub = rhdev; |
2327 | 2328 | ||
2328 | switch (hcd->driver->flags & HCD_MASK) { | 2329 | switch (hcd->speed) { |
2329 | case HCD_USB11: | 2330 | case HCD_USB11: |
2330 | rhdev->speed = USB_SPEED_FULL; | 2331 | rhdev->speed = USB_SPEED_FULL; |
2331 | break; | 2332 | break; |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 836aaa91ee15..b8bb6934f30b 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -76,6 +76,10 @@ struct usb_hcd { | |||
76 | struct kref kref; /* reference counter */ | 76 | struct kref kref; /* reference counter */ |
77 | 77 | ||
78 | const char *product_desc; /* product/vendor string */ | 78 | const char *product_desc; /* product/vendor string */ |
79 | int speed; /* Speed for this roothub. | ||
80 | * May be different from | ||
81 | * hcd->driver->flags & HCD_MASK | ||
82 | */ | ||
79 | char irq_descr[24]; /* driver + bus # */ | 83 | char irq_descr[24]; /* driver + bus # */ |
80 | 84 | ||
81 | struct timer_list rh_timer; /* drives root-hub polling */ | 85 | struct timer_list rh_timer; /* drives root-hub polling */ |