Re: xhci handling ring expansion

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

 



hi David:

2014-06-18 16:45 GMT+08:00 David Laight <David.Laight@xxxxxxxxxx>:
> From: vichy
>> hi david:
> ...
>> > From one of the patches (not applied) I sent last November ...
>> > Include the unknown address when the DMA pointer from an event isn't part
>> > of the current TD. This will happen if the error code is "TRB error".
>
>> do you mean below patch?
>> http://markmail.org/message/74qvwz7fhjxqeih3
>> it only add debug message instead of fixing it.
>>
>> appreciate your help,
>
> In my case there was a coding error in one of the other xhci
> patches that caused a 'TRB error' report.
> The patch to change the tracing was an attempt to make things
> less confusing.
>
> If you modify the tracing you might find out where the pointer from
> the event came from.
I modify your patch like below
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7f76a49..17d5ad0 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2456,6 +2456,11 @@ static int handle_tx_event(struct xhci_hcd *xhci,
                goto cleanup;
        }

+       if (status && status != -EINPROGRESS)
+                       xhci_dbg(xhci, "event status %d, buffer %llx,
len %x, flags %x\n",
+                                                       status,
event->buffer, event->transfer_len,
+                                                       event->flags);
+
        do {
                /* This TRB should be in the TD at the head of this ring's
                 * TD list.
@@ -2522,9 +2527,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
                                        goto cleanup;
                                }
                                /* HC is busted, give up! */
-                               xhci_err(xhci,
-                                       "ERROR Transfer event TRB DMA ptr not "
-                                       "part of current TD\n");
+                               xhci_err(xhci, "ERROR Transfer event
TRB DMA ptr %lld not part of current TD\n",event->buffer);
+                               xhci_err(xhci, "trb_comp_code = 0x%x,
event status %d, buffer %llx, len %x, flags %x\n",trb_comp_code,
+
status, event->buffer, event->transfer_len,
+                                                               event->flags);
                                return -ESHUTDOWN;
                        }

and I get error message as
platform-xhci: ERROR Transfer event TRB DMA ptr 483702160 not part of current TD
platform-xhci: trb_comp_code = 0x1, event status -115, buffer
1cd4b590, len 1000000, flags 1038001

that seems wired.
complete code is success and not short package.
Why we still get TRB DMA will not be part of current TD?

appreciate your help,
--
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