usb: xhci: Slightly simplify xhci_set_cmd_ring_deq()
Subsystems (2)
PATCH 1/1 usb: xhci: Slightly simplify xhci_set_cmd_ring_deq()
There is no need to clear the cycle bit after adding deq_dma, because it's never set there. Clear it together with the dequeue pointer.
Signed-off-by Michal Pecio <[email protected]>
--- drivers/usb/host/xhci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/host/xhci.c +1 -3
@@ -495,10 +495,8 @@ static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci) deq_dma &=CMD_RING_PTR_MASK ; crcr =xhci_read_64 (xhci, &xhci->op_regs->cmd_ring); - crcr &= ~CMD_RING_PTR_MASK ; + crcr &= ~(CMD_RING_PTR_MASK |CMD_RING_CYCLE ); crcr |= deq_dma; - - crcr &= ~CMD_RING_CYCLE ; crcr |= xhci->cmd_ring->cycle_state;xhci_dbg_trace (xhci, trace_xhci_dbg_init,"Setting command ring address to 0x%llx" , crcr);
Signature · 1 line
2.48.1