From: Andrew Bresticker <abrestic@chromium.org>
To: Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>
Cc: linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Andrew Bresticker <abrestic@chromium.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH V7 1/9] xhci: Set shared HCD's hcd_priv in xhci_gen_setup
Date: Mon, 27 Apr 2015 15:37:14 -0700 [thread overview]
Message-ID: <1430174242-29465-2-git-send-email-abrestic@chromium.org> (raw)
In-Reply-To: <1430174242-29465-1-git-send-email-abrestic@chromium.org>
xhci_gen_setup() sets the hcd_priv field for the primary HCD, but not
for the shared HCD, requiring xHCI host-controller drivers to set it
between usb_create_shared_hcd() and usb_add_hcd(). There's no reason
xhci_gen_setup() can't set the shared HCD's hcd_priv as well, so move
that bit out of the host-controller drivers and into xhci_gen_setup().
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
No changes from v5/v6.
New for v5.
Peviously posted here: https://lkml.org/lkml/2014/10/30/726
---
drivers/usb/host/xhci-pci.c | 5 -----
drivers/usb/host/xhci-plat.c | 5 -----
drivers/usb/host/xhci.c | 6 +++---
3 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 2af32e2..f9ce741 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -247,11 +247,6 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto dealloc_usb2_hcd;
}
- /* Set the xHCI pointer before xhci_pci_setup() (aka hcd_driver.reset)
- * is called by usb_add_hcd().
- */
- *((struct xhci_hcd **) xhci->shared_hcd->hcd_priv) = xhci;
-
retval = usb_add_hcd(xhci->shared_hcd, dev->irq,
IRQF_SHARED);
if (retval)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 783e819..852b1e9 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -147,11 +147,6 @@ static int xhci_plat_probe(struct platform_device *pdev)
if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
(pdata && pdata->usb3_lpm_capable))
xhci->quirks |= XHCI_LPM_SUPPORT;
- /*
- * Set the xHCI pointer before xhci_plat_setup() (aka hcd_driver.reset)
- * is called by usb_add_hcd().
- */
- *((struct xhci_hcd **) xhci->shared_hcd->hcd_priv) = xhci;
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
xhci->shared_hcd->can_do_streams = 1;
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ec8ac16..2901a67 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4849,9 +4849,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
*/
hcd->has_tt = 1;
} else {
- /* xHCI private pointer was set in xhci_pci_probe for the second
- * registered roothub.
- */
+ xhci = hcd_to_xhci(hcd->primary_hcd);
+ *((struct xhci_hcd **) hcd->hcd_priv) = xhci;
+
return 0;
}
--
2.2.0.rc0.207.ga3a616c
next prev parent reply other threads:[~2015-04-27 22:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 22:37 [PATCH V7 0/9] Tegra xHCI support Andrew Bresticker
2015-04-27 22:37 ` Andrew Bresticker [this message]
[not found] ` <1430174242-29465-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-04-27 22:37 ` [PATCH V7 2/9] mailbox: Make struct mbox_controller's ops field const Andrew Bresticker
[not found] ` <1430174242-29465-3-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-04-28 16:49 ` Suman Anna
2015-04-27 22:37 ` [PATCH V7 3/9] mailbox: Fix up error handling in mbox_request_channel() Andrew Bresticker
2015-04-28 16:42 ` Suman Anna
2015-04-27 22:37 ` [PATCH V7 4/9] mfd: Add binding document for NVIDIA Tegra XUSB Andrew Bresticker
[not found] ` <1430174242-29465-5-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-04-29 9:25 ` Lee Jones
2015-04-29 17:02 ` Andrew Bresticker
[not found] ` <CAL1qeaFh5go_K0GnGXxU7KqjcgCm2kpUL5mVgGSYosPoXAXgpw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-29 18:34 ` Lee Jones
2015-04-29 19:46 ` Andrew Bresticker
[not found] ` <CAL1qeaEt9kGbcCfwqhVzwJxx9DvgOnjfU6C8MCH6t0vqwJK0WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-30 10:06 ` Lee Jones
2015-04-30 16:28 ` Andrew Bresticker
2015-04-27 22:37 ` [PATCH V7 5/9] mfd: Add driver " Andrew Bresticker
2015-04-29 9:23 ` Lee Jones
2015-04-29 17:59 ` Andrew Bresticker
2015-04-29 18:30 ` Lee Jones
2015-04-27 22:37 ` [PATCH V7 6/9] mailbox: Add NVIDIA Tegra XUSB mailbox binding Andrew Bresticker
2015-04-27 22:37 ` [PATCH V7 7/9] mailbox: Add NVIDIA Tegra XUSB mailbox driver Andrew Bresticker
2015-04-27 22:37 ` [PATCH V7 8/9] usb: Add NVIDIA Tegra xHCI controller binding Andrew Bresticker
2015-04-27 22:37 ` [PATCH V7 9/9] usb: xhci: Add NVIDIA Tegra xHCI host-controller driver Andrew Bresticker
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=1430174242-29465-2-git-send-email-abrestic@chromium.org \
--to=abrestic@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.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=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).