Re: list USB

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

 



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

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux