Re: [V4.0.0-rc3] Xhci Regression: ERROR Transfer event TRB DMA ptr not part of current TD

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

 



On 10.03.2015 17:36, Jörg Otte wrote:

>>> Any chance you could take a log with xhci debugging enabled before attaching the DVB-T
>>> stick?
>>>
>>> echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control
>>>
>>>
>>
>> here it comes attached.
>>
>>
>>> I'd suspect one of these two patches:
>>>
>>> commit 45ba2154d12fc43b70312198ec47085f10be801a
>>>     xhci: fix reporting of 0-sized URBs in control endpoint
>>>
>>> commit 27082e2654dc148078b0abdfc3c8e5ccbde0ebfa
>>>     xhci: Clear the host side toggle manually when endpoint is 'soft reset'
>>>
> 
> Revert the commits.
> The second one  "xhci: Clear the host side..."  is it !
> 

Yes, thank you

Seems that It wasn't mature enough, I'll revert it.

>From your logs I can see what went wrong, 

If you still have some time, could you try out a patch (attached) and see if it solves the
issue for you. (on top of clean 4.0-rc3). I can't reproduce it with my own USB DVB-T device

-Mathias 

>From a895eb69a63dfef1943f0593da29167bea12100c Mon Sep 17 00:00:00 2001
From: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
Date: Tue, 10 Mar 2015 18:50:45 +0200
Subject: [PATCH] xhci: set correct dequeue status in endpoint soft reset

The endpoint might already processesed some TRBs on the endpiont ring
before we soft reset the endpoint.
Make sure we set the dequeue pointer to where we were befere soft reset

Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
---
 drivers/usb/host/xhci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index b06d1a5..64527a4 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -2972,6 +2972,8 @@ void xhci_endpoint_reset(struct usb_hcd *hcd,
 	unsigned int ep_index, ep_state;
 	unsigned long flags;
 	u32 ep_flag;
+	struct xhci_ep_ctx *ep_ctx;
+	dma_addr_t addr;
 
 	xhci = hcd_to_xhci(hcd);
 	udev = (struct usb_device *) ep->hcpriv;
@@ -3046,6 +3048,9 @@ void xhci_endpoint_reset(struct usb_hcd *hcd,
 					   virt_dev->out_ctx, ctrl_ctx,
 					   ep_flag, ep_flag);
 	xhci_endpoint_copy(xhci, command->in_ctx, virt_dev->out_ctx, ep_index);
+	ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index);
+	addr = xhci_trb_virt_to_dma(virt_ep->ring->deq_seg, virt_ep->ring->dequeue);
+	ep_ctx->deq  = cpu_to_le64(addr | virt_ep->ring->cycle_state);
 
 	xhci_queue_configure_endpoint(xhci, command, command->in_ctx->dma,
 				     udev->slot_id, false);
-- 
1.8.3.2


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

  Powered by Linux