From: Andrew Bresticker <abrestic@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Alan Stern <stern@rowland.harvard.edu>,
Julius Werner <jwerner@chromium.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linux-tegra@vger.kernel.org, Andrew Bresticker <abrestic@chromium.org>
Subject: [PATCH 2/4] xhci: Check for XHCI_COMP_MODE_QUIRK when disabling D3cold
Date: Wed, 9 Jul 2014 18:05:48 -0700 [thread overview]
Message-ID: <1404954350-26343-3-git-send-email-abrestic@chromium.org> (raw)
In-Reply-To: <1404954350-26343-1-git-send-email-abrestic@chromium.org>
Instead of calling xhci_compliance_mode_recovery_timer_quirk_check() again
in the PCI suspend path, just check for XHCI_COMP_MODE_QUIRK which will
have been set based on xhci_compliance_mode_recovery_timer_quirk_check()
in xhci_init().
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
drivers/usb/host/xhci-pci.c | 2 +-
drivers/usb/host/xhci.c | 3 ++-
drivers/usb/host/xhci.h | 3 ---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 97648e4..d06ffe7 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -277,7 +277,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
* Systems with the TI redriver that loses port status change events
* need to have the registers polled during D3, so avoid D3cold.
*/
- if (xhci_compliance_mode_recovery_timer_quirk_check())
+ if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
pdev->no_d3cold = true;
return xhci_suspend(xhci);
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 8de75b7..f681087 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -491,7 +491,7 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
* Systems:
* Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820
*/
-bool xhci_compliance_mode_recovery_timer_quirk_check(void)
+static bool xhci_compliance_mode_recovery_timer_quirk_check(void)
{
const char *dmi_product_name, *dmi_sys_vendor;
@@ -4936,6 +4936,7 @@ static const struct hc_driver xhci_hc_driver = {
void xhci_init_driver(struct hc_driver *drv, int (*setup_fn)(struct usb_hcd *))
{
+ BUG_ON(!setup_fn);
*drv = xhci_hc_driver;
drv->reset = setup_fn;
}
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 0d9b2cf..902f55b 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1886,7 +1886,4 @@ struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci,
struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index);
-/* xHCI quirks */
-bool xhci_compliance_mode_recovery_timer_quirk_check(void);
-
#endif /* __LINUX_XHCI_HCD_H */
--
2.0.0.526.g5318336
next prev parent reply other threads:[~2014-07-10 1:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 1:05 [PATCH 0/4] Allow xHCI drivers to be built as separate modules Andrew Bresticker
2014-07-10 1:05 ` [PATCH 1/4] xhci: Introduce xhci_init_driver() Andrew Bresticker
2014-07-10 1:05 ` Andrew Bresticker [this message]
2014-07-10 1:05 ` [PATCH 3/4] xhci: Export symbols used by host-controller drivers Andrew Bresticker
2014-07-10 1:05 ` [PATCH 4/4] xhci: Allow xHCI drivers to be built as separate modules Andrew Bresticker
2014-07-10 18:34 ` Julius Werner
2014-07-14 17:20 ` Andrew Bresticker
2014-07-14 18:36 ` Julius Werner
2014-07-14 18:50 ` Andrew Bresticker
2014-07-21 23:41 ` [PATCH 0/4] " Andrew Bresticker
2014-07-22 2:10 ` Greg Kroah-Hartman
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=1404954350-26343-3-git-send-email-abrestic@chromium.org \
--to=abrestic@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stern@rowland.harvard.edu \
/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®