From: Greg KH <greg@kroah.com>
To: Pavankumar Kondeti <pkondeti@codeaurora.org>
Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RFC 5/5] USB: Eliminate delays involved in root hub initialization during HNP
Date: Wed, 15 Dec 2010 13:52:03 -0800 [thread overview]
Message-ID: <20101215215203.GA9217@kroah.com> (raw)
In-Reply-To: <1292411654-21382-6-git-send-email-pkondeti@codeaurora.org>
On Wed, Dec 15, 2010 at 04:44:14PM +0530, Pavankumar Kondeti wrote:
> Some USB controllers have common resources (IRQ, register address
> space) for Host, Peripheral and OTG. So HCD is added only before
> entering into Host mode. Root hub initialization is done in
> different steps to decrease boot up time. But this makes B-device
> difficult to meet HNP timings. Hence eliminate delays involved in
> root hub initialization for B-host.
>
> This patch also marks hnp_supported flag TURE for B-host while
> registering the bus.
>
> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
> ---
> drivers/usb/core/hcd.c | 4 ++++
> drivers/usb/core/hub.c | 13 +++++++++++++
> 2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index 6bffd50..a180a0f 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -902,6 +902,10 @@ static int usb_register_bus(struct usb_bus *bus)
> list_add (&bus->bus_list, &usb_bus_list);
> mutex_unlock(&usb_bus_list_lock);
>
> +#ifdef CONFIG_USB_OTG
> + if (bus->is_b_host)
> + bus->hnp_support = 1;
> +#endif
> usb_notify_add_bus(bus);
>
> dev_info (bus->controller, "new USB bus registered, assigned bus "
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index 60705a1..48fb83d 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -706,6 +706,10 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> */
> if (type == HUB_INIT) {
> delay = hub_power_on(hub, false);
> +#ifdef CONFIG_USB_OTG
> + if (hdev->bus->is_b_host)
> + goto init2;
> +#endif
Never have #ifdefs in .c code, that is totally unacceptable and
unworkable for stuff like this.
Come on, you know better than this...
thanks,
greg k-h
next prev parent reply other threads:[~2010-12-15 21:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 11:14 [RFC 0/5] USB core changes for supporting OTG on MSM SoC Pavankumar Kondeti
2010-12-15 11:14 ` [RFC 1/5] USB: core: Add input prompt and help text for USB_OTG config Pavankumar Kondeti
2010-12-15 12:35 ` Sergei Shtylyov
2010-12-15 21:52 ` Greg KH
2010-12-16 8:53 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 2/5] USB: core: OTG Supplement Revision 2.0 updates Pavankumar Kondeti
2010-12-15 12:16 ` Felipe Balbi
2010-12-15 21:39 ` Alan Stern
2010-12-16 8:10 ` Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-16 9:11 ` Felipe Balbi
2010-12-15 21:29 ` Alan Stern
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 21:53 ` Greg KH
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 3/5] USB: gadget: OTG supplement revision " Pavankumar Kondeti
2010-12-15 12:18 ` Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 4/5] USB: EHCI: Notify HCD about HNP enabled port suspend Pavankumar Kondeti
2010-12-15 12:19 ` Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 5/5] USB: Eliminate delays involved in root hub initialization during HNP Pavankumar Kondeti
2010-12-15 12:21 ` Felipe Balbi
2010-12-16 11:26 ` Pavan Kondeti
2010-12-16 12:15 ` Felipe Balbi
2010-12-16 12:53 ` Pavan Kondeti
2010-12-15 21:52 ` Greg KH [this message]
2010-12-15 21:38 ` [RFC 0/5] USB core changes for supporting OTG on MSM SoC Alan Stern
2010-12-16 8:55 ` Pavan Kondeti
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=20101215215203.GA9217@kroah.com \
--to=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pkondeti@codeaurora.org \
/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).