On 9/20/06, Greg KH <greg@xxxxxxxxx> wrote:
On Tue, Sep 19, 2006 at 09:44:20PM -0400, Keppler Alecrim wrote:
> Hi all ,
> I'm hacking the kernel to understand more about USB. I created a simple
> module to list USB devices. I know this is very ugly way to learn (#include
> "/qemu/kernel/linux-2.6.15.7/drivers/usb/core/hcd.h") ,but I'm just trying
> to learn. And I want print my pen drive serial
> number(SerialNumber=0821A54053636178).
> But my output using my source is :
> usblist 0.1 initialization of the module ok
> usblist 0.1 - HUB my serial number is 0000:00:01.2
> CHILD my serial number is 31415
>
>
> What am I doing wrong ? Where is my pen drive on bus->root_hub ?
You are not recursing into the children of the root hubs. You must walk
all the devices in the system, see the function that does this in the
USB core for an example of what is needed.
good luck,
greg k-h
--
--
Francisco Keppler Silva Alecrim
Instituto Nokia de Tecnologia (INdT)
Open Source Mobile Research Center (OSMRC)