Re: BUG: Soft lockup calling xhci_free_streams in 4.12-rc6 when USB-C hub and SSD is connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.06.2017 10:06, rocko r wrote:
Does the Samsung 840 EVO SSD support UAS (USB attached SCSI?) i.e. does
it use the uas driver instead of mass-storage?

I don't think UAS is an issue here: I tried disabling it for the SSD
using a quirk (ie with the line "options usb_storage
quirks=174c:1053:u" in the file /etc/modprobe.d/usb_storage.conf) and
the kernel still locked up.

Could you take full logs from boot with xhci debugging and tracing both enabled?

See attached. The SSD is /dev/sda and /media/cat is where it tries to
mount /dev/sda1, and there's a NULL dereference at 32.736157 that
might be the cause of the lockup.

Thanks, looks like UAS and xhci streams are still in use.
This is most likely a simple off by one error. stream ID 0 is not
valid, and turns out we actually have no stream ring allocated for
ep->stream_info->stream_rings[0]

In all other places we we start stream_id indexing from 1, except in this case
when bailing out for a suddenly removed (hotplug) xHC host.

does this help:

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 03f63f5..e555a9c 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -845,11 +845,11 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
                        (ep->ep_state & EP_GETTING_NO_STREAMS)) {
                int stream_id;
- for (stream_id = 0; stream_id < ep->stream_info->num_streams;
+               for (stream_id = 1; stream_id < ep->stream_info->num_streams;
                                stream_id++) {
                        xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
                                        "Killing URBs for slot ID %u, ep index %u, stream %u",
-                                       slot_id, ep_index, stream_id + 1);
+                                       slot_id, ep_index, stream_id);
                        xhci_kill_ring_urbs(xhci,
                                        ep->stream_info->stream_rings[stream_id]);
                }

Thanks
Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux