linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: usb: uas: unconditionally bring back host after reset
Date: Thu, 11 Jan 2018 12:22:34 +0100	[thread overview]
Message-ID: <20180111112234.GA16268@kroah.com> (raw)

On Thu, Jan 11, 2018 at 11:59:54AM +0100, Oliver Neukum wrote:
> Quoting Hans:
> 
> If we return 1 from our post_reset handler, then our disconnect handler
> will be called immediately afterwards. Since pre_reset blocks all scsi
> requests our disconnect handler will then hang in the scsi_remove_host
> call.
> 
> This is esp. bad because our disconnect handler hanging for ever also
> stops the USB subsys from enumerating any new USB devices, causes commands
> like lsusb to hang, etc.
> 
> In practice this happens when unplugging some uas devices because the hub
> code may see the device as needing a warm-reset and calls usb_reset_device
> before seeing the disconnect. In this case uas_configure_endpoints fails
> with -ENODEV. We do not want to print an error for this, so this commit
> also silences the shost_printk for -ENODEV.
> 
> ENDQUOTE
> 
> However, if we do that we better drop any unconditional execution
> and report to the SCSI subsystem that we have undergone a reset
> but we are not operational now.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> Reported-by: Hans de Goede <hdegoede@redhat.com>
> CC: stable@vger.kernel.org
> ---
>  Makefile                  | 2 +-

I don't think you want me to patch this file :)
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-01-11 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 11:22 Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-11 12:10 usb: uas: unconditionally bring back host after reset Oliver Neukum
2018-01-11 12:10 Oliver Neukum
2018-01-11 10:59 Oliver Neukum

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=20180111112234.GA16268@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=stable@vger.kernel.org \
    /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).