On Fri, 15 Nov 2002, Oliver Neukum wrote:

|
| > Yes, I think you are right.
| > To test your idea, I moved the initialization
| >
| >         init_MUTEX(&usb_bus_list_lock);
| >
| > from usb_init() to just before the call to usb_scan_devices()
| > in usb_register() and the oops went away and cpia worked.
| >
| >
| > I see that in the working code prior to 2.4.13, usb_init() doesnt handle
| > any usb_bus_list_lock initialization.  Hmmm.
| >
| > I believe that cpia_usb.c cannot be compiled into the kernel unless
| > usb is also compiled into the kernel.  Is there any way to move the
| > initialization of cpia_usb to later in the boot sequence?
| >
| > Or put some #ifndef module ... #endif code that moves the lock
| > initialization to before the call to usb_scan devices, and tests whether it
| > is done so it is only initialized the first time usb_register  is called?
|
| No, don't do complicated halfmeasures.
| Add a call to usb_init to main.c::do_basic_setup if you compile usb into the kernel.

Yes, I agree.  I had a patch last night that moved the semaphore
init, but then I realized that it was a bad idea.
As Oliver says, the right patch is something like this in init/main.c:

#ifdef CONFIG_USB
        extern usb_init(void);
        usb_init();
#endif

and in drivers/usb/usb.c:

#ifdef MODULE
module_init(usb_init);
#endif


This is the way it used to be many many moons ago.

-- 
~Randy
  "I read part of it all the way through." -- Samuel Goldwyn



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to