forked from xuos/xiuos
Replanting xhci_complete
This commit is contained in:
parent
48ff62be23
commit
ad027ba080
|
@ -2763,14 +2763,19 @@ static void xhci_complete ( struct xhci_host *xhci,
|
||||||
union xhci_trb *pending;
|
union xhci_trb *pending;
|
||||||
uint32_t eidx;
|
uint32_t eidx;
|
||||||
struct xhci_endpoint *work_pipe;
|
struct xhci_endpoint *work_pipe;
|
||||||
uintptr_t vir_addr;
|
uintptr_t addr_offset;
|
||||||
|
|
||||||
vir_addr = usb_mem_page_phy2vir(trb->command);
|
// vir_addr = usb_mem_page_phy2vir(trb->command);
|
||||||
|
cmd_ring = xhci->cmds;
|
||||||
|
addr_offset = trb->command - xhci->cmds_phy;
|
||||||
|
|
||||||
cmd_trb = (void *)(uintptr_t)(vir_addr);
|
|
||||||
cmd_ring = XHCI_RING(cmd_trb); /* to align addr is ring base */
|
// cmd_trb = (void *)(uintptr_t)(vir_addr);
|
||||||
|
// cmd_ring = XHCI_RING(cmd_trb); /* to align addr is ring base */
|
||||||
pending = &cmd_ring->evt; /* preserve event trb pending to handle */
|
pending = &cmd_ring->evt; /* preserve event trb pending to handle */
|
||||||
eidx = cmd_trb - cmd_ring->ring + 1; /* calculate current evt trb index */
|
// eidx = cmd_trb - cmd_ring->ring + 1; /* calculate current evt trb index */
|
||||||
|
eidx = addr_offset / sizeof(union xhci_trb); /* calculate current evt trb index */
|
||||||
|
|
||||||
work_pipe = xhci->cur_cmd_pipe;
|
work_pipe = xhci->cur_cmd_pipe;
|
||||||
|
|
||||||
/* Ignore "command ring stopped" notifications */
|
/* Ignore "command ring stopped" notifications */
|
||||||
|
|
Loading…
Reference in New Issue