The USB kernel module is called "ums-usbat,ko" for the 2.6.37 kernel found from
www.kernel.org. The source file is "shuttle_usbat.c" which is in linux-2.6.37/drivers/usb/storage directory. It depends on usb-storage.
Much of this will be beginning questions about how the functions get called in the kernel module. In the source file, there are many functions. When the module is inserted, the
Code:
static int __init usbat_init(void)
{
return usb_register(&usbat_driver);
}
init function is called. When the module is removed, the
Code:
static void __exit usbat_exit(void)
{
usb_deregister(&usbat_driver);
}
exit function is called. What makes the other functions get called? How can I call one of the functions?
There is also a macro called US_DEBUG. It is defined somewhere else, maybe in the kernel tree. How can I turn this on/off? I am building the module on its own.
When I plug in an
RCA k@zoo mp3 player, it does not create a scsi device. How can I find out if the functions are getting called?
What could I do to try to read the device:
Quote:
usb 3-1: New USB device found, idVendor=069b, idProduct=2220
usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 3-1: usb_probe_device
usb 3-1: configuration #1 chosen from 1 choice
usb 3-1: adding 3-1:1.0 (config #1, interface 0)
drivers/usb/core/inode.c: creating file '004'
hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0002
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ehci_hcd 0000:00:10.4: suspend root hub
|