Commit d5dbf1cb56d041075a3ad98153030d7cb7232a4d

Authored by Hans de Goede
Committed by Greg Kroah-Hartman
1 parent 769459b97e

xhci: Treat not finding the event_seg on COMP_STOP the same as COMP_STOP_INVAL

commit 9a54886342e227433aebc9d374f8ae268a836475 upstream.

When using a Renesas uPD720231 chipset usb-3 uas to sata bridge with a 120G
Crucial M500 ssd, model string: Crucial_ CT120M500SSD1, together with a
the integrated Intel xhci controller on a Haswell laptop:

00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)

The following error gets logged to dmesg:

xhci error: Transfer event TRB DMA ptr not part of current TD

Treating COMP_STOP the same as COMP_STOP_INVAL when no event_seg gets found
fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

drivers/usb/host/xhci-ring.c
... ... @@ -2612,7 +2612,8 @@
2612 2612 * last TRB of the previous TD. The command completion handle
2613 2613 * will take care the rest.
2614 2614 */
2615   - if (!event_seg && trb_comp_code == COMP_STOP_INVAL) {
  2615 + if (!event_seg && (trb_comp_code == COMP_STOP ||
  2616 + trb_comp_code == COMP_STOP_INVAL)) {
2616 2617 ret = 0;
2617 2618 goto cleanup;
2618 2619 }