USB Core 六

来源:互联网 发布:中国国际人工智能峰会 编辑:程序博客网 时间:2024/06/03 20:59

 

struct usb_bus {277 struct device *controller; /* host/master side hardware */ int busnum; /* busnum,总线编号*//* bus_name 总线的名字,大多数情况下主机控制器都是一个PCI 设备,那么bus_name 应该就是用来在PCI总线上标识usb 主机控制器的名字,PCI 总线使用标准的PCI ID 来标识PCI 设备,所以bus_name 里保存的应该就是主机控制器对应的PCI ID*/ char *bus_name;  u8 uses_dma; /* uses_dma,表明这个主机控制器支持不支持DMA,内存和USB 总线之间传输数据,这个过程可以使用DMA 或者不使用DMA,不使用DMA 的方式即所谓的PIO 方式*/ u8 otg_port; /* 0, or number of OTG/HNP port */ unsigned is_b_host:1; /* true during some HNP roleswitches */ unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ int devnum_next; /* Next open device number in * round-robin allocation */ struct usb_devmap devmap; /* device address allocation map */ struct usb_device *root_hub; /* 和usb主机控制器绑定在一起*/ struct list_head bus_list; /* 在hcd.c 中定义有一个全局队列usb_bus_list*/ int bandwidth_allocated; /* bandwidth_allocated,表明总线为中断传输和等时传输预留了多少带宽.对于高速来说,最多可以有80%,对于低速和全速要多点儿,可以达到90%。 */ int bandwidth_int_reqs; /* 分别表示当前中断传输和等时传输的数量。*/ int bandwidth_isoc_reqs; /* number of Isoc. requests */ #ifdef CONFIG_USB_DEVICEFS struct dentry *usbfs_dentry; /*每条总线都对应于/proc/bus/usb 下的一个目录。*/ #endif struct class_device *class_dev; /* class device for this bus */ #if defined(CONFIG_USB_MON) struct mon_bus *mon_bus; /* non-null when associated */ int monitored; /* non-zero when monitored */ #endif };


 

原创粉丝点击