Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4836436iob; Mon, 9 May 2022 02:48:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZhPB31SwFtWj86MGcKnsNstuiN6HnC2sUnPd54BKw51BH1/aM89Ka+AjdnSUa1mDDlS0G X-Received: by 2002:a17:90b:1c82:b0:1dd:1b46:5aa9 with SMTP id oo2-20020a17090b1c8200b001dd1b465aa9mr4207118pjb.158.1652089732859; Mon, 09 May 2022 02:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652089732; cv=none; d=google.com; s=arc-20160816; b=n0xwX2KNmSWjH1MCt0TUZyFEhXacdYloOu4iUqOsChgPj5yA3C5qvQhzkKuVMNwwn/ AH0Cplmir7tAy24mdbH5ZlZ45FZKLw/cHAUBPdp8m7TGjlvpCNYzZbBqU4Ds5yvMB+6d hYv9xhenb+qC057nF36yten2cfPiBuCi+HuEzyNxnTqx+CpdjQJ1+CELghBlLyBNlFNB AZnK1uWGp+4830+sTKoKjF4vdqdP3tA2oox0AJpvLGagQPnBhmI6HCFtixMYEd+oByB8 iacUguhpWU4IsN47NErmKgRQjEFC+rSETNLL1rnmz8dN86BClp4mm8ZPB1Z6WHZZY4ur qVMg== 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; bh=sNZTELVwSLzqo8RHPyWR9uneEGTaCBzoeRiLMAV2aZ4=; b=T53ZSrbcOpOoNxgQVUcPC8kXcIUVKhYIvUzYSbXXmMCA5BuuaAFtGOyh1uYQsKIU97 qLgK9xIqj3m8joPCOL03zfOH8aJyp27PWeGqXhpNrTXtAKIcJuiXV3LFqr5y1yfbF9QW 15vqIP10/YEHiFP3UYeGgFR9W6te4DL0wFISfEWZOGxtXgqAB4m3LIfkTI4bzW0OMfGn F1A0iuPdszw0TfdDXVvqaEtgzzoIKRCDVi3ORiPePC983w8yOk51w5cCJ6M7XBeI2owf jlzD01uf45/Vz+4VmKpSK51w9tfkhNabxw0PkOpCp75dBPW28JdYOr7Y8TD5UO1tNllF B+6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o20-20020a056a0015d400b0050d44724426si14456356pfu.341.2022.05.09.02.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 29E2D215520; Mon, 9 May 2022 02:33:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388980AbiEFE15 (ORCPT + 99 others); Fri, 6 May 2022 00:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357039AbiEFE1v (ORCPT ); Fri, 6 May 2022 00:27:51 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC1C05E766 for ; Thu, 5 May 2022 21:24:09 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmpVY-0001Xr-Po; Fri, 06 May 2022 06:24:00 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nmpVY-000ddT-F6; Fri, 06 May 2022 06:23:59 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nmpVV-003s8f-SB; Fri, 06 May 2022 06:23:57 +0200 From: Oleksij Rempel To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next v4 1/7] net: phy: genphy_c45_baset1_an_config_aneg: do no set unknown configuration Date: Fri, 6 May 2022 06:23:51 +0200 Message-Id: <20220506042357.923026-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220506042357.923026-1-o.rempel@pengutronix.de> References: <20220506042357.923026-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Do not change default master/slave autoneg configuration if no changes was requested. Fixes: 3da8ffd8545f ("net: phy: Add 10BASE-T1L support in phy-c45") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn --- drivers/net/phy/phy-c45.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index eefdd67d5556..0014aa6e73c0 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -191,8 +191,12 @@ static int genphy_c45_baset1_an_config_aneg(struct phy_device *phydev) case MASTER_SLAVE_CFG_MASTER_PREFERRED: case MASTER_SLAVE_CFG_SLAVE_PREFERRED: break; + case MASTER_SLAVE_CFG_UNKNOWN: + case MASTER_SLAVE_CFG_UNSUPPORTED: + return 0; default: - break; + phydev_warn(phydev, "Unsupported Master/Slave mode\n"); + return -EOPNOTSUPP; } switch (phydev->master_slave_set) { -- 2.30.2