Return-Path: Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57313 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753927AbeAKLWd (ORCPT ); Thu, 11 Jan 2018 06:22:33 -0500 Date: Thu, 11 Jan 2018 12:22:34 +0100 From: Greg KH To: Oliver Neukum Cc: linux-usb@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] usb: uas: unconditionally bring back host after reset Message-ID: <20180111112234.GA16268@kroah.com> References: <20180111105954.8024-1-oneukum@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180111105954.8024-1-oneukum@suse.com> Sender: stable-owner@vger.kernel.org List-ID: 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 > Reported-by: Hans de Goede > CC: stable@vger.kernel.org > --- > Makefile | 2 +- I don't think you want me to patch this file :)