Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4172616iob; Sun, 8 May 2022 05:18:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtNgh5ZmEjefIc2kx/kQAyyOrNBgl60znGKxm/3EpRzVSD3C/le8psKRJgKxqEwCP3z3JU X-Received: by 2002:a63:3:0:b0:3c3:79e4:156 with SMTP id 3-20020a630003000000b003c379e40156mr9311846pga.506.1652012305657; Sun, 08 May 2022 05:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652012305; cv=none; d=google.com; s=arc-20160816; b=VP/XaRQOCewiaude0m2+cC4vmy0dKz+NXsKYEGSQxudzGG0YXIuuiqIgKmI/yyyQGF nKwjydjA1RB9N4U6cB7hMBNhXniwqcFuJjeY1u85E/l/svhatObT+rXFq7np8TZ6H0hF T1264IjcBh6u4+q15/NS0zG5edgKZa2K800BgFlx+KLnb9a05NI/ItBe85Fku3T9wDvS 3fOe/tuAXewD/C/i5E3q6CCwNF5lF38GxPzvXYglwHyiSmCimXwOA1jK82prF74TwU+e WE/y4Mo6DNw5peDezNl38bi27udjRA8l5iRoa6Iw9AYC7uyjg41Up2OUuyss6mmlcg7t 5A6w== 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=3NcVCo3sp/jGBuyl/SgBfh3zJQx24Mqzu9CGQbDqA+k=; b=P5zN/G9jzdN8ar2ie/KUb4uvvyGWl5er9QVlCx5aqYkc+1qd3ZH6u1CIoybnUm/f0t fHKRE0HEqh7rKfKiOi03B0G9t0GWf5zkMWLkcu3hm0d+Pxu+bqD1XmsyNAli4QB54bYV v8gCIjQZGULCXy5hQYxyKqyntG5u8Op+WQY4EZv2Zlb0lSxHqxzcrJElRWWscH9Ygi+G f4CuuEVZYif0NIIElm2/dIwvFzMpS/R3h7Fo6zA9CAoEutnNNhxMsh6w/zFfkPZWgFIQ nZHpuZxZzeetLoS3G1e0T57vhmKrczZecrCCCWgSZ/BcRkjydiBBsCO2GDN1cePO+1B+ Gz5g== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170902a9c500b0015d29ba7843si7590725plr.262.2022.05.08.05.18.08; Sun, 08 May 2022 05:18:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388969AbiEFE1y (ORCPT + 99 others); Fri, 6 May 2022 00:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241323AbiEFE1v (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 DCAD05F270 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-0001Xp-Pi; 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-000ddO-Bf; 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-003s8x-Tc; 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 3/7] net: phy: genphy_c45_pma_baset1_setup_master_slave: do no set unknown configuration Date: Fri, 6 May 2022 06:23:53 +0200 Message-Id: <20220506042357.923026-4-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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 Do not change default master/slave forced configuration if no changes was requested. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn --- drivers/net/phy/phy-c45.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index ffa2d5cd09fc..b1f7c63f66cd 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -86,9 +86,10 @@ int genphy_c45_pma_baset1_setup_master_slave(struct phy_device *phydev) break; case MASTER_SLAVE_CFG_SLAVE_FORCE: case MASTER_SLAVE_CFG_SLAVE_PREFERRED: + break; case MASTER_SLAVE_CFG_UNKNOWN: case MASTER_SLAVE_CFG_UNSUPPORTED: - break; + return 0; default: phydev_warn(phydev, "Unsupported Master/Slave mode\n"); return -EOPNOTSUPP; -- 2.30.2