Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716AbdF1NYG (ORCPT ); Wed, 28 Jun 2017 09:24:06 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:60850 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbdF1NX7 (ORCPT ); Wed, 28 Jun 2017 09:23:59 -0400 From: Dennis Wassenberg Organization: secunet Security Networks To: CC: , Subject: usb data toggle reset in xhci_endpoint_reset Message-ID: <05404e0c-a551-11f7-ed1b-785afd16e3f6@secunet.com> Date: Wed, 28 Jun 2017 15:17:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 8DCD4760-FB11-4703-AF4B-A9AE0A4577EF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4235 Lines: 57 Hi all, I have a question regarding the usb data toggle reset patch at https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/log/?h=ep_reset_halt_test I know that it is just experimental. Now I am in the situation that I need exactly this data toggle reset. I want to flash a radio unit via VBox using XHCI emulation. The radio unit itself is USB 2.0 connected to the host via XHCI (no EHCI available at Lenovo T460s). I made some tests and in some cases it works pretty well. But in some situations I got the following errors: [ 307.703605] usb 2-2: new full-speed USB device number 8 using xhci_hcd [ 310.647551] usb 2-2: new full-speed USB device number 10 using xhci_hcd [ 310.818060] usb 2-2: New USB device found, idVendor=0cad, idProduct=9006 [ 310.818065] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 310.818069] usb 2-2: Product: TETRA Radio [ 310.818071] usb 2-2: Manufacturer: Motorola Solutions, Inc. [ 310.819515] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 310.819735] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 310.820200] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 310.820417] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 310.821376] xhci_hcd 0000:00:14.0: Endpoint 0x3 ep reset callback called [ 310.821796] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 5 [ 310.822262] xhci_hcd 0000:00:14.0: Endpoint 0x84 ep reset callback called [ 310.822453] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 8 [ 357.882021] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 357.882257] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 357.883463] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 357.883698] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 358.163174] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 358.163413] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 358.164459] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 358.164694] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 363.740553] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 363.740952] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 363.742442] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 363.742667] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 363.759807] xhci_hcd 0000:00:14.0: Endpoint 0x3 ep reset callback called [ 363.760047] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 5 [ 363.761298] xhci_hcd 0000:00:14.0: Endpoint 0x84 ep reset callback called [ 363.761422] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 8 [ 366.364290] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 366.364527] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 366.366071] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 366.366296] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 367.364950] xhci_hcd 0000:00:14.0: Endpoint 0x1 ep reset callback called [ 367.365190] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 1 [ 367.366608] xhci_hcd 0000:00:14.0: Endpoint 0x82 ep reset callback called [ 367.366828] xhci_hcd 0000:00:14.0: Reset toggle/seq for slot 11, ep_index: 4 [ 368.426103] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 368.426106] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000308a8e000 trb-start 0000000308a8e020 trb-end 0000000308a8e020 seg-start 0000000308a8e000 seg-end 0000000308a8eff0 [ 368.426379] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 368.426381] xhci_hcd 0000:00:14.0: Looking for event-dma 0000000308a8e010 trb-start 0000000308a8e020 trb-end 0000000308a8e020 seg-start 0000000308a8e000 seg-end 0000000308a8eff0 [ 375.608459] usb 2-2: USB disconnect, device number 10 Are there any hints what I can try or can somebody give me a hint whats wrong there? Thank you & best regards, Dennis