diff options
| author | Ingo Molnar <[email protected]> | 2014-07-28 10:03:00 +0200 | 
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2014-07-28 10:03:00 +0200 | 
| commit | ca5bc6cd5de5b53eb8fd6fea39aa3fe2a1e8c3d9 (patch) | |
| tree | 75beaae2d4b6bc654eb28994dd5906d8dcf5ef46 /drivers/usb/core | |
| parent | c1221321b7c25b53204447cff9949a6d5a7ddddc (diff) | |
| parent | d8d28c8f00e84a72e8bee39a85835635417bee49 (diff) | |
Merge branch 'sched/urgent' into sched/core, to merge fixes before applying new changes
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/hub.c | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 21b99b4b4082..0e950ad8cb25 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -889,6 +889,25 @@ static int hub_usb3_port_disable(struct usb_hub *hub, int port1)  	if (!hub_is_superspeed(hub->hdev))  		return -EINVAL; +	ret = hub_port_status(hub, port1, &portstatus, &portchange); +	if (ret < 0) +		return ret; + +	/* +	 * USB controller Advanced Micro Devices, Inc. [AMD] FCH USB XHCI +	 * Controller [1022:7814] will have spurious result making the following +	 * usb 3.0 device hotplugging route to the 2.0 root hub and recognized +	 * as high-speed device if we set the usb 3.0 port link state to +	 * Disabled. Since it's already in USB_SS_PORT_LS_RX_DETECT state, we +	 * check the state here to avoid the bug. +	 */ +	if ((portstatus & USB_PORT_STAT_LINK_STATE) == +				USB_SS_PORT_LS_RX_DETECT) { +		dev_dbg(&hub->ports[port1 - 1]->dev, +			 "Not disabling port; link state is RxDetect\n"); +		return ret; +	} +  	ret = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_SS_DISABLED);  	if (ret)  		return ret; |