devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-tegra@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Grant Likely <grant.likely@linaro.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH V5 01/12] xhci: Set shared HCD's hcd_priv in xhci_gen_setup
Date: Mon, 17 Nov 2014 17:04:30 -0600	[thread overview]
Message-ID: <20141117230430.GA9716@saruman> (raw)
In-Reply-To: <1416264102-1323-2-git-send-email-abrestic@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]

On Mon, Nov 17, 2014 at 02:41:31PM -0800, Andrew Bresticker wrote:
> 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>

> ---
> 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 9a69b1f..31025e4 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -221,11 +221,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 3d78b0c..5bc33bc 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -149,11 +149,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 2a5d45b..ae05471 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -4843,9 +4843,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.1.0.rc2.206.gedb03e5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-11-17 23:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 22:41 [PATCH V5 00/12] Tegra xHCI support Andrew Bresticker
2014-11-17 22:41 ` [PATCH V5 01/12] xhci: Set shared HCD's hcd_priv in xhci_gen_setup Andrew Bresticker
2014-11-17 23:04   ` Felipe Balbi [this message]
2014-11-17 22:41 ` [PATCH V5 02/12] mailbox: Make struct mbox_controller's ops field const Andrew Bresticker
     [not found] ` <1416264102-1323-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-11-17 22:41   ` [PATCH V5 03/12] mailbox: Fix up error handling in mbox_request_channel() Andrew Bresticker
2014-11-17 22:41   ` [PATCH V5 04/12] of: Add NVIDIA Tegra XUSB mailbox binding Andrew Bresticker
     [not found]     ` <1416264102-1323-5-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-11-24  9:25       ` Jassi Brar
2014-11-17 22:41   ` [PATCH V5 05/12] mailbox: Add NVIDIA Tegra XUSB mailbox driver Andrew Bresticker
     [not found]     ` <1416264102-1323-6-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-11-24  8:34       ` Jassi Brar
2014-11-24 17:20         ` Andrew Bresticker
2014-11-17 22:41   ` [PATCH V5 06/12] of: Update Tegra XUSB pad controller binding for USB Andrew Bresticker
2014-11-17 22:41   ` [PATCH V5 07/12] pinctrl: tegra-xusb: Add USB PHY support Andrew Bresticker
     [not found]     ` <1416264102-1323-8-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-11-24  9:18       ` Jassi Brar
2014-11-17 22:41   ` [PATCH V5 08/12] of: Add NVIDIA Tegra xHCI controller binding Andrew Bresticker
2014-11-17 22:41   ` [PATCH V5 09/12] usb: xhci: Add NVIDIA Tegra xHCI host-controller driver Andrew Bresticker
     [not found]     ` <1416264102-1323-10-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-11-17 23:12       ` Felipe Balbi
2014-11-17 23:51         ` Andrew Bresticker
     [not found]           ` <CAL1qeaG1=g39gsRHPrmCTBFbn3XQmW_2N7rm7uWa=-xOzDiDHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-18  0:33             ` Felipe Balbi
2014-11-18 17:12               ` Andrew Bresticker
2014-11-17 22:41   ` [PATCH V5 11/12] ARM: tegra: jetson-tk1: Add xHCI support Andrew Bresticker
2014-11-17 22:41 ` [PATCH V5 10/12] ARM: tegra: Add Tegra124 XUSB mailbox and xHCI controller Andrew Bresticker
2014-11-17 22:41 ` [PATCH V5 12/12] ARM: tegra: venice2: Add xHCI support 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=20141117230430.GA9716@saruman \
    --to=balbi@ti.com \
    --cc=abrestic@chromium.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jassisinghbrar@gmail.com \
    --cc=kishon@ti.com \
    --cc=linus.walleij@linaro.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=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --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).