Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1512144pxk; Fri, 18 Sep 2020 14:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDlEXPl8NtFq6w0zuTFVYoFPr+EKDHxdvQvxztHfnXUUHicq3lDX5hke8GvkiTgkwYLCy0 X-Received: by 2002:a17:907:648:: with SMTP id wq8mr39716088ejb.291.1600465731139; Fri, 18 Sep 2020 14:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600465731; cv=none; d=google.com; s=arc-20160816; b=MAkhB4SoZbJ6bTkjSScbePCesRGLmwKVnvntXQlEufxlcbfv51LZMKjmywui5ZOVmU suVwTtUW4Nd92LKkJfdfIOjdxM488ImwSFo/gOUobcbczRyVa+IexntzhkfgjYSbk4Xs jJNFTrVk+1C36VlnPhbunxX0gNURbAR5V+6Z8KkJEuECIoNcTX9096NYltIUwfY7kn23 K7Z8PFgVCIu4cY71mTpoma2O8S9gUob3X8HFkyYN8LOXGoa6xttASTaUtSBH8MFuHVTr 7jJDzetpCMcVnGRjWnWhw8Qv5ihpBctyQOH+sSiEetRE4E7YZX3Z8sUjjEeUfDcvKRk6 od1A== 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:from:subject:cc:to:message-id:date; bh=DTHMOrKpomGZefV5mTlHfuP0fJsiWekvgxxuhL+MKYo=; b=doXGv1TLs91Tn6uHMT4HlMDgiBnKXatT2OxRQpkpJJZ7z7BwMzlX2oVMKzAt7azMru jIb4a+oufp43P1GZX+czf5YNUy3LFPfgxY4vKOo5NOkI/TYY7Avsf5oBpAQqIJibGVvp iVYOFOFvplEQj28iq0oVo+sQ3Q6NkK0IE5UMc/s5HUQPFQUf2tNbMKxNN7fRSI9Mmy7O +bnaba95RMd5N9y/UvYnQ9q2Ft4HaQ6EcrCN3KSnulY/ZbqRWdpsmzilTXyaeAc0qjj1 AZpvjA/gF1HC6YD1HHProXjXHaQNWqC4Rf7ej8W3q4Oi5649yHAh/6A8+ytQFsVtqIXA FkuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qt10si3509101ejb.2.2020.09.18.14.48.25; Fri, 18 Sep 2020 14:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726298AbgIRVrY (ORCPT + 99 others); Fri, 18 Sep 2020 17:47:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgIRVrX (ORCPT ); Fri, 18 Sep 2020 17:47:23 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACDE4C0613CE; Fri, 18 Sep 2020 14:47:23 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8857A15A01A79; Fri, 18 Sep 2020 14:30:35 -0700 (PDT) Date: Fri, 18 Sep 2020 14:47:21 -0700 (PDT) Message-Id: <20200918.144721.348413288598834487.davem@davemloft.net> To: nikolay@nvidia.com Cc: geert@linux-m68k.org, andrew@lunn.ch, bridge@lists.linux-foundation.org, hkallweit1@gmail.com, linux-kernel@vger.kernel.org, kuba@kernel.org, netdev@vger.kernel.org, yoshihiro.shimoda.uh@renesas.com, gaku.inami.xh@renesas.com, roopa@nvidia.com, f.fainelli@gmail.com Subject: Re: [PATCH] Revert "net: linkwatch: add check for netdevice being present to linkwatch_do_dev" From: David Miller In-Reply-To: <9ab2973de2c0fb32de7fbc4ae823a820cd48a769.camel@nvidia.com> References: <20200912.183437.1205152743307947529.davem@davemloft.net> <9ab2973de2c0fb32de7fbc4ae823a820cd48a769.camel@nvidia.com> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [2620:137:e000::1:9]); Fri, 18 Sep 2020 14:30:36 -0700 (PDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolay Aleksandrov Date: Fri, 18 Sep 2020 12:35:02 +0000 > Thanks for the analysis, I don't see any issues with checking if the device > isn't present. It will have to go through some testing, but no obvious > objections/issues. Have you tried if it fixes your case? > I have briefly gone over drivers' use of net_device_detach(), mostly it's used > for suspends, but there are a few cases which use it on IO error or when a > device is actually detaching (VF detach). The vlan port event is for vlan > devices on top of the bridge when BROPT_VLAN_BRIDGE_BINDING is enabled and their > carrier is changed based on vlan participating ports' state. There are two things to resolve: 1) Why does the bridge need to get a change event for devices which have not fully resumed yet? 2) What kind of link state change is happening on devices which are not currently fully resumed yet? Really this whole situation is still quite mysterious to me. If the driver (or the PHY library it is using, etc.) is emitting link state changes before it marks itself as "present", that's the real bug.