mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
DM USB: xHCI: fix corner case of short packet logic
The old logic identify the short packet complete status (CS) by comparing the transfered bytes (TB) and the expected transfered bytes (ETB), it is right only when no error happend. If error appears, the TB may be less than the ETB, but DM should report error CS instead of short packet CS. Tracked-On: #3401 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -2684,7 +2684,7 @@ pci_xhci_xfer_complete(struct pci_xhci_vdev *xdev,
|
||||
} else
|
||||
rem_len += xfer->data[i].blen;
|
||||
|
||||
if (rem_len > 0)
|
||||
if (err == XHCI_TRB_ERROR_SUCCESS && rem_len > 0)
|
||||
err = XHCI_TRB_ERROR_SHORT_PKT;
|
||||
|
||||
/* Only interrupt if IOC or short packet */
|
||||
|
Reference in New Issue
Block a user