Revert "usb: xhci: remove option to change a default ring's TRB cycle bit"
Subsystems (3)
PATCH 1/1 Revert "usb: xhci: remove option to change a default ring's TRB cycle bit"
Revert 9b28ef1e4cc0 [ Upstream commit e1b0fa863907 ], it causes regression in 6.12.49 stable, no issues in upstream.
Commit 9b28ef1e4cc0 ("usb: xhci: remove option to change a default ring's TRB cycle bit") introduced a regression in 6.12.49 stable kernel. The original commit was never intended for stable kernels, but was added as a dependency for commit a5c98e8b1398 ("xhci: dbc: Fix full DbC transfer ring after several reconnects").
Since this commit is more of an optimization, revert it and solve the dependecy by modifying one line in xhci_dbc_ring_init(). Specifically, commit a5c98e8b1398 ("xhci: dbc: Fix full DbC transfer ring after several reconnects") moved function call xhci_initialize_ring_info() into a separate function. To resolve the dependency, the arguments for this function call are also reverted.
--- drivers/usb/host/xhci-dbgcap.c | 2 +- drivers/usb/host/xhci-mem.c | 50 ++++++++++++++++++---------------- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 6 ++-- 4 files changed, 33 insertions(+), 27 deletions(-)
drivers/usb/host/xhci-dbgcap.c +1 -1
@@ -458,7 +458,7 @@ static void xhci_dbc_ring_init(struct xhci_ring *ring) trb->link.segment_ptr =cpu_to_le64 (ring->first_seg->dma); trb->link.control =cpu_to_le32 (LINK_TOGGLE |TRB_TYPE (TRB_LINK )); } -xhci_initialize_ring_info (ring); +xhci_initialize_ring_info (ring,1 ); }static int xhci_dbc_reinit_ep_rings (struct xhci_dbc *dbc)
drivers/usb/host/xhci-mem.c +27 -23
158 lines not on this page · raw message
drivers/usb/host/xhci.c +1 -1
@@ -769,7 +769,7 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci) seg->trbs[TRBS_PER_SEGMENT -1 ].link.control &=cpu_to_le32 (~TRB_CYCLE ); } -xhci_initialize_ring_info (ring); +xhci_initialize_ring_info (ring,1 );/* * Reset the hardware dequeue pointer. * Yes, this will need to be re-written after resume, but we're paranoid
drivers/usb/host/xhci.h +4 -2
@@ -1803,12 +1803,14 @@ void xhci_slot_copy(struct xhci_hcd *xhci,int xhci_endpoint_init (struct xhci_hcd *xhci,struct xhci_virt_device *virt_dev,struct usb_device *udev,struct usb_host_endpoint *ep,gfp_t mem_flags); -struct xhci_ring *xhci_ring_alloc (struct xhci_hcd *xhci,unsigned int num_segs, +struct xhci_ring *xhci_ring_alloc (struct xhci_hcd *xhci, +unsigned int num_segs,unsigned int cycle_state,enum xhci_ring_type type,unsigned int max_packet,gfp_t flags);void xhci_ring_free (struct xhci_hcd *xhci,struct xhci_ring *ring);int xhci_ring_expansion (struct xhci_hcd *xhci,struct xhci_ring *ring,unsigned int num_trbs,gfp_t flags); -void xhci_initialize_ring_info (struct xhci_ring *ring); +void xhci_initialize_ring_info (struct xhci_ring *ring, +unsigned int cycle_state);void xhci_free_endpoint_ring (struct xhci_hcd *xhci,struct xhci_virt_device *virt_dev,unsigned int ep_index);
Signature · 1 line
2.50.1
Quoted 16 lines · Niklas Neronin
Revert
9b28ef1e4cc0[ Upstream commite1b0fa863907], it causes regression in 6.12.49 stable, no issues in upstream.Commit
9b28ef1e4cc0("usb: xhci: remove option to change a default ring's TRB cycle bit") introduced a regression in 6.12.49 stable kernel. The original commit was never intended for stable kernels, but was added as a dependency for commita5c98e8b1398("xhci: dbc: Fix full DbC transfer ring after several reconnects").Since this commit is more of an optimization, revert it and solve the dependecy by modifying one line in
xhci_dbc_ring_init(). Specifically, commita5c98e8b1398("xhci: dbc: Fix full DbC transfer ring after several reconnects") moved function callxhci_initialize_ring_info()into a separate function. To resolve the dependency, the arguments for this function call are also reverted.
Quoted 4 lines
Tested-by Wolfgang Walter <[email protected]>Cc [email protected] # v6.12.49Signed-off-by Niklas Neronin <[email protected]>
Greg KH
maintainerQuoted 17 lines · Mathias Nyman
Quoted 16 lines · Niklas Neronin
Revert
9b28ef1e4cc0[ Upstream commite1b0fa863907], it causes regression in 6.12.49 stable, no issues in upstream.Commit
9b28ef1e4cc0("usb: xhci: remove option to change a default ring's TRB cycle bit") introduced a regression in 6.12.49 stable kernel. The original commit was never intended for stable kernels, but was added as a dependency for commita5c98e8b1398("xhci: dbc: Fix full DbC transfer ring after several reconnects").Since this commit is more of an optimization, revert it and solve the dependecy by modifying one line in
xhci_dbc_ring_init(). Specifically, commita5c98e8b1398("xhci: dbc: Fix full DbC transfer ring after several reconnects") moved function callxhci_initialize_ring_info()into a separate function. To resolve the dependency, the arguments for this function call are also reverted.
Quoted 6 lines
Quoted 4 lines
Tested-by Wolfgang Walter <[email protected]>Cc [email protected] # v6.12.49Signed-off-by Niklas Neronin <[email protected]>Acked-by Mathias Nyman <[email protected]>
Thanks, now queued up.
greg k-h