On 17-Jul-16 10:01 AM, Takahiro Hayashi wrote:
Hi,
The patch is generally good, but I'm confused by this part...
@@ -3483,12 +3606,7 @@ xhci_device_ctrl_start(struct usbd_xfer
XHCI_TRB_2_BYTES_SET(len);
control = (isread ? XHCI_TRB_3_DIR_IN : 0) |
XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) |
- XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_ENT_BIT;
- xhci_trb_put(&xx->xx_trb[i++], parameter, status, control);
-
- parameter = (uintptr_t)xfer | 0x3;
- status = XHCI_TRB_2_IRQ_SET(0);
- control = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_EVENT_DATA) |
+ (usbd_xfer_isread(xfer) ? XHCI_TRB_3_ISP_BIT : 0) |
XHCI_TRB_3_IOC_BIT;
xhci_trb_put(&xx->xx_trb[i++], parameter, status, control);
}
Where is the xfer pointer put int the TRBs for a control transfer now?