struct usb_device — kernel's representation of a USB device
struct usb_device { int devnum; char devpath[16]; enum usb_device_state state; enum usb_device_speed speed; struct usb_tt * tt; int ttport; unsigned int toggle[2]; struct usb_device * parent; struct usb_bus * bus; struct usb_host_endpoint ep0; struct device dev; struct usb_device_descriptor descriptor; struct usb_host_config * config; struct usb_host_config * actconfig; struct usb_host_endpoint * ep_in[16]; struct usb_host_endpoint * ep_out[16]; char ** rawdescriptors; unsigned short bus_mA; u8 portnum; u8 level; unsigned can_submit:1; unsigned discon_suspended:1; unsigned persist_enabled:1; unsigned have_langid:1; unsigned authorized:1; unsigned authenticated:1; unsigned wusb:1; int string_langid; char * product; char * manufacturer; char * serial; struct list_head filelist; #ifdef CONFIG_USB_DEVICE_CLASS struct device * usb_classdev; #endif #ifdef CONFIG_USB_DEVICEFS struct dentry * usbfs_dentry; #endif int maxchild; struct usb_device * children[USB_MAXCHILDREN]; int pm_usage_cnt; u32 quirks; atomic_t urbnum; unsigned long active_duration; #ifdef CONFIG_PM struct delayed_work autosuspend; struct mutex pm_mutex; unsigned long last_busy; int autosuspend_delay; unsigned long connect_time; unsigned auto_pm:1; unsigned do_remote_wakeup:1; unsigned reset_resume:1; unsigned autosuspend_disabled:1; unsigned autoresume_disabled:1; unsigned skip_sys_resume:1; #endif };
device number; address on a USB bus
device ID string for use in messages (e.g., /port/...)
device state: configured, not attached, etc.
device speed: high/full/low (or error)
Transaction Translator info; used with low/full speed dev, highspeed hub
device port on that tt hub
one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints
our hub, unless we're the root
bus we're part of
endpoint 0 data (default control pipe)
generic device interface
USB device descriptor
all of the device's configs
the active configuration
array of IN endpoints
array of OUT endpoints
raw descriptors for each config
Current available from the bus
parent port number (origin 1)
number of USB hub ancestors
URBs may be submitted
disconnected while suspended
USB_PERSIST enabled for this device
whether string_langid is valid
policy has said we can use it; (user space) policy determines if we authorize this device to be used or not. By default, wired USB devices are authorized. WUSB devices are not, until we authorize them from user space. FIXME -- complete doc
Crypto authentication passed
device is Wireless USB
language ID for strings
iProduct string, if present (static)
iManufacturer string, if present (static)
iSerialNumber string, if present (static)
usbfs files that are open to this device
USB class device that was created for usbfs device access from userspace
usbfs dentry entry for the device
number of ports if hub
child devices - USB devices that are attached to this hub
usage counter for autosuspend
quirks of the whole device
number of URBs submitted for the whole device
total time device is not suspended
for delayed autosuspends
protects PM operations
time of last use
in jiffies
time device was first connected
autosuspend/resume in progress
remote wakeup should be enabled
needs reset instead of resume
autosuspend disabled by the user
autoresume disabled by the user
skip the next system resume