From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A68312D035 for ; Mon, 6 Nov 2023 18:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Q9yjp0Wz" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB958F; Mon, 6 Nov 2023 10:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FttnvgXCtGPUD1P8YePW+jEBhOPTjxej3y77da5fSZk=; b=Q9yjp0Wz8LIDsMMXs3OI5BOIdX gp0+DKIJXLl+vvFRlZlEu0f1Y5FS+fFaGgKMKnZzJXt1TM7Arbx87dFqsP2zplX7p9xmaQU+AEHeS 4MJDdkYfUvXUszus7Z+IE30MBzW372IIUheq80FH648M24Gmm/KRBuHw6TcqDvIUkFfHhb5jw7n4U VtuJPbZfN77SS56fxjqyWqd7QfCTZXAfNn3FKMglt3ydnSQWd7JufqL8aCaXvD4VkySgnC2M239Fa VwXCKMqsgFHngaAWrit8S6y+0mOfKXdbzpeW9pvwmh7sY5tgMFmlwfi4ynct/FGu37EAOn/TRaYyo d8bxTJ3w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53024) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r04SD-00088t-1K; Mon, 06 Nov 2023 18:36:05 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r04SD-00068S-N2; Mon, 06 Nov 2023 18:36:05 +0000 Date: Mon, 6 Nov 2023 18:36:05 +0000 From: "Russell King (Oracle)" To: Klaus Kudielka Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: phylink: initialize carrier state at creation Message-ID: References: <20231106180506.2665-1-klaus.kudielka@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231106180506.2665-1-klaus.kudielka@gmail.com> Sender: Russell King (Oracle) On Mon, Nov 06, 2023 at 07:05:06PM +0100, Klaus Kudielka wrote: > Background: Turris Omnia (Armada 385); eth2 (mvneta) connected to SFP bus; > SFP module is present, but no fiber connected, so definitely no carrier. > > After booting, eth2 is down, but netdev LED trigger surprisingly reports > link active. Then, after "ip link set eth2 up", the link indicator goes > away - as I would have expected it from the beginning. > > It turns out, that the default carrier state after netdev creation is > "carrier ok". Some ethernet drivers explicitly call netif_carrier_off > during probing, others (like mvneta) don't - which explains the current > behaviour: only when the device is brought up, phylink_start calls > netif_carrier_off. > > Fix this for all drivers, by calling netif_carrier_off in phylink_create. > > Suggested-by: Andrew Lunn > Signed-off-by: Klaus Kudielka Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!