Commit 257d585aaec469ded6ec15d8a8e7ebada21d7277
Committed by
Greg Kroah-Hartman
1 parent
c06d68b814
Exists in
master
and in
7 other branches
USB: xhci: Make xhci_set_hc_event_deq() static.
Now that the event handler functions no longer use xhci_set_hc_event_deq() to update the event ring dequeue pointer, that function is not used by anything in xhci-ring.c. Move that function into xhci-mem.c and make it static. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 3 changed files with 23 additions and 23 deletions Side-by-side Diff
drivers/usb/host/xhci-mem.c
... | ... | @@ -1601,6 +1601,29 @@ |
1601 | 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 | 1628 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) |
1606 | 1629 | { |
drivers/usb/host/xhci-ring.c
... | ... | @@ -301,28 +301,6 @@ |
301 | 301 | return 1; |
302 | 302 | } |
303 | 303 | |
304 | -void xhci_set_hc_event_deq(struct xhci_hcd *xhci) | |
305 | -{ | |
306 | - u64 temp; | |
307 | - dma_addr_t deq; | |
308 | - | |
309 | - deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, | |
310 | - xhci->event_ring->dequeue); | |
311 | - if (deq == 0 && !in_interrupt()) | |
312 | - xhci_warn(xhci, "WARN something wrong with SW event ring " | |
313 | - "dequeue ptr.\n"); | |
314 | - /* Update HC event ring dequeue pointer */ | |
315 | - temp = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); | |
316 | - temp &= ERST_PTR_MASK; | |
317 | - /* Don't clear the EHB bit (which is RW1C) because | |
318 | - * there might be more events to service. | |
319 | - */ | |
320 | - temp &= ~ERST_EHB; | |
321 | - xhci_dbg(xhci, "// Write event ring dequeue pointer, preserving EHB bit\n"); | |
322 | - xhci_write_64(xhci, ((u64) deq & (u64) ~ERST_PTR_MASK) | temp, | |
323 | - &xhci->ir_set->erst_dequeue); | |
324 | -} | |
325 | - | |
326 | 304 | /* Ring the host controller doorbell after placing a command on the ring */ |
327 | 305 | void xhci_ring_cmd_db(struct xhci_hcd *xhci) |
328 | 306 | { |
drivers/usb/host/xhci.h
... | ... | @@ -1400,7 +1400,6 @@ |
1400 | 1400 | int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); |
1401 | 1401 | void xhci_ring_cmd_db(struct xhci_hcd *xhci); |
1402 | 1402 | void *xhci_setup_one_noop(struct xhci_hcd *xhci); |
1403 | -void xhci_set_hc_event_deq(struct xhci_hcd *xhci); | |
1404 | 1403 | int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); |
1405 | 1404 | int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, |
1406 | 1405 | u32 slot_id); |