Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2411310rdf; Mon, 6 Nov 2023 13:26:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOI4AzLVHhiGnnl/iMax8YCGsfGsAITezoeBMbXI0V1nmfkrylqQcO15G9aBKC/smmMkcP X-Received: by 2002:a05:6a20:144e:b0:15e:4084:6480 with SMTP id a14-20020a056a20144e00b0015e40846480mr934218pzi.27.1699306018503; Mon, 06 Nov 2023 13:26:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699306018; cv=none; d=google.com; s=arc-20160816; b=CLa1j6wWTdqsCmozo2IQZW/OYKrJ2NyhgPXH4j3yfqcAcBAKVIekqTO+tLhO5cmEqa 5NG1jBdT7VoWP28bNBxAxB6vY/o/tCQ7XBxNKwuk5bWohfpnQFStPG4GnJbTVc/fqoMf 3mMIAtlIIdBiuIeCGlGLt3WSm7PMnGLCJdW4ko/UkcjHEu2YjA1/bzipsC9T/OIjDwmo ZznrOcnCkyX/3LxMClpTwdZgmXIUzeSsFzSZWLwhH2AvZRk6FSdcgbpUoKiZDk7nchoD Ru04Zezyx1cGDHCUyZ3xIvrKHYl8J6Uat5TmYD0iYz8HC7n81NOPoLjLd1Q9x1wmkzR+ sb/Q== 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:dkim-signature; bh=pIAOwf/5q3SfU3vvLSflXBextpLYy07/rCzwWA9WiAA=; fh=ydDchQZjSNSCd80WKlIVa6upN2ouBqNwhV85p/P1SQM=; b=im5SHUo47XW3M7eszh+Rf9FIIU8uwVmdeKkScnz7V+FPk6BnRi2HmU4KyXQkrQoiwJ 1OAE/RQDhCNOxn3iquyjzIg0oS1wNmEjVelCj0w90wZODa2+LuMhh5vmFtpO6Bq9/Kzg h3hMG3FM2va1EVVEats53jGgxMrWwEoxC82jD6M87IMCSsQ55j+6Y3VyCdowYvbDySSd nxsPkkCxFvvWVh0rSdgVfqJF37ioESpeeyjSS50htl6ik21VaU40JB4hldtsykBRzNLi HGuwpEir1VVH6o2NZjp8+3BIA9oc9fed3YYuEK4H5L5axF6dHrlUWznyzEl/mPhr5zqK L59g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=qvs1S35Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r15-20020aa78b8f000000b006bdf2250a36si8294232pfd.353.2023.11.06.13.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 13:26:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=qvs1S35Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7DCCF801CBEE; Mon, 6 Nov 2023 13:26:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232987AbjKFV04 (ORCPT + 99 others); Mon, 6 Nov 2023 16:26:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231739AbjKFV0z (ORCPT ); Mon, 6 Nov 2023 16:26:55 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 935F5B0; Mon, 6 Nov 2023 13:26:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=pIAOwf/5q3SfU3vvLSflXBextpLYy07/rCzwWA9WiAA=; b=qvs1S35QXNK7Bmzn9DNlyhlA9S FLijoCl7tG9qguDKkeSI463d1pYF4yh7JD2gisqQvLO69t2Ais5tame0D9q6Yq4zDuU+x5vf7EkUN 4PWwCNWDMG3TP4Rt3ODj1k81mWkq6Tj3nDWHNT2jTBV4Wa2HdJzecp/KeYy8Jqxo8vxQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r077C-0010bz-A2; Mon, 06 Nov 2023 22:26:34 +0100 Date: Mon, 6 Nov 2023 22:26:34 +0100 From: Andrew Lunn To: Klaus Kudielka Cc: Russell King , 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: <52114397-62cf-4112-9d5b-73098f25fe20@lunn.ch> References: <20231106180506.2665-1-klaus.kudielka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231106180506.2665-1-klaus.kudielka@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 13:26:57 -0800 (PST) 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. I would actually say: Fix this for all drivers using phylink, by calling... You marked this patch for net, so it should be backported. Ideally you should include a Fixes: tag, indicating when the problem was introduced. That is bit hard in this case. Its been broken forever. But adding LED support made this observable. So maybe a Fixes: tag based on when the LED trigger was added? You should also add: Cc: stable@vger.kernel.org There is more about this in: https://docs.kernel.org/process/stable-kernel-rules.html Reviewed-by: Andrew Lunn Andrew