aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMichal Pecio <michal.pecio@gmail.com>2025-05-05 15:56:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-05 16:30:45 +0200
commit6328bdc988d23201c700e1e7e04eb05a1149ac1e (patch)
treef444605f4dfce0b5da9f976dd31de082d9e7817f /tools/perf/scripts/python/bin
parentusb: usbtmc: Fix erroneous generic_read ioctl return (diff)
downloadlinux-6328bdc988d23201c700e1e7e04eb05a1149ac1e.tar.gz
linux-6328bdc988d23201c700e1e7e04eb05a1149ac1e.zip
usb: xhci: Don't trust the EP Context cycle bit when moving HW dequeue
VIA VL805 doesn't bother updating the EP Context cycle bit when the endpoint halts. This is seen by patching xhci_move_dequeue_past_td() to print the cycle bits of the EP Context and the TRB at hw_dequeue and then disconnecting a flash drive while reading it. Actual cycle state is random as expected, but the EP Context bit is always 1. This means that the cycle state produced by this function is wrong half the time, and then the endpoint stops working. Work around it by looking at the cycle bit of TD's end_trb instead of believing the Endpoint or Stream Context. Specifically: - rename cycle_found to hw_dequeue_found to avoid confusion - initialize new_cycle from td->end_trb instead of hw_dequeue - switch new_cycle toggling to happen after end_trb is found Now a workload which regularly stalls the device works normally for a few hours and clearly demonstrates the HW bug - the EP Context bit is not updated in a new cycle until Set TR Dequeue overwrites it: [ +0,000298] sd 10:0:0:0: [sdc] Attached SCSI disk [ +0,011758] cycle bits: TRB 1 EP Ctx 1 [ +5,947138] cycle bits: TRB 1 EP Ctx 1 [ +0,065731] cycle bits: TRB 0 EP Ctx 1 [ +0,064022] cycle bits: TRB 0 EP Ctx 0 [ +0,063297] cycle bits: TRB 0 EP Ctx 0 [ +0,069823] cycle bits: TRB 0 EP Ctx 0 [ +0,063390] cycle bits: TRB 1 EP Ctx 0 [ +0,063064] cycle bits: TRB 1 EP Ctx 1 [ +0,062293] cycle bits: TRB 1 EP Ctx 1 [ +0,066087] cycle bits: TRB 0 EP Ctx 1 [ +0,063636] cycle bits: TRB 0 EP Ctx 0 [ +0,066360] cycle bits: TRB 0 EP Ctx 0 Also tested on the buggy ASM1042 which moves EP Context dequeue to the next TRB after errors, one problem case addressed by the rework that implemented this loop. In this case hw_dequeue can be enqueue, so simply picking the cycle bit of TRB at hw_dequeue wouldn't work. Commit 5255660b208a ("xhci: add quirk for host controllers that don't update endpoint DCS") tried to solve the stale cycle problem, but it was more complex and got reverted due to a reported issue. Cc: Jonathan Bell <jonathan@raspberrypi.org> Cc: Oliver Neukum <oneukum@suse.com> Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250505125630.561699-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
f='/linux/commit/drivers/infiniband/ulp/ipoib/ipoib_main.c?id=a5e27fb68fcce3885cfc02a1ecd7d02fe3f02a34&follow=1'>RDMA/ipoib: Use refcount_t instead of atomic_t for reference countingWeihang Li2-6/+6 2021-06-08RDMA/cxgb4: Use refcount_t instead of atomic_t for reference countingWeihang Li3-8/+8 2021-06-08RDMA/hns: Use refcount_t instead of atomic_t for QP reference countingWeihang Li2-7/+7 2021-06-08RDMA/hns: Use refcount_t instead of atomic_t for SRQ reference countingWeihang Li2-5/+5 2021-06-08RDMA/hns: Use refcount_t instead of atomic_t for CQ reference countingWeihang Li2-5/+5 2021-06-08RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_portWeihang Li1-4/+4 2021-06-08RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_memberWeihang Li1-6/+6 2021-06-08RDMA/core: Remove refcount from struct ib_mad_snoop_privateJason Gunthorpe1-1/+0 2021-06-08RDMA/core: Use refcount_t instead of atomic_t on refcount of iwpm_admin_dataWeihang Li2-5/+9 2021-06-08RDMA/core: Use refcount_t instead of atomic_t on refcount of iwcm_id_privateWeihang Li2-6/+5 2021-06-07RDMA/irdma: Fix return error sign from irdma_modify_qpKamal Heib1-1/+1 2021-06-07RDMA/irdma: Fix spelling mistake "Allocal" -> "Allocate"Colin Ian King1-1/+1 2021-06-07RDMA/irdma: remove redundant initialization of variable valColin Ian King1-1/+1 2021-06-07RDMA/irdma: remove extraneous indentation on a statementColin Ian King1-1/+1 2021-06-07RDMA/irdma: Fix issues with u8 left shift operationColin Ian King1-1/+1 2021-06-04RDMA/cxgb4: Fix missing error code in create_qp()Jiapeng Chong1-0/+1 2021-06-03RDMA/bnxt_re: Update maintainers listDevesh Sharma1-2/+0 2021-06-03RDMA/bnxt_re: Enable global atomic ops if platform supportsDevesh Sharma6-3/+37 2021-06-03RDMA/rxe: Fix failure during driver loadKamal Heib1-3/+7 2021-06-03RDMA/rxe: Protext kernel index from user spaceBob Pearson10-98/+305 2021-06-03RDMA/rxe: Protect user space index loads/storesBob Pearson1-51/+117 2021-06-03RDMA/rxe: Add a type flag to rxe_queue structsBob Pearson5-13/+28 2021-06-02RDMA/irdma: Update MAINTAINERS fileShiraz Saleem1-0/+8 2021-06-02RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iwShiraz Saleem38-28996/+41