Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2276432pxb; Fri, 5 Mar 2021 11:24:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyjzZVjDhnLE+StbZi3UCaScJ8PDBnEwNuq71rGYsYAItOcLxyH1Ks5MzS+sh0jqDbSBUe X-Received: by 2002:aa7:cd8d:: with SMTP id x13mr10583584edv.286.1614972296223; Fri, 05 Mar 2021 11:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614972296; cv=none; d=google.com; s=arc-20160816; b=pRrOBHEfpcca0ehgunkaErvu1Cq8DGazxFK/mlU+PBKsC48Gqe9G104fqb/b5goFQt +/UuGD9VHxz9Q/MndFESURghumspwZxW4SbLOLUoqtJfTVC/Kz8PYC2X/7Yu1ACzHjr7 ylEX6nw8DUQp6TrDxJGrRzB6KOuQG8y7JDaNMWhjiX0Vf4cNqyVDTyj2kYMpzuYdkGZt dN1fA4ecVWMXqUo4PszFv7BGEeNDt/JOI3tbXmISzF9TjsPWbsWNhz/lXOf4LeNHdNv8 bxmKeATq5/3zFzKu/vB0+bItKj2PPK/XfOR0lTM0B5cviTXZIg5w2gUXt4y2cNqvMakK 6Img== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=yF8EgpFfFBjawtii+lk6KkLM9nijvdEea1xbqL6g9/g=; b=f1fyGJol/wrQ/dLTbTHMXc7xuwGf/r4futQ6sotd5N4urK+4CiSiy8jVF/H/euU5PQ VMphnkeEsRAwyUMHFGMtPPS4ro4RE/jEsebkhz/b4LDHNunh0sPnKBs/wL1nlalq/TlG FlEXlTQcpjeoo3fUaq8CCR6zCjrPZZf+JaBEHE+F+uL5sAuLlj+khPfUfPkXq4AxZKpN A+piAczRjrXhPjDZ7vwjG2x3AeIg5hXoV7PMfafUq3qPyPEcMgq+T1JuBmyqmTM2oFaI Bl2n4beR/3kRUw5Rh9oPPt18FCeQmmdPPqCgzHTKAOjygCn5OVa6RuDvOCSNejGeYRIL qxZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JIFAU906; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si2143870edu.245.2021.03.05.11.24.33; Fri, 05 Mar 2021 11:24:56 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JIFAU906; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229465AbhCETX0 (ORCPT + 99 others); Fri, 5 Mar 2021 14:23:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbhCETW7 (ORCPT ); Fri, 5 Mar 2021 14:22:59 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93762C061574; Fri, 5 Mar 2021 11:22:59 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id o9so3170668iow.6; Fri, 05 Mar 2021 11:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=yF8EgpFfFBjawtii+lk6KkLM9nijvdEea1xbqL6g9/g=; b=JIFAU9065pdD7Usa/GKyrrPKSsOw4kYG5IFYXWVyMz3VAfNEq1qbKgZfIMx/YJm+CE 5JesmlrhcT8perj7SLJloWi+3VMHQIhXjd9tbvyv2yNNr7fsW3+5qMPzuIWMNqOH5fPY Ecr1slyEY8QEq4Dp0M9JXJgj8dWACBlci/gtm9DnxhU2jMASW1agi9lGp5mfINIXeCzb GaZhPt01I6DilwQltRjlCRwqx3qIOC/+BEs+EMX6u3RtOJMRxw0Bn3V0KGhOFB+CEweL M/Jm4fRK5C0gGlPm+cFvYIazjJtNmihBHrd2O2RU9esedx8CX0ZvkyhTX1xIpu/9W2p7 fzSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=yF8EgpFfFBjawtii+lk6KkLM9nijvdEea1xbqL6g9/g=; b=QSc48hXctW5zUTdWoaNAXODhzODPlcgn/H7gWTx1NRPbSTcXnA5J16ZUoyt1lEvpBA nZ+cq3AzHrPJrCv8TDSKVPPZMlsm7muIfnlPQ/4cTh7adpO2NSAncZWmT3h99hj2XbHM wRsjDKnr7zzIT/x/HUMOyKpw11jc+cHb8mf6aYC7aLrruESZ2JeKSnjhodgfzm1Ke/d6 FrmLQVXepu0MDXnCanyHaGJMGqdR0l3jBenp7Q2TY4nEbf7SvGOGjNvKSummV/o06PIP 9pvsW9V4wrD7ewVAQj14pUFkMJSYf1GFXrm5FVpyE3uAH7lYpHYt4tq/OOXTtDIHhill /PsA== X-Gm-Message-State: AOAM5302eipbLE1abZPBCjfX2OqHCobH1S17QvfFFmzcDv+Y/C9xKAVw oHIDzBXFVslT07Qb72Y1RzO/VduVWnce/BQ5Ci8= X-Received: by 2002:a05:6602:1689:: with SMTP id s9mr9079201iow.171.1614972178707; Fri, 05 Mar 2021 11:22:58 -0800 (PST) MIME-Version: 1.0 References: <20210301155321.GA1490228@rowland.harvard.edu> <20210305160728.GE38200@rowland.harvard.edu> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 5 Mar 2021 20:22:22 +0100 Message-ID: Subject: Re: [xhci] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd To: Alan Stern Cc: Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 5, 2021 at 8:05 PM Sedat Dilek wrote: > > On Fri, Mar 5, 2021 at 5:07 PM Alan Stern wrote: > > > > 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. > > > > Thanks Alan. > > I did: > > [ /etc/modules-load.d/usb-storage.conf ] > > # Add quirks for ATA commands for usb-storage devices connected to > ASMedia M1042 USB-3.0 controller > options usb-storage quirks=174c:55aa:t > - EOF - > > It is: > > /lib/modules/5.12.0-rc1-11-amd64-clang13-cfi/kernel/drivers/usb/storage/usb-storage.ko > > But: > > root# lsmod | grep usb | grep storage > usb_storage 90112 2 uas > scsi_mod 307200 6 sd_mod,usb_storage,uas,libata,sg,sr_mod > usbcore 385024 14 > usbserial,xhci_hcd,ehci_pci,usbnet,usbhid,usb_storage,usb_wwan,uvcvideo,ehci_hcd,btusb,xhci_pci,cdc_ether,uas,option > > I have not rebooted yet. > > Interferences with PowerTop? > > These xhci-resets happen every 10mins in a sequence of 4. > > I have here a powertop.service (systemd) with passing --auto-tune option. > That was not a problem with previous Linux-kernels >= v5.12-rc1, so. > > Alan, what do you think? > The quirks match: [Fri Mar 5 20:06:56 2021] usb-storage 4-1:1.0: USB Mass Storage device detected [Fri Mar 5 20:06:56 2021] usb-storage 4-1:1.0: Quirks match for vid 174c pid 55aa: 400000 That seems not to be the trick: root# LC_ALL=C dmesg -T | grep 'usb 4-1:' [Fri Mar 5 20:06:55 2021] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:55 2021] usb 4-1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00 [Fri Mar 5 20:06:55 2021] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [Fri Mar 5 20:06:55 2021] usb 4-1: Product: MEDION HDDrive-n-GO [Fri Mar 5 20:06:55 2021] usb 4-1: Manufacturer: MEDION [Fri Mar 5 20:06:55 2021] usb 4-1: SerialNumber: 3180000000000000092C [Fri Mar 5 20:06:57 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:57 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:57 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:06:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:28 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:30 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:37 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:37 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:38 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:39 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:39 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:39 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:46 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:47 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:48 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:49 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:52 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:52 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:52 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:52 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:53 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:53 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:54 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:54 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:55 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:55 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:55 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:55 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:07:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:09:09 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:17:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:17:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:17:56 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:17:57 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [Fri Mar 5 20:17:57 2021] usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd - Sedat -