From: Jon Hunter <jonathanh@nvidia.com>
To: Jim Lin <jilin@nvidia.com>,
thierry.reding@gmail.com, gregkh@linuxfoundation.org
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v7 1/3] xhci: Add hub_control to xhci_driver_overrides
Date: Fri, 11 Nov 2022 14:39:20 +0000 [thread overview]
Message-ID: <0cc025f5-0e1a-3666-9c39-3d09a37cea2d@nvidia.com> (raw)
In-Reply-To: <20221111101813.32482-2-jilin@nvidia.com>
On 11/11/2022 10:18, Jim Lin wrote:
> Add a hub_control() callback to the xhci_driver_overrides structure to
> allow host drivers to override the default hub_control function. This
> is required for Tegra which requires device specific actions for power
> management to be executed during USB state transitions.
>
> Signed-off-by: Jim Lin <jilin@nvidia.com>
>
> ---
> v5: new change
> v6: adjust parameter alignment (xhci.h hub_control)
> v7: change commit message
>
> drivers/usb/host/xhci.c | 2 ++
> drivers/usb/host/xhci.h | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 902f410874e8..3c7bf0a0e0b4 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -5461,6 +5461,8 @@ void xhci_init_driver(struct hc_driver *drv,
> drv->check_bandwidth = over->check_bandwidth;
> if (over->reset_bandwidth)
> drv->reset_bandwidth = over->reset_bandwidth;
> + if (over->hub_control)
> + drv->hub_control = over->hub_control;
> }
> }
> EXPORT_SYMBOL_GPL(xhci_init_driver);
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index 5a75fe563123..f51b674fc10c 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1943,6 +1943,8 @@ struct xhci_driver_overrides {
> struct usb_host_endpoint *ep);
> int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
> void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
> + int (*hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
> + u16 wIndex, char *buf, u16 wLength);
> };
>
> #define XHCI_CFC_DELAY 10
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Thanks
Jon
--
nvpublic
next prev parent reply other threads:[~2022-11-11 14:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 10:18 [PATCH v7 0/3] xhci: tegra: USB2 pad power controls Jim Lin
2022-11-11 10:18 ` [PATCH v7 1/3] xhci: Add hub_control to xhci_driver_overrides Jim Lin
2022-11-11 14:39 ` Jon Hunter [this message]
2022-11-17 22:29 ` Thierry Reding
2022-11-11 10:18 ` [PATCH v7 2/3] xhci: hub: export symbol on xhci_hub_control Jim Lin
2022-11-11 14:39 ` Jon Hunter
2022-11-17 22:30 ` Thierry Reding
2022-11-11 10:18 ` [PATCH v7 3/3] xhci: tegra: USB2 pad power controls Jim Lin
2022-11-11 14:42 ` Jon Hunter
2022-11-17 22:30 ` Thierry Reding
2023-01-06 14:56 ` [PATCH v7 0/3] " Jon Hunter
2023-01-06 15:25 ` Greg KH
2023-01-09 8:28 ` Mathias Nyman
2023-01-16 11:50 ` Jon Hunter
2023-01-16 12:23 ` Greg KH
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=0cc025f5-0e1a-3666-9c39-3d09a37cea2d@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=jilin@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--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
all inboxes | Powered by JetHome®