Re: Fwd: xHCI regression for VIA USB 3.0 controller in handle_cmd_completion

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

 



On 05/28/2014 03:31 PM, Saran Neti wrote:
> Hi,
> 
> I just read your email with "Re: PROBLEM: kernel 3.14.4-1.gbebeb6f +
> USB3 card (xhci driver)" and I think the problem described/bisected
> below is similar or the same.
> 

Hi

This looks like the same cause, great catch.
That patch you bisected was added to 3.13-rc1,
so a 3.12 kernel would probably work for Grant as well

I'm interested in knowing if we get the slot_id mangled, or the TRB's we are
comparing out of sync.

Grant's trace didn't show anything, can you try to add the same trace?

Or even better if you can apply this patch and send me the output (dmesg) after
boot?

Thanks
-Mathias

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7a0e3c7..5575433 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1611,6 +1611,11 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
                xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);
                break;
        case TRB_RESET_DEV:
+               xhci_err(xhci, "RESET_DEV dq:%p dqslot:%d event:%p evslot %d\n",
+                        cmd_trb,
+                        TRB_TO_SLOT_ID(le32_to_cpu(cmd_trb->generic.field[3])),
+                        le64_to_cpu(event->cmd_trb),
+                        slot_id);
                WARN_ON(slot_id != TRB_TO_SLOT_ID(
                                le32_to_cpu(cmd_trb->generic.field[3])));
                xhci_handle_cmd_reset_dev(xhci, slot_id, event);
@@ -4014,6 +4019,11 @@ static int queue_command(struct xhci_hcd *xhci, u32 field1,
u32 field2,
                                        "unfailable commands failed.\n");
                return ret;
        }
+       if (TRB_FIELD_TO_TYPE(field4) == TRB_RESET_DEV)
+               xhci_err(xhci, "Queue reset dev cmd for slot %d at trb %p\n",
+                        TRB_TO_SLOT_ID(field4),
+                        xhci->cmd_ring->enqueue);
+
        queue_trb(xhci, xhci->cmd_ring, false, field1, field2, field3,
                        field4 | xhci->cmd_ring->cycle_state);
        return 0;

--
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