mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 04:09:11 +00:00
DM USB: Add some APIs for check native related configurations.
New USB APIs: usb_native_is_bus_existed/usb_native_is_port_existed: Check if specific usb bus or port are valid or not. usb_native_is_ss_port: Check if the specific port is supper speed usb port. Change-Id: I9ab54f6e81742321128d6abd5845ef966f0e9f37 Signed-off-by: Wu, Xiaoguang <xiaoguang.wu@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Reviewed-by: Yu Wang <yu1.wang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -196,11 +196,17 @@ enum USB_ERRCODE {
|
||||
#define UPRINTF(lvl, fmt, args...) \
|
||||
do { if (lvl <= usb_log_level) printf(LOG_TAG fmt, ##args); } while (0)
|
||||
|
||||
#define NATIVE_USBSYS_DEVDIR "/sys/bus/usb/devices"
|
||||
#define NATIVE_USB2_SPEED "480"
|
||||
#define NATIVE_USB3_SPEED "5000"
|
||||
|
||||
extern int usb_log_level;
|
||||
inline int usb_get_log_level(void) { return usb_log_level; }
|
||||
inline void usb_set_log_level(int level) { usb_log_level = level; }
|
||||
struct usb_devemu *usb_emu_finddev(char *name);
|
||||
|
||||
int usb_native_is_bus_existed(uint8_t bus_num);
|
||||
int usb_native_is_ss_port(uint8_t bus_of_port);
|
||||
int usb_native_is_port_existed(uint8_t bus_num, uint8_t port_num);
|
||||
struct usb_data_xfer_block *usb_data_xfer_append(struct usb_data_xfer *xfer,
|
||||
void *buf,
|
||||
int blen,
|
||||
|
Reference in New Issue
Block a user