public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Arlott <simon@fire.lp0.eu>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Rene Herman <rene.herman@keyaccess.nl>,
	Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org, mingo@elte.hu,
	Daniel Walker <dwalker@mvista.com>,
	USB list <linux-usb@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH RFC] USB: Add HCD fastboot
Date: Wed, 06 Aug 2008 23:53:06 +0100	[thread overview]
Message-ID: <489A2B52.6090605@simon.arlott.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0808061828010.2145-100000@iolanthe.rowland.org>

On 06/08/08 23:34, Alan Stern wrote:
> On Wed, 6 Aug 2008, Simon Arlott wrote:
> 
>> > Doing the HCD initcalls last certainly ought to work.
>> 
>> Right - so then all that's needed is to move usb/ before most other things that 
>> take a while to init, and it has some time to initialise usb devices in the 
>> background.
> 
> Not exactly -- you should move most of usb/ forward so that it comes
> before usb/host/.  Or alternatively move usb/host/ later so that it 
> comes after the rest of usb/.

Well, putting usb/ before net/ etc. requires that usb/host/ is the usb/stuff/ or 
they'll all wait until they can probe for devices.

>> > So what exactly do you recommend?
>> 
>> I'm not an expert on what can be done with the Makefile process, perhaps there's 
>> an easier way to move things around based on a config option. If host init is 
>> moved before device init for everyone, wouldn't there be too many side effects?
> 
> Doesn't the host init _already_ come before device init?  If host init 
> were moved _after_ device init, I don't think there would be a lot of 
> side effects.  But it's hard to be sure without trying it.

Host init is before device init, as that's the Makefile link order. Any device 
init causes it to wait for *all* devices, so swapping them around means devices 
are going to appear at any time after that - there's no device initcall to make 
it block. Presumably it would be possible to have a late_initcall (which would 
be early in that list if usb was earlier) that could ensure khubd had finished 
[its current queue] before continuing - as if there was a device driver initcall?

If someone currently has HCD init compiled in but nothing else, then the boot 
process would block unnecessarily... the initcall would need to be disabled 
in that case to maintain existing behaviour - which is why it probably needs 
to be a config option, which requires some mess in the Makefile or a new 
initcall type.

>> Lack of a keyboard makes it impossible to do anything if the module fails to 
>> load... as I understand it when the HCD init runs, any BIOS emulation stops?
> 
> That's right.  The host driver kicks the BIOS off the hardware.

It seems like there's always going to be a stage where there's no keyboard...

>> Although if HCD is a module too...
>> 
>> >> If even one device driver and the hcd is compiled in, they'd need to 
>> >> wait for every USB device to finish init before the usbhid probe could complete.
>> > 
>> > What if usbhid is the one device driver that is compiled in?  :-)
>> 
>> That was the situation I was thinking of - surely that would be compiled in 
>> if the HCDs were?
> 
> I noticed in your logs earlier that some of your USB drivers were 
> compiled in and others weren't.  Maybe if _all_ of them were compiled 
> in you wouldn't experience as much contention and the init delays would 
> be shorter.

I don't know where you got that from - they're definitely all compiled in. 
Whichever is first to have its initcall run is blocked, and the logs may have 
been from a test of that.

-- 
Simon Arlott

  reply	other threads:[~2008-08-06 22:53 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 15:59 [patch 4/3] fastboot: hold the BKL over the async init call sequence Arjan van de Ven
2008-07-20 16:00 ` [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first Arjan van de Ven
2008-07-20 16:40   ` Ingo Molnar
2008-07-20 21:14   ` Daniel Walker
2008-07-20 21:23     ` Simon Arlott
2008-07-20 21:50     ` Arjan van de Ven
2008-07-29 21:00   ` Rene Herman
2008-07-29 21:04     ` Arjan van de Ven
2008-07-29 21:12       ` Rene Herman
2008-07-29 21:21         ` Arjan van de Ven
2008-07-29 22:30           ` Rene Herman
2008-07-29 22:34             ` Simon Arlott
2008-07-30 14:08               ` Alan Stern
2008-07-30 18:25                 ` Simon Arlott
2008-07-30 19:41                   ` Alan Stern
2008-07-31 11:49                     ` Simon Arlott
2008-07-31 15:34                       ` Alan Stern
2008-07-31 18:29                         ` Simon Arlott
2008-07-31 18:56                           ` Rene Herman
2008-07-31 19:27                             ` Simon Arlott
2008-07-31 19:16                           ` Alan Stern
2008-08-06 18:40                             ` [PATCH RFC] USB: Add HCD fastboot Simon Arlott
2008-08-06 19:11                               ` Alan Stern
2008-08-06 19:20                                 ` Simon Arlott
2008-08-06 19:29                                   ` Greg KH
2008-08-06 19:49                                   ` Alan Stern
2008-08-06 19:56                                     ` Arjan van de Ven
2008-08-06 20:09                                       ` Alan Stern
2008-08-06 20:17                                         ` Arjan van de Ven
2008-08-06 20:27                                           ` Alan Stern
2008-08-06 20:07                                     ` Simon Arlott
2008-08-06 20:26                                       ` Alan Stern
2008-08-06 21:49                                         ` Simon Arlott
2008-08-06 22:34                                           ` Alan Stern
2008-08-06 22:53                                             ` Simon Arlott [this message]
2008-08-07 14:14                                               ` Alan Stern
2008-08-07  3:29                                             ` David Brownell
2008-08-07  9:28                                           ` Emanoil Kotsev
2008-08-07 16:47                                             ` Alan Stern
2008-08-07  3:34                               ` David Brownell
2008-08-08  9:24                               ` Rene Herman
2008-08-08 11:29                                 ` Simon Arlott
2008-08-08 14:30                                   ` Rene Herman
2008-07-31 21:56                           ` [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first Greg KH
2008-07-31 22:12                             ` Simon Arlott
2008-07-31 22:37                               ` Simon Arlott
2008-09-16 22:19                             ` Tim Bird

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=489A2B52.6090605@simon.arlott.org.uk \
    --to=simon@fire.lp0.eu \
    --cc=arjan@infradead.org \
    --cc=dwalker@mvista.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rene.herman@keyaccess.nl \
    --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