forked from xuos/xiuos
Replanting xhci_event_process function
This commit is contained in:
parent
6ab2083403
commit
3928cd46b7
|
@ -2794,11 +2794,13 @@ static void xhci_host_controller ( struct xhci_host *xhci,
|
||||||
void xhci_event_process(struct xhci_host *xhci) {
|
void xhci_event_process(struct xhci_host *xhci) {
|
||||||
struct xhci_ring *evts = xhci->evts;
|
struct xhci_ring *evts = xhci->evts;
|
||||||
unsigned int evt_type;
|
unsigned int evt_type;
|
||||||
uint32_t nidx;
|
uint32_t nidx;
|
||||||
uint32_t cs;
|
uint32_t cs;
|
||||||
union xhci_trb *trb;
|
union xhci_trb *trb;
|
||||||
uint32_t control;
|
uint32_t control;
|
||||||
uint64_t erdp;
|
uint64_t erdp;
|
||||||
|
uintptr_t evts_phy = xhci->evts_phy;
|
||||||
|
|
||||||
|
|
||||||
/* check and ack event */
|
/* check and ack event */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -2854,9 +2856,14 @@ void xhci_event_process(struct xhci_host *xhci) {
|
||||||
evts->nidx = nidx;
|
evts->nidx = nidx;
|
||||||
|
|
||||||
/* Update dequeue pointer if applicable */
|
/* Update dequeue pointer if applicable */
|
||||||
erdp = (uint64_t)(unsigned long)(evts->ring + nidx);
|
// erdp = (uint64_t)(unsigned long)(evts->ring + nidx);
|
||||||
xhci_writeq ( xhci, (uintptr_t)( erdp ) | XHCI_RUN_ERDP_EHB,
|
erdp = (uint64_t)(unsigned long)(evts_phy + nidx * sizeof(union xhci_trb));
|
||||||
xhci->run + XHCI_RUN_ERDP ( 0 ) );
|
#if 0
|
||||||
|
xhci_writeq ( xhci, (uintptr_t)( erdp ) | XHCI_RUN_ERDP_EHB,
|
||||||
|
xhci->run + XHCI_RUN_ERDP ( 0 ) );
|
||||||
|
#endif
|
||||||
|
xhci_writeq ( xhci, (uintptr_t)( erdp ) | XHCI_RUN_ERDP_EHB,
|
||||||
|
xhci->run_addr + XHCI_RUN_ERDP ( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue