Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2185209imc; Tue, 12 Mar 2019 08:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0mraaMz6d2H/VyOYTaQ8SRJHgr5YQxGaqNsA8IwY7E7p3fA25rCoF5HLrwa+2v6wMrdxk X-Received: by 2002:a62:1ac3:: with SMTP id a186mr39270669pfa.48.1552405099832; Tue, 12 Mar 2019 08:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552405099; cv=none; d=google.com; s=arc-20160816; b=v7MXUUrOEXu2G1LseyUW7MxiTQwq7lc3cIziikPqhDizsy8rLUC5MjcJQOvwnA27mn jlWRhM9ksmH0kTMYpsichmoEvBcDw3qWtlXvpF8eZ32nfGhTt9WS4OWBxUdw28M5Z2IG jmk1b5GuHN3oLy9RSNl0MVst/3wLv4oGe/LRCA8UR+JBCIfs4KrrYBpam8xYkHbumxZy 17QmDHGSBJFt2CW/jGOeSjD1AUXR9lfjCEmGmCC16kqeSL3N8gEmO4udZqlNXdxkhyzY XLXSd8sqE/An5THgru/mbxgCo335MKE+WyKX9gcq7N73sf8485ZArlS9jPwdqGeLx7/c sDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=FZXfs7sLS6CDuM4aWbVCUGDGuA6c/jkBoUPDTip8jj4=; b=hAWBexvJ/ojtjffr+4/CgggsNuTN3edh+S9Tz8b9ePDaEaEagF6IkxTDrgU44ecJsM ApHOx26N2RFNgMAW4DiOQOW3lttX9xD/IA6hAzpRpvMRF8dfxIKQDDvpiV+3iVV+EsaC 6WtFHphONx+Iv0lQT5re1hlVSXvfDVJkCCuPE7lUXUtvmbkB1wU77+YXLrgLgVr/87qj dZiaZbCBpSHqXU4gzTzqmj9DVCwUhJOAmVALdUHRPlAhCdQnVBOTm1ByFRujVLP5070B kqSJxqpJYia3ke9EzzOjUj35QU4Es+AC2dQ3NPhtdyczOS5UQUxGkKR9lBxTseVGK3I8 EtUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si2133710pll.343.2019.03.12.08.38.03; Tue, 12 Mar 2019 08:38:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726848AbfCLPhf (ORCPT + 99 others); Tue, 12 Mar 2019 11:37:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:44810 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726345AbfCLPhf (ORCPT ); Tue, 12 Mar 2019 11:37:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7CA13B172; Tue, 12 Mar 2019 15:37:33 +0000 (UTC) Message-ID: <1552405047.21557.7.camel@suse.com> Subject: Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port From: Oliver Neukum 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 Date: Tue, 12 Mar 2019 16:37:27 +0100 In-Reply-To: References: <1552063928.29776.2.camel@suse.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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