On Fri, 15 Nov 2002, Pete Zaitcev wrote: | > From: "Randy.Dunlap" <[EMAIL PROTECTED]> | > Date: Fri, 15 Nov 2002 08:40:36 -0800 (PST) | | > | > 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? | | > 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. | | VERY many moons ago. Today, the same effect is accomplished by | module_init() without #ifdef bracket. If the module is compiled | into the kernel, do_initcalls does the call there. | | To make cpia initialize later than the USB, the proper configuration | must be used, which prohibits CPIA being 'y' and USB core 'm'. | It can be done without "if", by using dep_tristate as appropriate. | Also, the order in which cpia and usbcore are listed in the Makefile | is significant, it determines the order in which do_initcalls | calls them in case of them being 'y'.
The case is both cpia and usb are 'y'. cpia is being init-ed before usbcore. Where's your patch/solution? 8;) As I said earlier (now deleted), controlling init order in 2.4 is odd. In 2.5 it's much easier, but that doesn't matter for this problem. Mucking around with order in Makefile isn't a good solution IMO. -- ~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