Skip to contentSkip to conversation

Patch "usb: ohci-at91: Do not drop unhandled USB suspend control requests" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 15, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: ohci-at91: Do not drop unhandled USB suspend control requests

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-ohci-at91-do-not-drop-unhandled-usb-suspend-control-requests.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 85550f9148a852ed363a386577ad31b97b95dfb8 Mon Sep 17 00:00:00 2001

From: Jelle Martijn Kok <[email protected]>
Date: Tue, 21 Feb 2017 12:48:18 +0100
Subject: usb: ohci-at91: Do not drop unhandled USB suspend control requests

From: Jelle Martijn Kok <[email protected]>

commit 85550f9148a852ed363a386577ad31b97b95dfb8 upstream.

In patch 2e2aa1bc7eff90ecm, USB suspend and wakeup control requests are passed to SFR_OHCIICR register. If a processor does not have such a register, this hub control request will be dropped.

If no such a SFR register is available, all USB suspend control requests will now be processed using ohci_hub_control()
(like before patch 2e2aa1bc7eff90ecm.)

Tested on an Atmel AT91SAM9G20 with an on-board TI TUSB2046B hub chip If the last USB device is unplugged from the USB hub, the hub goes into sleep and will not wakeup when an USB devices is inserted.

Fixes 2e2aa1bc7eff90ec ("usb: ohci-at91: Forcibly suspend ports while USB suspend")
Cc Wenyou Yang <[email protected]>
Cc Alan Stern <[email protected]>
---
 drivers/usb/host/ohci-at91.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ohci-at91.c +2 -2
@@ -361,7 +361,7 @@ static int ohci_at91_hub_control(struct
 
 		case USB_PORT_FEAT_SUSPEND:
 			dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n");
-			if (valid_port(wIndex)) {
+			if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
 				ohci_at91_port_suspend(ohci_at91->sfr_regmap,
 						       1);
 				return 0;
@@ -404,7 +404,7 @@ static int ohci_at91_hub_control(struct
 
 		case USB_PORT_FEAT_SUSPEND:
 			dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n");
-			if (valid_port(wIndex)) {
+			if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
 				ohci_at91_port_suspend(ohci_at91->sfr_regmap,
 						       0);
 				return 0;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/usb-ohci-at91-do-not-drop-unhandled-usb-suspend-control-requests.patch