mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
ACRN:DM Release resource when destroy the device
When destroy the usb device release the resource allocate for transfer in case cause the memory leak issue. Add the release and cancel transfer request call back for the emulation device, use the emulation device call back in xHCI controller emulation. Tracked-On: #6533 Signed-off-by: Liu Long <long.liu@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -115,6 +115,8 @@ struct usb_devemu {
|
||||
int (*ue_reset)(void *sc);
|
||||
int (*ue_remove)(void *sc);
|
||||
int (*ue_stop)(void *sc);
|
||||
void (*ue_cancel_req)(void *pdata);
|
||||
void (*ue_free_req)(void *pdata);
|
||||
void (*ue_deinit)(void *pdata);
|
||||
};
|
||||
#define USB_EMUL_SET(x) DATA_SET(usb_emu_set, x)
|
||||
|
@@ -129,4 +129,6 @@ int usb_dev_info(void *pdata, int type, void *value, int size);
|
||||
int usb_dev_request(void *pdata, struct usb_xfer *xfer);
|
||||
int usb_dev_reset(void *pdata);
|
||||
int usb_dev_data(void *pdata, struct usb_xfer *xfer, int dir, int epctx);
|
||||
void usb_dev_cancel_request(void *pdata);
|
||||
void usb_dev_free_request(void *pdata);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user