Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2140922pxb; Fri, 5 Mar 2021 08:09:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuBoJhMac+LQt+kOYX+NRCvC59I36XA+zoNFzWAvh0m4zycGaI6HjIQjF1Dee5sW+YdboZ X-Received: by 2002:a17:906:719b:: with SMTP id h27mr2783399ejk.123.1614960557993; Fri, 05 Mar 2021 08:09:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614960557; cv=none; d=google.com; s=arc-20160816; b=Ro4GuNT7h64htjPCOHBdkskX/0KMNLvupmw5yiSuNuGfmUlWIs5zBATU7JCZFUFon5 Pz0aoOG6wWVuTL37v0HzomhrLbBz5xkk0Oxh1L0Bk2qBvePtdXTgJFDo5ko0xLRG2cf5 ZkS8R0A+etWfTCjdSmqQDbKDCrUIMBX+tW361bdcLsvEqFiloYr0ZKrC57wrj3ji7oNo 6skZBwnIz7dDiiMLsFBtyceTmONS9m0AEzdcsOr38Hk+XdIoE+Jw8vcfJQgq1SscrRg9 3OkJAZ05HVisMuFVKQ/hqn5K3OLkOVyM3yVTOkKRxwC9v47cGOxo4JsCzVOfQWcsebFM PVrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=C7lnisGx+haSd+kCoADtbFffvXBaTb93tQjhw1laBg8=; b=vdfoXcFpjO8yXybeOrYAg5Th8foynGaxTm7fpCLdj37+u30ekmH5B2Yuiokn1oTwFW UKED74ZYn8cKfJqQ5MipPQvN2DFCnUUtZnrRRaA0zZVrnNlUYFAAYXO+tS7ExnNvmdDY eT687PNk3XtXo9AX1yBuAyDnEnYs00yqFfyatjycddGBqyOG6YeRjQ0knKZWmhc2fY1K UaArMEP3duZynQywnU6v4B2UmmX+Qs2iYJBsjZgkmvWny2lukt6/id1cym9twhVDRHDP 1lotPgAc8uJ2OCJ//g3aAYYTIf7XJePN4B2GHkS3A1200S3IiJHwIcgBer5gXLAartpV IfSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si1747439edc.454.2021.03.05.08.08.53; Fri, 05 Mar 2021 08:09:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbhCEQH4 (ORCPT + 99 others); Fri, 5 Mar 2021 11:07:56 -0500 Received: from netrider.rowland.org ([192.131.102.5]:43041 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S230034AbhCEQH3 (ORCPT ); Fri, 5 Mar 2021 11:07:29 -0500 Received: (qmail 41316 invoked by uid 1000); 5 Mar 2021 11:07:28 -0500 Date: Fri, 5 Mar 2021 11:07:28 -0500 From: Alan Stern To: Sedat Dilek Cc: Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [xhci] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd Message-ID: <20210305160728.GE38200@rowland.harvard.edu> References: <20210301155321.GA1490228@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 05, 2021 at 01:09:16PM +0100, Sedat Dilek wrote: > On Mon, Mar 1, 2021 at 4:53 PM Alan Stern wrote: > [ ... ] > > You can use usbmon on bus 4 to record the USB traffic. It may indicate > > why the resets occur. > > > > Hi Alan, > > I followed the instructions in [1]. > > root# modprobe -v usbmon > > root# ls /sys/kernel/debug/usb/usbmon > 0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u > > root# cat /sys/kernel/debug/usb/usbmon/4u > /tmp/usbmon-log_4u.txt > [ Ctrl+C ] > > I recorded 13:03 - 13:04 (one minute). > > So these xhci-resets should be included: > > [Fri Mar 5 13:03:07 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:07 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:27 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:27 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:27 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:28 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 5 13:03:28 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > > The usbmon-log is attached. > > Unsure how to interpret the log - the kernel-doc says `raw data`. > How can I bring this into a human-readable format? > Can you give me a hand? Don't worry about trying to decode the output. To me it looks like the drive crashes and needs to be reset at times when the computer sends it an ATA command. (Not all ATA commands, but some.) You can prevent this by setting the following module parameter for the usb-storage driver: quirks=174c:55aa:t where the two numbers are the Vendor and Product IDs for the external drive, and the 't' is a quirks flag saying not to use any ATA commands. If this module parameter fixes the problem, we can add a permanent quirk setting to the kernel. Alan Stern