STRUCT USB_DEVICE(9) | Host-Side Data Types and Macro | STRUCT USB_DEVICE(9) |
NAME¶
struct_usb_device - kernel´s representation of a USB device
SYNOPSIS¶
struct usb_device {
int devnum;
char devpath[16];
u32 route;
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; #ifndef __GENKSYMS__
unsigned lpm_capable:1;
unsigned usb2_hw_lpm_capable:1;
unsigned usb2_hw_lpm_enabled:1;
unsigned usb2_hw_lpm_allowed:1;
unsigned usb2_hw_lpm_besl_capable:1; #endif
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 work_struct autoresume;
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
struct wusb_dev * wusb_dev;
int slot_id; #ifndef __GENKSYMS__
struct usb_host_bos * bos;
struct usb3_lpm_parameters u1_params;
struct usb3_lpm_parameters u2_params;
unsigned lpm_disable_count; #endif };
MEMBERS¶
devnum
devpath[16]
route
state
speed
tt
ttport
toggle[2]
parent
bus
ep0
dev
descriptor
config
actconfig
ep_in[16]
ep_out[16]
rawdescriptors
bus_mA
portnum
level
can_submit
discon_suspended
persist_enabled
have_langid
authorized
authenticated
wusb
lpm_capable
usb2_hw_lpm_capable
usb2_hw_lpm_enabled
usb2_hw_lpm_allowed
usb2_hw_lpm_besl_capable
string_langid
product
manufacturer
serial
filelist
usb_classdev
usbfs_dentry
maxchild
children[USB_MAXCHILDREN]
pm_usage_cnt
quirks
urbnum
active_duration
autosuspend
autoresume
pm_mutex
last_busy
autosuspend_delay
connect_time
auto_pm
do_remote_wakeup
reset_resume
autosuspend_disabled
autoresume_disabled
skip_sys_resume
wusb_dev
slot_id
bos
u1_params
u2_params
lpm_disable_count
NOTES¶
Usbcore drivers should not set usbdev->state directly. Instead use usb_set_device_state.
COPYRIGHT¶
May 2024 | Kernel Hackers Manual 2.6. |