diff options
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
| -rw-r--r-- | drivers/usb/host/xhci-mem.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index ac57f538f957..4e51343ddffc 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
| @@ -1601,6 +1601,29 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags) | |||
| 1601 | return 0; | 1601 | return 0; |
| 1602 | } | 1602 | } |
| 1603 | 1603 | ||
| 1604 | static void xhci_set_hc_event_deq(struct xhci_hcd *xhci) | ||
| 1605 | { | ||
| 1606 | u64 temp; | ||
| 1607 | dma_addr_t deq; | ||
| 1608 | |||
| 1609 | deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, | ||
| 1610 | xhci->event_ring->dequeue); | ||
| 1611 | if (deq == 0 && !in_interrupt()) | ||
| 1612 | xhci_warn(xhci, "WARN something wrong with SW event ring " | ||
| 1613 | "dequeue ptr.\n"); | ||
| 1614 | /* Update HC event ring dequeue pointer */ | ||
| 1615 | temp = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); | ||
| 1616 | temp &= ERST_PTR_MASK; | ||
| 1617 | /* Don't clear the EHB bit (which is RW1C) because | ||
| 1618 | * there might be more events to service. | ||
| 1619 | */ | ||
| 1620 | temp &= ~ERST_EHB; | ||
| 1621 | xhci_dbg(xhci, "// Write event ring dequeue pointer, " | ||
| 1622 | "preserving EHB bit\n"); | ||
| 1623 | xhci_write_64(xhci, ((u64) deq & (u64) ~ERST_PTR_MASK) | temp, | ||
| 1624 | &xhci->ir_set->erst_dequeue); | ||
| 1625 | } | ||
| 1626 | |||
| 1604 | 1627 | ||
| 1605 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | 1628 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) |
| 1606 | { | 1629 | { |
