From: Oliver Neukum <oneukum@suse.com>
To: James Dutton <james.dutton@gmail.com>,
Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: USB disk disconnect problems
Date: Mon, 22 Aug 2022 12:03:27 +0200 [thread overview]
Message-ID: <921cd023-3766-6eed-171b-7e5f954d890d@suse.com> (raw)
In-Reply-To: <CAAMvbhE4N92eqihSuj_bUvm=aiC-q-sAacFRa6FJ51+RjDhj6A@mail.gmail.com>
On 22.08.22 00:56, James Dutton wrote:
> I see these messages in the syslog during the suspend/resume cycle:
> <6>1 2022-08-21T23:18:57+01:00 nvme2 kernel - - - [ 1127.688557] usb
> 4-2: reset SuperSpeed USB device number 2 using xhci_hcd
> <4>1 2022-08-21T23:18:57+01:00 nvme2 kernel - - - [ 1127.782252] usb
> 4-2: Enable of device-initiated U1 failed.
> <4>1 2022-08-21T23:18:57+01:00 nvme2 kernel - - - [ 1127.784263] usb
> 4-2: Enable of device-initiated U2 failed.
>
> Is U1/U2 failing a problem that could maybe be causing the problems I have seen?
> The error is in the logs, but the resume works, and the disk is accessible.
That is power management. And for a disk to use only power
managementunder the host's control is not a problem.
> When the real problem occurs (not during suspend/resume), an extract here:
> <6>1 2022-05-04T14:32:53+01:00 nvme2 kernel - - - [20782.100705] sd
> 0:0:0:0: [sda] tag#8 uas_eh_abort_handler 0 uas-tag 2 inflight: CM
A timeout has happened.
> <6>1 2022-05-04T14:32:53+01:00 nvme2 kernel - - - [20782.100707] sd
> 0:0:0:0: [sda] tag#8 CDB: Write(10) 2a 00 1c 51 11 20 00 00 20 00
> <6>1 2022-05-04T14:32:53+01:00 nvme2 kernel - - - [20782.115321] scsi
> host0: uas_eh_device_reset_handler start
At that time the SCSI layer does not know why a timeout has happened, so
it starts generic error hanfdling, involving a reset.
> <6>1 2022-05-04T14:32:53+01:00 nvme2 kernel - - - [20782.248337] usb
> 4-1: reset SuperSpeed USB device number 2 using xhci_hcd
> <4>1 2022-05-04T14:32:58+01:00 nvme2 kernel - - - [20787.463620]
> xhci_hcd 0000:00:14.0: Trying to add endpoint 0x83 without dropping
> it.
This should not happen
> <3>1 2022-05-04T14:32:58+01:00 nvme2 kernel - - - [20787.463633] usb
> 4-1: failed to restore interface 0 altsetting 1 (error=-110)
> <6>1 2022-05-04T14:32:58+01:00 nvme2 kernel - - - [20787.471524] scsi
> host0: uas_eh_device_reset_handler FAILED err -19
> <6>1 2022-05-04T14:32:58+01:00 nvme2 kernel - - - [20787.471540] sd
> 0:0:0:0: Device offlined - not ready after error recovery
In this case the kernel does not think that your device has been
disconnected. All error handling has failed. It gives up on the
device but it is still know to the system.
> So, it is attempting to recover, but the recovery fails.
> What is error -110 and err -19 ?
-19 is ENODEV
-110 is ETIMEDOUT
Those numbers are to be found in
include/uapi/asm-generic/errno-base.h
include/uapi/asm-generic/errno.h
> Are there any "quirks" that I could try enabling in relation to reset problems?
Probably not. Is this log complete?
Regards
Oliver
next prev parent reply other threads:[~2022-08-22 10:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 11:17 USB disk disconnect problems James Dutton
2022-08-21 14:47 ` Alan Stern
2022-08-21 16:36 ` James Dutton
2022-08-21 16:40 ` James Dutton
2022-08-21 18:11 ` Alan Stern
[not found] ` <CAA6KcBC2wEc78fgrMLBfbyEinR3rVUY6z8HeUbE=wtv0c4BP2Q@mail.gmail.com>
2022-08-21 19:03 ` Alan Stern
2022-08-21 20:03 ` Matthew Dharm
2022-08-21 20:59 ` James Dutton
2022-08-21 21:26 ` Matthew Dharm
2022-08-21 22:56 ` James Dutton
2022-08-22 10:03 ` Oliver Neukum [this message]
2022-08-22 10:18 ` Oliver Neukum
2022-10-03 18:04 ` James Dutton
2022-10-03 18:17 ` Alan Stern
2022-10-03 20:21 ` James Dutton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=921cd023-3766-6eed-171b-7e5f954d890d@suse.com \
--to=oneukum@suse.com \
--cc=james.dutton@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox