Re: Best practice for loading platform modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 29, 2009 at 3:25 PM, Greg KH <greg@xxxxxxxxx> wrote:
> On Wed, Apr 29, 2009 at 03:15:13PM -0400, Chris Hallinan wrote:
>> On Wed, Apr 29, 2009 at 2:44 PM, Greg KH <greg@xxxxxxxxx> wrote:
>> > On Wed, Apr 29, 2009 at 02:31:49PM -0400, Chris Hallinan wrote:
>> >> On Wed, Apr 29, 2009 at 2:12 PM, Greg KH <greg@xxxxxxxxx> wrote:
>> >> > On Wed, Apr 29, 2009 at 11:11:35AM -0700, Greg KH wrote:
>> >> >> On Wed, Apr 29, 2009 at 02:05:37PM -0400, Chris Hallinan wrote:
>> >> >> > I have an OMAP3 board, and want usb (host mode) configured as a
>> >> >> > loadable module.  Using a generic rule such as this:
>> >> >> > RUN+="/sbin/modprobe -b $env{MODALIAS}"
>> >> >> >
>> >> >> > ends up passing "platform:musb_hdrc" to modprobe, which obviously
>> >> >> > fails.
>> >> >>
>> >> >> Why would that fail?  Do you have the proper modalias in the kernel
>> >> >> module to handle this?  If not, can you add it?
>> >> >
>> >> > I see:
>> >> >        MODULE_ALIAS("platform:" MUSB_DRIVER_NAME);
>> >> > in the musb code, perhaps MUSB_DRIVER_NAME is not set correctly to be
>> >> > "musb_hdrc" somehow?
>> >>
>> >> >From musb_core.c:
>> >>
>> >> #define MUSB_DRIVER_NAME "musb_hdrc"
>> >> const char musb_driver_name[] = MUSB_DRIVER_NAME;
>> >
>> > Good, so you should be fine.
>> >
>> > Can you run:
>> >        modprobe -n -v platform:musb_hdrc
>> > on your system?
>> >
>>
>> # modprobe -n -v platform:musb_hdrc
>> FATAL: Module platform:musb_hdrc not found.
>> # modprobe --version
>> module-init-tools version 3.7
>>
>> But...
>>
>> # modprobe -n -v musb_hdrc
>> insmod /lib/modules/2.6.24_mvl5024/kernel/drivers/usb/core/usbcore.ko
>> insmod /lib/modules/2.6.24_mvl5024/kernel/drivers/usb/musb/musb_hdrc.ko
>>
>> Seems to be complaining about the "platform:" prefix, I think.  This
>> is the very latest version of module-init-tools from git tree a couple
>> days ago.
>
> But your kernel is over a year old, not much we can do about that :)
>
> I suggest poking your distro, it seems they need to provide a fix
> for your kernel, nothing we can do here, everything works just fine with
> the latest kernel releases from what I can tell.
>

Erm, I am the distro maintainer!  I tried just today w/ 2.6.29.  The
problem seems like a mismatch.  Kernel passes "platform:musb_hdrc".
Udev receives and passes same to modprobe.  The answer I'm seeking is
"what is the correct/proper approach?"  Should I seek to modify the
kernel and remove the "platform:" prefix, or should I seek a
modification to modprobe to be able to understand and strip off the
"platform:" prefix?  Or should udev have a construct/rules syntax to
strip the "platform:" prefix?

Thanks,

Chris


-- 
Life is like Linux - it never stands still.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux