From: Axel Haslam <ahaslam@baylibre.com>
To: gregkh@linuxfoundation.org, nsekhar@ti.com, khilman@baylibre.com,
david@lechnology.com, ptitiano@baylibre.com
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Axel Haslam <ahaslam@baylibre.com>
Subject: [PATCH] USB: ohci: da8xx: Balance ochi_disable with ohci_enable in resume.
Date: Wed, 23 Nov 2016 19:32:02 +0100 [thread overview]
Message-ID: <20161123183202.9246-1-ahaslam@baylibre.com> (raw)
On resume from suspend a failure with -ESHUTDOWN is returned
from ohci_bus_resume, and the usb is inoperable.
This happens because ohci_suspend disables the master interrupt
and sets an hcd flag to say that the hw is no longer accessible.
Calling ohci_resume reverts the steps taken on ohci_suspend
and flags the HW as "accessible" again, resume completes
successfully and usb is working after a suspend/resume sequence.
While we are here, remove setting device power_state,
as this is no longer needed and scheduled for removal.
Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
---
drivers/usb/host/ohci-da8xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index b3de8bc..a598bd8 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -340,8 +340,7 @@ static int ohci_da8xx_resume(struct platform_device *dev)
if (ret)
return ret;
- dev->dev.power.power_state = PMSG_ON;
- usb_hcd_resume_root_hub(hcd);
+ ohci_resume(hcd, false);
return 0;
}
--
2.9.3
next reply other threads:[~2016-11-23 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 18:32 Axel Haslam [this message]
2016-11-23 20:48 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161123183202.9246-1-ahaslam@baylibre.com \
--to=ahaslam@baylibre.com \
--cc=david@lechnology.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=ptitiano@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®