Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6024502pxb; Mon, 14 Feb 2022 13:22:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/2NCcNzNLPRzXrOdgX8zt43q9E/arGMyMuO8y2jzLh0D5z3LrR2P7+FLUE7WnMcjBLGUm X-Received: by 2002:aa7:9602:: with SMTP id q2mr1034644pfg.9.1644873762532; Mon, 14 Feb 2022 13:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873762; cv=none; d=google.com; s=arc-20160816; b=im+dpPZypojQiYPnfGsq6oi5c00AmsgwnVOhY9i5DY4dvrJdBAK6JHfVKwkpbTit+y V5v5PldnXSpFwgb+BGfAPclVPNal/c3NZKf2X2NJ0+YImkUlT2WiK/dLMissYNLS+7KL ZtsbsCiNPMGgH1h6BhE0jZR4ddCYLod99ewzxY7zYhXEWYv4nDx6MMLMcS1jsAn8e9MO R+9oGgPjRbuUkrXVP7zef0G1SvDv4N4nc4P5voBxLBxAfOm/G/a509mfsZ5UjW1E1o5N GXR5ciY6oNAW0m6oGShWvPjRQbnRuGgrULxKJ6pcvjXg4M6ObcGsMDy6FdOHutktwTBi k8gw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IikQKe/XQ+GwHct8wHvMQ/xNg4H94tUGBAvtzPvDSYY=; b=NzlhgmgMJl0Of3vdhknw7/pM+qcfeA3kjJnwq4hN4WDoLThQkhM+Hda9Od93U/Uwpd ByLl1677onsOABnxp1ZEbWZJntOODxUI3mDfkLgTljw7gWKL4lNEllorXKNpdFCFlY7X s8y4KzW2Sp2Zx0kX/HcfDwOv52/nl6npnCGRerKmu5OjIHCsdoU4LKBR+7PAHW+wpLL1 +mwOjoeRUv7ZjTqgu09DTY5m+eh1yJtXoEHUcuj5JN/dT6labjbs9/ocObNrsUjZ6zH+ 5Z47KXtFQx8RyqQgluFRMdDcRubBcsPewwkSyD5vQI1mmLbScy9xK6nILno9wFm4vamq tgtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rY2SnVdv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j11si15711047plx.12.2022.02.14.13.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:22:42 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rY2SnVdv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 35FD711ADFA; Mon, 14 Feb 2022 12:39:08 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343778AbiBNJvV (ORCPT + 99 others); Mon, 14 Feb 2022 04:51:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344336AbiBNJqx (ORCPT ); Mon, 14 Feb 2022 04:46:53 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB6AEBF66; Mon, 14 Feb 2022 01:40:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B6BF6B80DC6; Mon, 14 Feb 2022 09:40:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD391C340E9; Mon, 14 Feb 2022 09:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831615; bh=AfJo0oaudbGhuFYqs9I47rvRQD9hhCLhsIx+mmkRoHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rY2SnVdvcu5L8oqBIB+10v2v5zAYhg4osRcTnd/eIq6Q4U3qXnNX4r8RfCr9ajSRc xjxnv5oAjtUHjnbBctiKyyMJI8d8na/yAvDQdPO9PvrO7O5dRd3JQhRqCk1d1ZqORD PoW1JPbl+1cqAK1RMhs3hpr5Bjc/DB4/UHHyPi4Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Parkhomenko , Serge Semin , Andrew Lunn , "David S. Miller" Subject: [PATCH 5.10 008/116] net: phy: marvell: Fix MDI-x polarity setting in 88e1118-compatible PHYs Date: Mon, 14 Feb 2022 10:25:07 +0100 Message-Id: <20220214092458.962983882@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 From: Pavel Parkhomenko commit aec12836e7196e4d360b2cbf20cf7aa5139ad2ec upstream. When setting up autonegotiation for 88E1118R and compatible PHYs, a software reset of PHY is issued before setting up polarity. This is incorrect as changes of MDI Crossover Mode bits are disruptive to the normal operation and must be followed by a software reset to take effect. Let's patch m88e1118_config_aneg() to fix the issue mentioned before by invoking software reset of the PHY just after setting up MDI-x polarity. Fixes: 605f196efbf8 ("phy: Add support for Marvell 88E1118 PHY") Signed-off-by: Pavel Parkhomenko Reviewed-by: Serge Semin Suggested-by: Andrew Lunn Cc: stable@vger.kernel.org Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/marvell.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1061,16 +1061,15 @@ static int m88e1118_config_aneg(struct p { int err; - err = genphy_soft_reset(phydev); + err = marvell_set_polarity(phydev, phydev->mdix_ctrl); if (err < 0) return err; - err = marvell_set_polarity(phydev, phydev->mdix_ctrl); + err = genphy_config_aneg(phydev); if (err < 0) return err; - err = genphy_config_aneg(phydev); - return 0; + return genphy_soft_reset(phydev); } static int m88e1118_config_init(struct phy_device *phydev)