mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-26 11:14:03 +00:00
DM USB: dynamically allocate block count for struct usb_xfer
The block count of the struct usb_xfer is hard coded by the macro USB_MAX_XFER_BLOCKS (1024), it wastes memory if 1024 blocks are allocated for low speed transfer such as control transfer or interrupt transfer. This patch introduces a new method to allocate different number of blocks according to different endpoint type. Tracked-On: #3628 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -190,6 +190,15 @@ struct xhci_endp_ctx {
|
||||
volatile uint32_t dwEpCtx7;
|
||||
};
|
||||
|
||||
#define XHCI_EPTYPE_INVALID 0
|
||||
#define XHCI_EPTYPE_ISOC_OUT 1
|
||||
#define XHCI_EPTYPE_BULK_OUT 2
|
||||
#define XHCI_EPTYPE_INT_OUT 3
|
||||
#define XHCI_EPTYPE_CTRL 4
|
||||
#define XHCI_EPTYPE_ISOC_IN 5
|
||||
#define XHCI_EPTYPE_BULK_IN 6
|
||||
#define XHCI_EPTYPE_INT_IN 7
|
||||
|
||||
struct xhci_input_ctx {
|
||||
#define XHCI_INCTX_NON_CTRL_MASK 0xFFFFFFFCU
|
||||
volatile uint32_t dwInCtx0;
|
||||
|
Reference in New Issue
Block a user