Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1490040lqe; Mon, 8 Apr 2024 10:13:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUT/Z5ceL3XCrzj9XXmlgMJe9Ubmdoc0Jl9YpSvXZszirI9CFzDW1pa/J9JFe3N4V5yLpPyKr33zHato1wDg7qoSLyRJs4DBrqTXZo5jw== X-Google-Smtp-Source: AGHT+IFDSjPqARvJVhibgjAWTF7CvWyOD+rLhReLm5U8vUcT21RTINFTYyi/DQjL3qEk9SIRQwuO X-Received: by 2002:a17:902:f9c6:b0:1e2:58b7:2dd6 with SMTP id kz6-20020a170902f9c600b001e258b72dd6mr337289plb.21.1712596427761; Mon, 08 Apr 2024 10:13:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712596427; cv=pass; d=google.com; s=arc-20160816; b=MpFmldtgj7J8R8nPneIuZTqLR3ooGv0Ugpc71fOeqexiqkPeRPlzaiJEwWapy4onHq mjNTqhWD8EXZR+4aEgfYfMZ8e544m7aLb+nFYFAQDS+2lDxqnzwtemmDs8/pcrHO5v7u cxkBq3bDCXAdYQDvh1F7K5DUU8/rVi0OVM2BWsmaifsJMnn3+mMJ0/7svEPErizxwr9C 2pAHhFIwXBUmZCWyynjz63TWqCKoGG1387A/32gm7632vjchfyQbkJq8JKlud4zuDsPS 3xzIwgpkgeLLKNh3Pr/pGCH65Bhz7yXB4750pKAoowmeA09Q/9EtPYDHoaPuz6vfiK9C 4k2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=bc3cRik3cEPXbcXHQIky6dUQnP+R+p6a/MDFQ3hm7jU=; fh=pL65WHCav4DYzdcAgaLJa0nGc66kwX8nb8ZPsLgLw0M=; b=vSf3L7o05FgYtupwUOZ8lNb3OjTHdOYmnJwSbGsSzdRjF7Hyd2YXHdHy1RAhPPOTAx dJjITgjHZJDn6/8VUVqlENqeeS3QgyVM89phYSfotaqYtf/5t/biGTVhYlWKLrj+ICH3 6jpfXnvI13AIdARUIJpwaPEudyRBG6uoo9HDWe3x/sJzUn0+HCw49cMxXc2XghJrK7Ri amocOuAzMsLx0+g7qypatEriifAYKh8oLZyvdx9o5XbWwAfgAkNdFk8jvtgB4lJD0wSK OYdbYYJC5NcCBdcYTUj/UEUaru9KJdqkl1/4soYaGhPS+ojftBSYy0lWRu65AWEmx2vD pplA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-135693-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135693-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 142-20020a630194000000b005d8e352afefsi6708741pgb.695.2024.04.08.10.13.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 10:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135693-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-135693-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135693-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B92FDB28802 for ; Mon, 8 Apr 2024 16:38:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E317142E70; Mon, 8 Apr 2024 16:38:04 +0000 (UTC) Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3225E142645; Mon, 8 Apr 2024 16:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=141.14.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712594283; cv=none; b=ZEgsmDFh51gZEWRTtjdG40sOmOhYyi17hQs9L24JiFVCJRrOOzosySXJDQSsEd4LwCbhVDb+m8HyojHlqXp6aCs4zFICgaIjamkS+LdaQEzXbR0pXGK9qw0KcJ4mV1L7d+8J7zQnNTSxlxs2FPQgFSc0Z9OnsJYfaJOGf/4MKYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712594283; c=relaxed/simple; bh=tHxJ3krplcWnanw+f2gs+vuLQSJPq5GNtNrhO6CiBXk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fqIWgjiVOb9mjkdblnx2OQ1EIOmCF2n4U+9I3A2mPr8KSGzCgs+dWdzYU4IQUq+1924BVGy5hKy6k8edX9s9HYF4BEA1gSmCBT+O+IGPdWbPratfjr5F04C/0Mdfa4I4gWz0l33y6z6isyiJEm3WVmLn+SNVv+uzTuUSHvd+JOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de; spf=pass smtp.mailfrom=molgen.mpg.de; arc=none smtp.client-ip=141.14.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=molgen.mpg.de Received: from [192.168.0.2] (ip5f5af0ad.dynamic.kabel-deutschland.de [95.90.240.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 2DF9361E5FE01; Mon, 8 Apr 2024 18:37:23 +0200 (CEST) Message-ID: Date: Mon, 8 Apr 2024 18:37:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 To: Mathias Nyman , =?UTF-8?Q?Micha=C5=82_Pecio?= Cc: Mathias Nyman , linux-usb@vger.kernel.org, LKML References: <58bca6f2-797a-4e20-a476-2294309afdd5@molgen.mpg.de> <20240405113247.743e34b2@foxbook> <7090d3af-18ce-40e1-8ac2-bf18152e5c4a@molgen.mpg.de> <20240406183659.3daf4fa0@foxbook> <20240407142542.036fb02f@foxbook> <1f64af9a-0618-a7da-4acc-f043b6580308@linux.intel.com> Content-Language: en-US From: Paul Menzel In-Reply-To: <1f64af9a-0618-a7da-4acc-f043b6580308@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Mathias, dear Michał, Thank you very much for your assistance. Am 08.04.24 um 09:17 schrieb Mathias Nyman: > On 7.4.2024 15.25, Michał Pecio wrote: >> This (and the absence of any earlier errors on the endpoint) looks >> like the hardware may be confirming a "successful" transfer twice or >> the driver may be processing one such confirmation twice. > > It's also possible this TD/TRB was cancelled due to the disconnect. > Could be that even if driver removes the TD from the list and cleans out > the TRB from the ring buffer (turns TRB to no-op) hardware may have read > ahead and cached the TRB, and process it anyway. > >> [   94.088594] usb 1-2: USB disconnect, device number 8 >> [   94.089370] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 >> [   94.089403] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001250310f0 trb-start 0000000125031100 trb-end 0000000125031100 seg-start 0000000125031000 seg-end 0000000125031ff0 >> [   94.089427] xhci_hcd 0000:00:14.0: last xhci_td_cleanup: first_dma 1250310f0 last_dma 1250310f0 status -115 from finish_td >> >> (I say "successful" but it really isn't - the device is no longer >> listening. But there is no delivery confirmation on isochronous OUT >> endpoints so the xHC doesn't suspect anything.) >> >> Could you try again with this updated debug patch to get more info? > > Would also be helpful to add xhci dynamic debug and xhci tracing (two > separate logs). These will show in detail everything that is going on. > > Steps: > > mount -t debugfs none /sys/kernel/debug > echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control > echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control > echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb > echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable > echo 1 > /sys/kernel/debug/tracing/tracing_on > < Reproduce issue > > Send output of dmesg > Send content of /sys/kernel/debug/tracing/trace > > please copy the /sys/kernel/debug/tracing/trace file somewhere as soon > as possible after reproducing the issue. It grows fast. For posterity I created Linux Kernel Bugzilla issue #218695 [1], and attached the files there. Hopefully everything was captured, that you need. The discussion could continue on this list, but do as it suits you best. Kind regards, Paul [1]: https://bugzilla.kernel.org/show_bug.cgi?id=218695