DM USB: re-implement the data block process logic

In Windows OS, there are many non-data blocks (EVENT DATA) during the USB
data transfer process, which is very different from the Linux conterpart.
To support both OS, the data processing logic is changed with the help of
newly introduced enum usb_block_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:
Xiaoguang Wu
2019-09-09 17:31:29 +08:00
committed by wenlingz
parent 236c23e418
commit d58a766556
2 changed files with 109 additions and 116 deletions

View File

@@ -73,9 +73,9 @@ struct usb_dev_req {
* so here need some data to record it.
*/
uint8_t *buffer;
int buf_length;
int blk_start;
int blk_count;
int buf_size;
int blk_head;
int blk_tail;
struct usb_xfer *xfer;
struct libusb_transfer *trn;