From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36F01C43381 for ; Fri, 8 Mar 2019 17:33:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1801020868 for ; Fri, 8 Mar 2019 17:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726939AbfCHRdS (ORCPT ); Fri, 8 Mar 2019 12:33:18 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:46632 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726171AbfCHRdP (ORCPT ); Fri, 8 Mar 2019 12:33:15 -0500 Received: (qmail 5289 invoked by uid 2102); 8 Mar 2019 12:33:14 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 8 Mar 2019 12:33:14 -0500 Date: Fri, 8 Mar 2019 12:33:14 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Oliver Neukum cc: Kento.A.Kobayashi@sony.com, , , , , Subject: Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port In-Reply-To: <1552063928.29776.2.camel@suse.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Mar 2019, Oliver Neukum wrote: > On Fr, 2019-03-08 at 09:13 +0000, Kento.A.Kobayashi@sony.com wrote: > > The usb_reset_and_verify_device included in usb_reset_device fails > > with -ENODEV after power off hub port, and the -ENODEV error will > > be reported to uas_eh_bus_reset_handler and upper layer, so it > > doesn't need to do rebind if -ENODEV happens. > > 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. > > NACK > > Sorry > Oliver Note that the reset routines in usb-storage do not make any exceptions for -ENODEV. Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: usb: uas: fix usb subsystem hang after power off hub port From: Alan Stern Message-Id: Date: Fri, 8 Mar 2019 12:33:14 -0500 (EST) To: Oliver Neukum Cc: Kento.A.Kobayashi@sony.com, gregkh@linuxfoundation.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org List-ID: T24gRnJpLCA4IE1hciAyMDE5LCBPbGl2ZXIgTmV1a3VtIHdyb3RlOgoKPiBPbiBGciwgMjAxOS0w My0wOCBhdCAwOToxMyArMDAwMCwgS2VudG8uQS5Lb2JheWFzaGlAc29ueS5jb20gd3JvdGU6Cj4g PiBUaGUgdXNiX3Jlc2V0X2FuZF92ZXJpZnlfZGV2aWNlIGluY2x1ZGVkIGluIHVzYl9yZXNldF9k ZXZpY2UgZmFpbHMKPiA+IHdpdGggLUVOT0RFViBhZnRlciBwb3dlciBvZmYgaHViIHBvcnQsIGFu ZCB0aGUgLUVOT0RFViBlcnJvciB3aWxsCj4gPiBiZSByZXBvcnRlZCB0byB1YXNfZWhfYnVzX3Jl c2V0X2hhbmRsZXIgYW5kIHVwcGVyIGxheWVyLCBzbyBpdAo+ID4gZG9lc24ndCBuZWVkIHRvIGRv IHJlYmluZCBpZiAtRU5PREVWIGhhcHBlbnMuCj4gCj4gSGksCj4gCj4gbm8gSSBhbSBzb3JyeSwg dGhhdCBpcyBhbiBhc3N1bXB0aW9uIHlvdSBqdXN0IGNhbm5vdCBtYWtlLgo+IEFueXRoaW5nIGNh biB0cmlnZ2VyIGEgcmVzZXQuIFRoYXQgYmVpbmcgU0NTSSBpcyB0aGUgY29tbW9uCj4gY2FzZSBj ZXJ0YWlubHksIGJ1dCBub3QgdGhlIG9ubHkgY2FzZS4gQW5kIGluIHRob3NlIGNhc2VzCj4gd2Ug Y2Fubm90IGRlcGVuZCBvbiB1cHBlciBsYXllcnMgZG9pbmcgdGhlIHJpZ2h0IHRoaW5nLCBpZgo+ IHdlIGp1c3QgaWdub3JlIGFuIGVycm9yLgo+IAo+IE5BQ0sKPiAKPiAJU29ycnkKPiAJCU9saXZl cgoKTm90ZSB0aGF0IHRoZSByZXNldCByb3V0aW5lcyBpbiB1c2Itc3RvcmFnZSBkbyBub3QgbWFr ZSBhbnkgZXhjZXB0aW9ucwpmb3IgLUVOT0RFVi4KCkFsYW4gU3Rlcm4K From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern Subject: Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port Date: Fri, 8 Mar 2019 12:33:14 -0500 (EST) Message-ID: References: <1552063928.29776.2.camel@suse.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1552063928.29776.2.camel@suse.com> Sender: linux-kernel-owner@vger.kernel.org To: Oliver Neukum Cc: Kento.A.Kobayashi@sony.com, gregkh@linuxfoundation.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org List-Id: linux-scsi@vger.kernel.org On Fri, 8 Mar 2019, Oliver Neukum wrote: > On Fr, 2019-03-08 at 09:13 +0000, Kento.A.Kobayashi@sony.com wrote: > > The usb_reset_and_verify_device included in usb_reset_device fails > > with -ENODEV after power off hub port, and the -ENODEV error will > > be reported to uas_eh_bus_reset_handler and upper layer, so it > > doesn't need to do rebind if -ENODEV happens. > > 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. > > NACK > > Sorry > Oliver Note that the reset routines in usb-storage do not make any exceptions for -ENODEV. Alan Stern