Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4673052rdh; Wed, 29 Nov 2023 07:41:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFF7gw6t+S21JmUX5qT4Enu4nlqo8CNB9TOYVoh7+0OtZ2AsH5Qv5dFiCG+waPgQLvPCvU/ X-Received: by 2002:a05:6a00:35ce:b0:6cb:8c91:682 with SMTP id dc14-20020a056a0035ce00b006cb8c910682mr22089280pfb.29.1701272464206; Wed, 29 Nov 2023 07:41:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701272464; cv=none; d=google.com; s=arc-20160816; b=bJQ8lKhBXMFhCU6n1TDtAOcWs+8Y2lTDnhCGiCLZhSw+Zy9wda0Jo2sxHLq0IIXpib HpEGYkkHKG7SVFhJ64/Ks+Xc+bdU6yBijjPm58U6wnVt9RGWg0yob6bv6VdXd6WOOnDS bZLuMCOq3P85LrYkpr8zJ8YMvljRSOMTq6JO15/fpbjCzQkOaHQrju0Y0RS/R+2oBI0s +01nnJAmQLqaIimPYlCYogIkT352ZSnPgWbFZoolMtQf8pSv9yv1DmnQZhK7RZZpEK4a TbXSPmjtYMtNJb3IUIfTMnj6c4y0sMDZDxazcjjVq7sW3eDH9cjNv0p1h9tWfYgQTePh Qg4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qvWaEE7U09+gzk0xilQnnxPFMa2iuwYB6Ek0wADIGpg=; fh=g3YEzEuJKE/gVgfIRF5swA1uAc+GryeMGIRovCajKsQ=; b=eNlGJzRTefCdH4+7gm/sqD009MoQT2zQyj3c9I+Iv90fEcetPKGQeD5dLPeRYfTo2y UVWguHWlLsGISIi9zHUC3PFc4/ksaoiSop/bjwBhZrQK0bD1HBhI4aVCCgXB4fSTdsY1 t5CYup7dyfJ3GXtm2HIvs/UjmuDMnJ1997GlxhZ0L01+p4bb/H0TCy78H3V0M0tJNha9 kDOuzf+eFX9QYDWOQzB6eeWY2kSvU2CY+C7+VarOL3fA4lqYqrjRrExtU6gKDad1s8OR U0RcXJpFgmGQzLKF7Y4YESKw3OxKQ6qCS2kW//IMYZRgMp7mqYZECNvol7qNVOoKKbRt yTrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id g4-20020a635204000000b005be1ee5c3f2si14303146pgb.289.2023.11.29.07.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 07:41:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E23F58035115; Wed, 29 Nov 2023 07:41:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234904AbjK2Pkr (ORCPT + 99 others); Wed, 29 Nov 2023 10:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbjK2Pkk (ORCPT ); Wed, 29 Nov 2023 10:40:40 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 2829FD46 for ; Wed, 29 Nov 2023 07:40:44 -0800 (PST) Received: (qmail 206768 invoked by uid 1000); 29 Nov 2023 10:40:43 -0500 Date: Wed, 29 Nov 2023 10:40:43 -0500 From: Alan Stern To: Oliver Neukum Cc: Jose Ignacio Tornos Martinez , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: ax88179_178a: avoid failed operations when device is disconnected Message-ID: <51cb747a-21fe-4b3b-9567-01b9cc9d8873@rowland.harvard.edu> References: <20231129151618.455618-1-jtornosm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 29 Nov 2023 07:41:02 -0800 (PST) On Wed, Nov 29, 2023 at 04:33:58PM +0100, Oliver Neukum wrote: > On 29.11.23 16:16, Jose Ignacio Tornos Martinez wrote: > > Hi, > > > The reason is that although the device is detached, normal stop and > > unbind operations are commanded. Avoid these unnecessary operations > > when the device is detached (state is USB_STATE_NOTATTACHED) so as > > not to get the error messages. > > I am sorry, but this is a layering violation. You are looking > at an internal state of the USB layer to surpress logging > -ENODEV. If you think these messages should go away, filter > for ENODEV where they are generated. Indeed. In addition, you should be more careful about the distinction between "unbound" and "disconnected". It's possible for the driver to be unbound from the device even while the device is still plugged in. In this situation, submitting URBs will fail with an error even though the device state isn't USB_STATE_NOTATTACHED. Alan Stern