Commit fadb08b3 authored by Faisal Hassan's avatar Faisal Hassan Committed by Treehugger Robot
Browse files

FROMGIT: xhci: Fix Link TRB DMA in command ring stopped completion event



During the aborting of a command, the software receives a command
completion event for the command ring stopped, with the TRB pointing
to the next TRB after the aborted command.

If the command we abort is located just before the Link TRB in the
command ring, then during the 'command ring stopped' completion event,
the xHC gives the Link TRB in the event's cmd DMA, which causes a
mismatch in handling command completion event.

To address this situation, move the 'command ring stopped' completion
event check slightly earlier, since the specific command it stopped
on isn't of significant concern.

Fixes: 7f84eef0 ("USB: xhci: No-op command queueing and irq handler.")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarFaisal Hassan <quic_faisalh@quicinc.com>
Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20241022155631.1185-1-quic_faisalh@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 376206995
(cherry picked from commit 075919f6
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git

 usb-linus)

Change-Id: Ibed0f0b779503cf8b4ad0e32d18e5c62d9a2c32c
Signed-off-by: default avatarFaisal Hassan <quic_faisalh@quicinc.com>
parent 19b68814
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment