Hi,

[moving thread to linux-usb; was linux-usb-devel]

I'm willing to take a guess at this if you are
willing to modify a little source code to test it.

I think that this isn't a host controller driver-specific issue.
It's more likely a larger init-order issue.

Background:

In linux/init/main.c, usb_init() is called after some
other bus init functions (like pci, isapnp, nubus, mca,
sbus, ppc).  However, usb_init() is called BEFORE
sock_init and BEFORE anything to do with filesystems.

Soon after sock_init() returns, there is a call to
do_initcalls().  Most USB drivers that are built
in-kernel initialize by having their init functions
tagged as __initcall (by module_init()) and they
are init-ed by the do_initcalls() function.

>From what you say, I don't think that the pegasus_init() is
happening too late, but maybe the uhci_init() calls is happening
too late.  To force all of usb/uhci/pegasus to init earlier,
I would do this (but I can't test it; no usb-ethernet devices):

a.  Change pegasus.c not to use module_init() and module_exit().
    Use plusb.c (at the very end of the source file) as an
    example.

b.  In usb-core.c, add a conditional call to pegasus_init() to
    init the pegasus driver [after plusb_init()].

c.  In linux/init/main.c, move the call to usb_init() immediately
    after pci_init().  [PCI init is needed for USB init.]

This should force all of USB to be initialized earlier.
Let us know if that helps.

~Randy

> -----Original Message-----
> From: Von Handorf, Benjamin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 25, 2000 7:11 AM
> To: [EMAIL PROTECTED]
> Subject: [linux-usb-devel] USB NICs and NFS Root
> 
> Hi,
> 
> I am trying to use your pegasus driver on a machine with no 
> hard disk and no
> other network cards to mount / over NFS.  I believe there is 
> an issue with
> the order in which drivers are initialized.  The NFS-Root 
> driver seems to
> try and mount / before the pegasus has recognized the Linksys network
> adapter.  If I put a ISA or PCI network card into the 
> machine, it recognizes
> it before NFS-Root tries to load and it works fine.
> 
> What seems to happen is this:
> First the USB subsystem initializes (hub.c, usb-uhci.c, etc)
> (other immaterial stuff)
> Then other network drivers (3c509, 3c9XX) load and recognize 
> any appropriate cards
> Then the pegasus driver loads, but it does NOT detect the Linksys yet
> IP Configuration happens (this will fail with no network cards)
> NFS Root tries to load (also fails without network cards, obviously)
> THEN usb.c reports a new device connected and the eth1 is 
> assigned to the Linksys
> 
> Can you give me any direction in fixing this?  I have little 
> experience with
> kernel hacking (although I like to think I'm a capable C 
> programmer, but
> that's probably just delusion :-) ) and no experience with the USB
> subsystem.  Is there something I have to do to make the uhci 
> driver scan the
> bus as soon as a driver loads?  Perhaps a kernel parameter 
> that will force this non-standard behavior?
> 
> BTW: The alternate UHCI driver seems to do things in the same order.
> 
> TIA,
> Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to