* module loading order
@ 2011-05-11 8:00 Simon Leung
2011-05-11 13:41 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Simon Leung @ 2011-05-11 8:00 UTC (permalink / raw)
To: kernelnewbies
Hi all,
This is a question that arose from a older kernel ( 2.6.21 ) but I think
it's generic to all kernels. Actually this might not a question on the
kernel itself at all. So here it goes,
I'm using a USB 3G modem with this kernel. The system loads three
modules for it: pl2303, option and usbserial. Problem is, it looks like
the order or loading is different ( I'm judging this by the order they
appear in lsmod output):
Sometimes, lsmod says:
pl2303 18628 0
option 9664 0
usbserial 28296 2 pl2303,option
And sometimes, it says:
option 9664 0
pl2303 18628 0
usbserial 28296 2 option,pl2303
Problem is, if option is before pl2303, the device won't work properly.
So my question is: who decides which is loaded first, or, why does lsmod
give different order?
Thanks a lot!
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-11 8:00 Simon Leung
@ 2011-05-11 13:41 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2011-05-11 13:41 UTC (permalink / raw)
To: kernelnewbies
On Wed, May 11, 2011 at 09:00:30AM +0100, Simon Leung wrote:
> Hi all,
>
> This is a question that arose from a older kernel ( 2.6.21 ) but I think
> it's generic to all kernels. Actually this might not a question on the
> kernel itself at all. So here it goes,
>
> I'm using a USB 3G modem with this kernel. The system loads three
> modules for it: pl2303, option and usbserial. Problem is, it looks like
> the order or loading is different ( I'm judging this by the order they
> appear in lsmod output):
>
> Sometimes, lsmod says:
> pl2303 18628 0
> option 9664 0
> usbserial 28296 2 pl2303,option
>
> And sometimes, it says:
> option 9664 0
> pl2303 18628 0
> usbserial 28296 2 option,pl2303
>
> Problem is, if option is before pl2303, the device won't work properly.
> So my question is: who decides which is loaded first, or, why does lsmod
> give different order?
It's random and there is no way to specify the order unless you make one
module a dependancy of the other.
And for these modules, they should not be dependant on each other, so
you can't do that.
To fix this, you need to add a quirk to keep the option module from
binding to the device, please send the information to the
linux-usb at vger.kernel.org about this device and we will fix the drivers.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
@ 2011-05-11 16:08 Vikram Narayanan
2011-05-11 16:14 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Vikram Narayanan @ 2011-05-11 16:08 UTC (permalink / raw)
To: kernelnewbies
>> This is a question that arose from a older kernel ( 2.6.21 ) but I think
>> it's generic to all kernels. Actually this might not a question on the
>> kernel itself at all. So here it goes,
>>
>> I'm using a USB 3G modem with this kernel. The system loads three
>> modules for it: pl2303, option and usbserial. Problem is, it looks like
>> the order or loading is different ( I'm judging this by the order they
>> appear in lsmod output):
>>
>> Sometimes, lsmod says:
>> pl2303 ? ? ? ? ? ? ? ? 18628 ?0
>> option ? ? ? ? ? ? ? ? ?9664 ?0
>> usbserial ? ? ? ? ? ? ?28296 ?2 pl2303,option
>>
>> And sometimes, it says:
>> option ? ? ? ? ? ? ? ? ?9664 ?0
>> pl2303 ? ? ? ? ? ? ? ? 18628 ?0
>> usbserial ? ? ? ? ? ? ?28296 ?2 option,pl2303
>>
>> Problem is, if option is before pl2303, the device won't work properly.
>> So my question is: who decides which is loaded first, or, why does lsmod
>> give different order?
>
> It's random and there is no way to specify the order unless you make one
> module a dependancy of the other.
Isn't modules.dep file take care of this?
> And for these modules, they should not be dependant on each other, so
> you can't do that.
It does I guess. In my system, the modules.dep has,
kernel/drivers/usb/serial/pl2303.ko: kernel/drivers/usb/serial/usbserial.ko
Doesn't it mean that pl2303 is dependent on usbserial?
-
Thanks,
Vikram
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-11 16:08 module loading order Vikram Narayanan
@ 2011-05-11 16:14 ` Greg KH
2011-05-11 21:24 ` Simon Leung
0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2011-05-11 16:14 UTC (permalink / raw)
To: kernelnewbies
On Wed, May 11, 2011 at 09:38:28PM +0530, Vikram Narayanan wrote:
> >> This is a question that arose from a older kernel ( 2.6.21 ) but I think
> >> it's generic to all kernels. Actually this might not a question on the
> >> kernel itself at all. So here it goes,
> >>
> >> I'm using a USB 3G modem with this kernel. The system loads three
> >> modules for it: pl2303, option and usbserial. Problem is, it looks like
> >> the order or loading is different ( I'm judging this by the order they
> >> appear in lsmod output):
> >>
> >> Sometimes, lsmod says:
> >> pl2303 ? ? ? ? ? ? ? ? 18628 ?0
> >> option ? ? ? ? ? ? ? ? ?9664 ?0
> >> usbserial ? ? ? ? ? ? ?28296 ?2 pl2303,option
> >>
> >> And sometimes, it says:
> >> option ? ? ? ? ? ? ? ? ?9664 ?0
> >> pl2303 ? ? ? ? ? ? ? ? 18628 ?0
> >> usbserial ? ? ? ? ? ? ?28296 ?2 option,pl2303
> >>
> >> Problem is, if option is before pl2303, the device won't work properly.
> >> So my question is: who decides which is loaded first, or, why does lsmod
> >> give different order?
> >
> > It's random and there is no way to specify the order unless you make one
> > module a dependancy of the other.
> Isn't modules.dep file take care of this?
Yes, but again, there is no such dependancy between these two modules
as they are separate and do not control the same type of hardware. Or
at least, they shouldn't.
> > And for these modules, they should not be dependant on each other, so
> > you can't do that.
> It does I guess. In my system, the modules.dep has,
> kernel/drivers/usb/serial/pl2303.ko: kernel/drivers/usb/serial/usbserial.ko
> Doesn't it mean that pl2303 is dependent on usbserial?
Yes, and so is the option module. But you are looking at a wierd device
that somehow thinks it is both an option device, and a pl2303 device,
which are totally different chipsets.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-11 16:14 ` Greg KH
@ 2011-05-11 21:24 ` Simon Leung
2011-05-11 21:42 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Simon Leung @ 2011-05-11 21:24 UTC (permalink / raw)
To: kernelnewbies
> Yes, and so is the option module. But you are looking at a wierd device
> that somehow thinks it is both an option device, and a pl2303 device,
> which are totally different chipsets.
>
> thanks,
>
> greg k-h
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
If I understand modules.dep correctly, it says that both pl2303 depend
on usbserial.
So when either is loaded, usbserial will be loaded. But the problem here
is that pl2303
should not be loaded at all as it's for USB-serial adapter, not 3G
modem. I'm not sure
what controls that.
Thanks,
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-11 21:24 ` Simon Leung
@ 2011-05-11 21:42 ` Greg KH
2011-05-12 8:33 ` Simon Leung
0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2011-05-11 21:42 UTC (permalink / raw)
To: kernelnewbies
On Wed, May 11, 2011 at 10:24:28PM +0100, Simon Leung wrote:
>
> > Yes, and so is the option module. But you are looking at a wierd device
> > that somehow thinks it is both an option device, and a pl2303 device,
> > which are totally different chipsets.
>
> If I understand modules.dep correctly, it says that both pl2303 depend
> on usbserial.
You mean "both pl2303 and option", then yes.
> So when either is loaded, usbserial will be loaded.
Yes.
> But the problem here is that pl2303 should not be loaded at all as
> it's for USB-serial adapter, not 3G modem. I'm not sure what controls
> that.
The descriptors of the device itself.
What does 'lsusb' show with this device plugged in?
And what kernel version are you using here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-11 21:42 ` Greg KH
@ 2011-05-12 8:33 ` Simon Leung
2011-05-12 13:48 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Simon Leung @ 2011-05-12 8:33 UTC (permalink / raw)
To: kernelnewbies
>> But the problem here is that pl2303 should not be loaded at all as
>> it's for USB-serial adapter, not 3G modem. I'm not sure what controls
>> that.
> The descriptors of the device itself.
>
> What does 'lsusb' show with this device plugged in?
> And what kernel version are you using here?
>
I'm using 2.6.21 on an ARM board. lsusb says:
|12d1:1446
after usb_modeswitch:
||12d1:1001
|
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-12 8:33 ` Simon Leung
@ 2011-05-12 13:48 ` Greg KH
2011-05-12 13:54 ` Simon Leung
0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2011-05-12 13:48 UTC (permalink / raw)
To: kernelnewbies
On Thu, May 12, 2011 at 09:33:32AM +0100, Simon Leung wrote:
>
> >> But the problem here is that pl2303 should not be loaded at all as
> >> it's for USB-serial adapter, not 3G modem. I'm not sure what controls
> >> that.
> > The descriptors of the device itself.
> >
> > What does 'lsusb' show with this device plugged in?
> > And what kernel version are you using here?
> >
> I'm using 2.6.21 on an ARM board. lsusb says:
> |12d1:1446
> after usb_modeswitch:
> ||12d1:1001
2.6.21 is _very_ old and unsupported, please use a modern kernel if you
need to ask the community for help. If you are stuck with this version
for some reason, please contact the vendor that is providing you support
for this as you are paying them for this.
If you can reproduce this with the 2.6.38 kernel release, or newer, I'll
be glad to help you out.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* module loading order
2011-05-12 13:48 ` Greg KH
@ 2011-05-12 13:54 ` Simon Leung
0 siblings, 0 replies; 9+ messages in thread
From: Simon Leung @ 2011-05-12 13:54 UTC (permalink / raw)
To: kernelnewbies
> 2.6.21 is _very_ old and unsupported, please use a modern kernel if you
> need to ask the community for help. If you are stuck with this version
> for some reason, please contact the vendor that is providing you support
> for this as you are paying them for this.
>
> If you can reproduce this with the 2.6.38 kernel release, or newer, I'll
> be glad to help you out.
>
> thanks,
>
> greg k-h
Thanks. I know it's very old and not supported here. But I was hoping
it'd be something simple
outside of the kernel space, e.g. udev configuration. Anyway, I have a
pretty dumb work around:
remove the ps2030.ko file. :)
Thanks again.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-05-12 13:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 16:08 module loading order Vikram Narayanan
2011-05-11 16:14 ` Greg KH
2011-05-11 21:24 ` Simon Leung
2011-05-11 21:42 ` Greg KH
2011-05-12 8:33 ` Simon Leung
2011-05-12 13:48 ` Greg KH
2011-05-12 13:54 ` Simon Leung
-- strict thread matches above, loose matches on Subject: below --
2011-05-11 8:00 Simon Leung
2011-05-11 13:41 ` Greg KH
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).