Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xhci not working with urtwn



On 2016/07/17 20:41, Nick Hudson wrote:
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?

When ED_BIT == 0, Transfer Event has the physical address of causing TRB in trb_0,
so xhci_event_transfer calculates the index to TRB table, and then xfer is obtained
from xr->xr_cookies[idx] in the ring.


--
t-hash


Home | Main Index | Thread Index | Old Index