mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
DM USB: introduce enum type usb_block_type
In the process of USB data transfer, there three kinds of data blocks: a. Non data block, which contains some control information; b. Partial data block, which contains part of a large data chunk; c. Full data block, which contains a complete data chunk. In previous implementation, the differences mentioned above are described by the usb_block::chained. But the 'chained' is concept in the xHCI area and should not appear in the USB layer. This patch introduces enum type usb_block_type to replace the 'chained' field in struct usb_block. 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:
@@ -142,6 +142,12 @@ struct usb_hci {
|
||||
int hci_port;
|
||||
};
|
||||
|
||||
enum usb_block_type {
|
||||
USB_DATA_NONE,
|
||||
USB_DATA_PART,
|
||||
USB_DATA_FULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Each xfer block is mapped to the hci transfer block.
|
||||
* On input into the device handler, blen is set to the lenght of buf.
|
||||
@@ -155,9 +161,9 @@ struct usb_block {
|
||||
enum usb_block_stat stat; /* processed status */
|
||||
void *hci_data; /* HCI private reference */
|
||||
int ccs;
|
||||
int chained;
|
||||
uint32_t streamid;
|
||||
uint64_t trbnext; /* next TRB guest address */
|
||||
enum usb_block_type type;
|
||||
};
|
||||
|
||||
struct usb_xfer {
|
||||
|
Reference in New Issue
Block a user