LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: "Jörg Otte" <jrg.otte@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
USB list <linux-usb@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Subject: Re: [V4.0.0-rc3] Xhci Regression: ERROR Transfer event TRB DMA ptr not part of current TD
Date: Tue, 10 Mar 2015 19:04:03 +0200 [thread overview]
Message-ID: <54FF2403.5030601@linux.intel.com> (raw)
In-Reply-To: <CADDKRnDNH903yz0Ac=O8z-hAJXZWM+UCAzxz5vxH2nr_j6Nvig@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
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
[-- Attachment #2: 0001-xhci-set-correct-dequeue-status-in-endpoint-soft-res.patch --]
[-- Type: text/x-patch, Size: 1493 bytes --]
>From a895eb69a63dfef1943f0593da29167bea12100c Mon Sep 17 00:00:00 2001
From: Mathias Nyman <mathias.nyman@linux.intel.com>
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@linux.intel.com>
---
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
next prev parent reply other threads:[~2015-03-10 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 9:40 Jörg Otte
2015-03-10 13:06 ` Mathias Nyman
2015-03-10 14:03 ` Jörg Otte
2015-03-10 15:36 ` Jörg Otte
2015-03-10 17:04 ` Mathias Nyman [this message]
2015-03-10 17:29 ` Alan Stern
2015-03-10 18:21 ` Mathias Nyman
2015-03-10 18:49 ` Alan Stern
2015-03-11 7:04 ` Lu, Baolu
2015-03-11 14:03 ` Alan Stern
2015-03-11 15:48 ` Mathias Nyman
2015-03-11 9:00 ` Mathias Nyman
2015-03-11 11:01 ` Jörg Otte
2015-03-11 16:16 ` Jörg Otte
2015-03-12 8:32 ` Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54FF2403.5030601@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jrg.otte@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=torvalds@linux-foundation.org \
--subject='Re: [V4.0.0-rc3] Xhci Regression: ERROR Transfer event TRB DMA ptr not part of current TD' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).