Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1467077pxf; Fri, 12 Mar 2021 10:07:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH+oinqgVbtqaoa3rauJQhIo6cPpvrrJ/Xepl1GAXIgV/2UrMdXYxpTjHb1T2qM8bqJzGb X-Received: by 2002:a05:6402:1383:: with SMTP id b3mr15718832edv.374.1615572435488; Fri, 12 Mar 2021 10:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615572435; cv=none; d=google.com; s=arc-20160816; b=iiRCSymkLxrPHpyqU3nNsn3qpStXmQTvHATgmEUCnrQLwSWJ4zGOqrkb3YJx9jJSRm vVH21rKcEkW4Q4PdORzoV5pWZpScmchyHoGoy60+eFlnzxY7Lk8Tvdjhd/w6bONYKiN8 7aCRNZIuPsX2eJX9ZR+eGHLrp4pACaz+SRUShgDEWr6Z3c/S6By32aWVLtHNsDEdlZS4 qpdT4qwfvtU5FOhy7u6XHzlwOrvRJFVc9DoJDPQQcgyMVg+20nVre6dP47TiG8lb++a1 alaWN8g64zysOhAp0sciSoeJkVUa3aGA0nRmtzEXEIZCVBhzTvpYG9koifoF7E/0x6RE z8CA== 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=p9pHAVgsWBepH8DqYb7Cuqk4qO28cOBD5skbPQtVkX8=; b=Bivjk0BV2senyVuE/GCzX3CFtV57cTLj4gfXgR1cyrz/poYT7anRNKUvF0xTOC4hDr XRATqk5bwfJ+RMzn5wndibhq7/VSlRx8iRpCu5IrBjI5J6dOOxPz1a7Kz46sWu+hBq6M o6UBC3b8X0gtcUTKCpErFzkdCerdBgM1aWIfpMS6jSTQnsZjJHKamzo+urKEvzHsF47Q eW/LFKZPsbvOfsefObksHYqibMVYLDNT12U3HsrkBqfScj20VK5dYM9+frwih4KFXmmS mThFWYlKGl4XvXftw09BRisIH4XlpuSx6UEVuE9Yn209pO725+0J99GkfV5/ZOPuMleF RvPw== 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 u4si4620028eje.631.2021.03.12.10.06.52; Fri, 12 Mar 2021 10:07:15 -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 S231392AbhCLSF4 (ORCPT + 99 others); Fri, 12 Mar 2021 13:05:56 -0500 Received: from netrider.rowland.org ([192.131.102.5]:40355 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S231679AbhCLSFZ (ORCPT ); Fri, 12 Mar 2021 13:05:25 -0500 Received: (qmail 306756 invoked by uid 1000); 12 Mar 2021 13:05:23 -0500 Date: Fri, 12 Mar 2021 13:05:23 -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: <20210312180523.GB302347@rowland.harvard.edu> References: <20210306165808.GD74411@rowland.harvard.edu> <20210307154645.GA103559@rowland.harvard.edu> <20210307170702.GB104554@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 12, 2021 at 06:41:58PM +0100, Sedat Dilek wrote: > OK, now for the records: > > [ /etc/modprobe.d/usb-storage.conf ] > > # Add quirks for USB Mass Storage devices > # > # Link: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html > # > # Option #1: Use Kernel command line parameter > # [1] Usage: usb-storage.quirks= > # [2] VendorID (VID) and ProductID (PID): > # ASMedia M1042 USB-3.0 controller: VID: 174c PID: 55aa > # [3] Flags: > # t = NO_ATA_1X (don't allow ATA(12) and ATA(16) commands, uas only); > # u = IGNORE_UAS (don't bind to the uas driver); > # [4] Example: usb-storage.quirks=174c:55aa:t > # > # Option #2: Set quirk via sysfs > # DEBUG: echo '174c:55aa:t' > /sys/module/usb_storage/parameters/quirks > # > # Option #3: Pass options via /etc/modprobe.d/usb-storage.conf (this file here) > # XXX: Do NOT forget to run `update-initramfs` command! > options usb-storage quirks=174c:55aa:t > - EOF - > > With generating a new /boot/initrd.img via `update-initramfs` this > looks good to me: > > root# LC_ALL=C dmesg -T | egrep -i 'quirks|reset|SCSI ioctl error' > [Fri Mar 12 18:25:56 2021] xhci_hcd 0000:03:00.0: hcc params > 0x0200f180 hci version 0x96 quirks 0x0000000000080000 > [Fri Mar 12 18:25:57 2021] usb-storage 4-1:1.0: Quirks match for vid > 174c pid 55aa: 2400000 > [Fri Mar 12 18:25:57 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:25:57 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:25:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:58 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:25:59 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:00 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:01 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:01 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:02 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:03 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:03 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:03 2021] usb 4-1: reset SuperSpeed Gen 1 USB device > number 2 using xhci_hcd > [Fri Mar 12 18:26:24 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:24 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:29 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:30 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:31 2021] SCSI ioctl error, cmd 85, prog smartd > [Fri Mar 12 18:26:39 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:39 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd A1, prog ata_id > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:40 2021] SCSI ioctl error, cmd 85, prog hdparm > [Fri Mar 12 18:26:43 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:43 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:44 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:49 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:49 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:49 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:49 2021] SCSI ioctl error, cmd 85, prog udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:26:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:28:09 2021] SCSI ioctl error, cmd 85, prog smartctl > [Fri Mar 12 18:28:09 2021] SCSI ioctl error, cmd 85, prog smartctl > [Fri Mar 12 18:28:10 2021] SCSI ioctl error, cmd 85, prog smartctl > [Fri Mar 12 18:28:11 2021] SCSI ioctl error, cmd 85, prog smartctl > [Fri Mar 12 18:36:49 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:49 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:49 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:49 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:49 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd > [Fri Mar 12 18:36:50 2021] SCSI ioctl error, cmd 85, prog pool-udisksd Although it's not conclusive, this log seems to indicate that ata_id is the only program causing resets. Have you tried preventing the ata_id program from running (for example, by renaming it)? > Your diff now should say; s/SCSI ioctl error/SCSI ioctl info'. No, it shouldn't. The log message itself is an info, but the event it reports is an error. > Alan, so "t" flags should be added as a quirks to linux-kernel sources... > > t = NO_ATA_1X (don't allow ATA(12) and ATA(16) commands, uas only); > > ...for my ASMedia USB-3.0 controller? That's not at all clear. This is a very common and popular device, and nobody else has reported these problems. It could be that something is odd about your particular drive or computer, not these drives in general. Alan Stern