linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Kento.A.Kobayashi@sony.com, gregkh@linuxfoundation.org,
	stern@rowland.harvard.edu
Cc: usb-storage@lists.one-eyed-alien.net, Jacky.Cao@sony.com,
	Kan.Iibuchi@sony.com, No.Tanaka@sony.com,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: usb: uas: fix usb subsystem hang after power off hub port
Date: Tue, 12 Mar 2019 16:37:27 +0100	[thread overview]
Message-ID: <1552405047.21557.7.camel@suse.com> (raw)

On Mo, 2019-03-11 at 08:36 +0000, Kento.A.Kobayashi@sony.com wrote:
> Hi,
> 
> > no I am sorry, that is an assumption you just cannot make.
> > Anything can trigger a reset. That being SCSI is the common case certainly, but not the only case. And in those cases we cannot depend on upper layers doing the right thing, if we just ignore an error.
> 
> While we investigate this issue, we debugged and found usb_reset_and_verify_device will return -NODEV before enter post_reset operation.

Yes, this can happen.

> And the return value(-ENODEV) will be returned to error handler.
> uas_eh_device_reset_handler->usb_reset_device -> usb_reset_and_verify_device (return -ENODEV) Then I wrote that commit message that we think even if we ignore "ENODEV" in post reset to avoid hang issue but the error will also be reported to error handler.
> #If ignore an error and the error will not be reported then it is not good.

Well, what do we do now? Are you saying that the state model SCSI is
using is wrong?

> Additional information about usb-storage driver(usb/storage/usb.c) in usb_stor_post_reset() function, it always return 0 that means rebind will not be execute and this issue doesn't happen.

I am afraid this is only partially correct. The device descriptors can
still fail to match.

	Regards
		Oliver

             reply	other threads:[~2019-03-12 15:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 15:37 Oliver Neukum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-16  2:31 usb: uas: fix usb subsystem hang after power off hub port Kento.A.Kobayashi
2019-04-15 15:32 Alan Stern
2019-04-15 15:18 Alan Stern
2019-04-15  0:27 Kento.A.Kobayashi
2019-04-10  2:11 Martin K. Petersen
2019-04-09 16:45 Alan Stern
2019-04-09 15:16 Bart Van Assche
2019-04-09 14:44 Alan Stern
2019-04-09  2:10 Martin K. Petersen
2019-04-09  1:21 Alan Stern
2019-04-09  0:28 Kento.A.Kobayashi
2019-04-04 19:33 Alan Stern
2019-04-04  3:57 Kento.A.Kobayashi
2019-04-02 14:38 Alan Stern
2019-04-02  0:28 Kento.A.Kobayashi
2019-03-29 14:13 Alan Stern
2019-03-28 16:49 Oliver Neukum
2019-03-28 15:57 Alan Stern
2019-03-28 15:15 Oliver Neukum
2019-03-28  7:53 Kento.A.Kobayashi
2019-03-25 10:34 Oliver Neukum
2019-03-25 10:21 Kento.A.Kobayashi
2019-03-15  2:28 Kento.A.Kobayashi
2019-03-11  8:36 Kento.A.Kobayashi
2019-03-08 17:33 Alan Stern
2019-03-08 16:52 Oliver Neukum
2019-03-08  9:13 Kento.A.Kobayashi

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=1552405047.21557.7.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=Jacky.Cao@sony.com \
    --cc=Kan.Iibuchi@sony.com \
    --cc=Kento.A.Kobayashi@sony.com \
    --cc=No.Tanaka@sony.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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;
as well as URLs for NNTP newsgroup(s).