Am Mittwoch, 6. August 2008 17:41 schrieb Robert Eiggner:
> we are developing on an Phytec i.MX31 Board with the PTXDist 0.10.6
> installed and working. USB "hotplug" with mass-storage devices works well.
>
> What we now want to do is to build a new USB Serial Driver which shall be
> loaded automatically when a USB Device with VendorID=0x1234,
> ProductID=0x4321 is loaded.
>
> At the current state of development, our new usbserial driver is compiled
> and our driver is loaded successfully with modprobe.
>
> But when we connect the USB Device with VendorID=0x1234, ProductID=0x4321,
> nothing happens:
> ---
> usb 1-1: new full speed USB device using fsl-ehci and address 10
> usb 1-1: configuration #1 chosen from 1 choice
> ---
>
> We would expect that the Hotplug mechanism would check for the
> Vendor/ProductId in e.g. usb.usermap or usb.distmap . We inserted the
> VendorID/ProductId in usb.usermap or usb.distmap but no Hotplugging seems
> to happen.

First device and driver are connected in kernel space. After this was 
successfull, a uevent will be created that wake up the userland tool "udev" 
that does the rest.

I assume you must first solve the driver/device issue. The kernel doesn't 
connect your driver to your device.
 
> As we went on with our investigation we found out that the hotplug process
> doesn't seem to be implemented/running.
> Normally we would expect that the kernel module for the specific usb device
> is loaded when there is an entry in the usb.usermap,... files?!
>
> Can you tell us the method how to load specific kernel modules when a
> specific usb device is connected?

Kernel help says:

CONFIG_KMOD:                                                                    
                                  
Normally when you have selected some parts of the kernel to be created as 
kernel modules, you must load them (using the "modprobe" command) before you 
can use them. If you say Y here, some parts of the kernel will be able to 
load modules automatically: when a part of the kernel needs a module, it runs 
modprobe with the appropriate arguments, thereby loading the module if it is 
available.

Regards,
Juergen

-- 
 Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
  Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-7 |  Fax: +49-5121-206917-9

--
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to