Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp154308rdb; Thu, 30 Nov 2023 00:42:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7AOVefo+iPf11wsIR6JUt3YDF+mUCdaxsGISttqpLcgpP4BW/neicv28rtNc6DjxV890d X-Received: by 2002:a17:902:fc45:b0:1d0:220b:f241 with SMTP id me5-20020a170902fc4500b001d0220bf241mr3630640plb.35.1701333747975; Thu, 30 Nov 2023 00:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701333747; cv=none; d=google.com; s=arc-20160816; b=Bhxk+z8To2IaO+tpVOlFh5ViRJter/3iSTI949CVgW7Qm4uylGIY8HFB4va/UCBMpr xiniLn6NLmGRZB6HpGvZ1xIoD8gHmy5nrr61yGOintgI7/klnNt3e1xWzFk8LxwHx1xV iCTocCWlPvWUghusz+NgM9/Bfu0rdZUh3VweKKgF6YDAKkIMUqyrqEeZ5A778G3g0Tn4 169bgKshsTCg+Hj1cF0SqDuSbp8TVzCwNIwzrTQTK8tCuAvd+IMn3cTH32qrCMY7vUas uiF/T0kpjsAjCqe00TU/utUYMm2p9kMLdrrFY2B7dan2lGLMoqTKAmpEimy37eWg8OHd zw6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uTY8JL51negu1oTXaU6QSo32AKHRaSyM59v8HnADJ4Q=; fh=Y6Aom7q0d2Vac2AlUnzDhcOGpWFZhBVMAwEn3JNY6jw=; b=WwLTRB4WuHcFNMu7A1GqkPNaPVgETQAKOHn/SkJdNz5yLKrtVWOx4FtT6xhF4yvZGc YErDSFbx60SIDQ2Rvuauq61TadjwogIEEGzqAptufpTV23TRkF4HJ/OvHWRi3HroHp+c zniowuCl+Rap0RHp55sUZkKck1ZjSnyXZtYX4S7/S5EOHo6yoh+XJ/ukTC6MXWKEHJFk zAsTWsGH2TLGkrUuy0Ej55VO155/P0rSlmcDxS0S9zTVAODqH2ZNpptxbjyDpTTxWUJ0 aoZV1vsLGlY6VAxBGh5qeYhZjxP+3jUK6CqD71VU2H6kh+92hECKWcAJsh2IdrGP5K5M NUgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MFHWq3oB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id e6-20020a170902d38600b001cf67883f24si708342pld.264.2023.11.30.00.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:42:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MFHWq3oB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 854FF826E8EC; Thu, 30 Nov 2023 00:42:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbjK3ImN (ORCPT + 99 others); Thu, 30 Nov 2023 03:42:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjK3ImM (ORCPT ); Thu, 30 Nov 2023 03:42:12 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003EFB2 for ; Thu, 30 Nov 2023 00:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701333738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uTY8JL51negu1oTXaU6QSo32AKHRaSyM59v8HnADJ4Q=; b=MFHWq3oBbjs+nSrDxR/msuyLmFeN+FGtL/XimooT8kUEUy4QvanEWr7LMSgJRH4aP55WpK bkHmPbV/5of/bkourANx0kUtOS68JsijWcVBF5n0EU8eI4iG7CUI/MprRMIGp69mPiEju+ VHYrHl2oOcDi7EQf+83tFAfPzNayRtk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-YQMyGeimOFeWdGrtcbCGkA-1; Thu, 30 Nov 2023 03:42:12 -0500 X-MC-Unique: YQMyGeimOFeWdGrtcbCGkA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6BB03C0C48C; Thu, 30 Nov 2023 08:42:11 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.39.192.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7927C36E2; Thu, 30 Nov 2023 08:41:37 +0000 (UTC) From: Jose Ignacio Tornos Martinez To: stern@rowland.harvard.edu, oneukum@suse.com Cc: davem@davemloft.net, edumazet@google.com, jtornosm@redhat.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com Subject: Re: [PATCH] net: usb: ax88179_178a: avoid failed operations when device is disconnected Date: Thu, 30 Nov 2023 09:41:36 +0100 Message-ID: <20231130084136.172052-1-jtornosm@redhat.com> In-Reply-To: <51cb747a-21fe-4b3b-9567-01b9cc9d8873@rowland.harvard.edu> References: <51cb747a-21fe-4b3b-9567-01b9cc9d8873@rowland.harvard.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 00:42:25 -0800 (PST) Hi Oliver, > 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. Thank you for your comments and suggestion. My intention was also to avoid unnecessary and failed operations if disconnection was detected. Ok, let me research more and do better. Hi Alan, > 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. Thank you for you comments. I also tested "unbound" and stop and unbind operations were correctly executed. I just wanted to avoid the issues during disconnection, if other operations are commanded later I think it is better to warn. Ok, I will try to do better. Best regards Jose Ignacio