mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-07 20:00:13 +00:00
DM USB: introduce struct usb_devpath and releted functions
This patch introduce struct usb_devpath to indentify uniquely an USB device, which is basic element for multiple hub support. Tracked-On: #1434 Signed-off-by: Liang Yang <liang3.yang@intel.com> Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -84,6 +84,8 @@ enum usb_xfer_blk_stat {
|
||||
USB_XFER_BLK_HANDLED
|
||||
};
|
||||
|
||||
#define USB_MAX_TIERS 7
|
||||
|
||||
struct usb_hci;
|
||||
struct usb_device_request;
|
||||
struct usb_data_xfer;
|
||||
@@ -163,13 +165,19 @@ struct usb_data_xfer {
|
||||
pthread_mutex_t mtx;
|
||||
};
|
||||
|
||||
struct usb_devpath {
|
||||
uint8_t bus;
|
||||
uint8_t depth;
|
||||
uint8_t path[USB_MAX_TIERS];
|
||||
};
|
||||
#define ROOTHUB_PORT(x) ((x).path[0])
|
||||
|
||||
struct usb_native_devinfo {
|
||||
int speed;
|
||||
uint8_t bus;
|
||||
uint8_t port;
|
||||
uint16_t bcd;
|
||||
uint16_t pid;
|
||||
uint16_t vid;
|
||||
struct usb_devpath path;
|
||||
void *priv_data;
|
||||
};
|
||||
|
||||
@@ -239,5 +247,5 @@ struct usb_data_xfer_block *usb_data_xfer_append(struct usb_data_xfer *xfer,
|
||||
int blen,
|
||||
void *hci_data,
|
||||
int ccs);
|
||||
|
||||
char *usb_dev_path(struct usb_devpath *path);
|
||||
#endif /* _USB_CORE_H_ */
|
||||
|
Reference in New Issue
Block a user