USB device debugging & ioctls

Chris Turner c.turner at
Fri Nov 30 04:21:49 PST 2007

Hello all -

I'm trying to do a bit of detctive work on a so-called linksys wusb54g
that I thought would work with rum(4) and came across a couple of things:

- If I'm not mistaken, there is no pciconf equivelant for usb devices?
  (e.g. to easily determine vendor ID's, etc)

- Thinking that there wasn't, I started to use the
  USB_GET_DEVICEINFO ioctl, which did the trick.

However, to get the USB ioctls to work my program needed to pull
in sys/ioccom.h in order to have the ioctl '_IOR' macro used in
bus/usb/usb.h to expand properly.

This didn't seem correct and caused me a bit of wasted time to figgure

It seemed like either the ioctl / usb / ? documentation needs to be
updated to list sys/ioccom.h as a needed header, or the usb header
needs to do something like ata.h, e.g.

#ifndef _SYS_IOCCOMM_H_
#include <sys/ioccom.h>


Thinking it might make sense to try to do a sweep of any
ioctl defining headers & add the appropriate includes, but wanted to
check the approach here.


- Chris

More information about the Kernel mailing list