mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 17:21:22 +00:00
DM USB: introduce struct xhci_block for xHCI emulation
In the struct usb_block, there are some fields such as 'ccs', 'streamid', which should not be seen in the USB layer. This patch intruduces new struct xhci_block to include the variables for xHCI emulation. 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:
@@ -101,19 +101,21 @@ usb_emu_finddev(char *name)
|
||||
}
|
||||
|
||||
struct usb_block *
|
||||
usb_block_append(struct usb_xfer *xfer, void *buf, int blen,
|
||||
void *hci_data, int ccs)
|
||||
usb_block_append(struct usb_xfer *xfer, void *buf, int blen, void *hcb,
|
||||
int hcb_len)
|
||||
{
|
||||
struct usb_block *xb;
|
||||
|
||||
if (xfer->ndata >= USB_MAX_XFER_BLOCKS)
|
||||
return NULL;
|
||||
|
||||
if (hcb == NULL)
|
||||
return NULL;
|
||||
|
||||
xb = &xfer->data[xfer->tail];
|
||||
xb->buf = buf;
|
||||
xb->blen = blen;
|
||||
xb->hci_data = hci_data;
|
||||
xb->ccs = ccs;
|
||||
memcpy(xb->hcb, hcb, hcb_len);
|
||||
xb->stat = USB_BLOCK_FREE;
|
||||
xb->bdone = 0;
|
||||
xb->type = USB_DATA_NONE;
|
||||
|
||||
Reference in New Issue
Block a user