All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: xhci: Slightly simplify xhci_set_cmd_ring_deq()
@ 2026-07-30  9:04 Michal Pecio
  0 siblings, 0 replies; only message in thread
From: Michal Pecio @ 2026-07-30  9:04 UTC (permalink / raw)
  To: Mathias Nyman, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

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 <michal.pecio@gmail.com>
---
 drivers/usb/host/xhci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index a58a9a5b487f..dece11ffc0e6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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);
-- 
2.48.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-30  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  9:04 [PATCH] usb: xhci: Slightly simplify xhci_set_cmd_ring_deq() Michal Pecio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.