From patchwork Mon Feb 21 08:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 544817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EA84C433F5 for ; Mon, 21 Feb 2022 09:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349553AbiBUJ2C (ORCPT ); Mon, 21 Feb 2022 04:28:02 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243856AbiBUJ1W (ORCPT ); Mon, 21 Feb 2022 04:27:22 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E12A2633A; Mon, 21 Feb 2022 01:11:49 -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 sin.source.kernel.org (Postfix) with ESMTPS id 5A376CE0E7D; Mon, 21 Feb 2022 09:11:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B20AC340E9; Mon, 21 Feb 2022 09:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434706; bh=gWrhBUVDvQ6S4mikWmV2cQBDKkGwyarz86IOQR8HysI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ADDzWmrBSUeHltOwMG6NYHj6yrtcvHXyfvx14OSYB08AeobRG64pnomPPlDHNmhR8 QVaILV6OeFA8AA9UBaITeOGiRKG1FFhucstW/DnJ5R+hI+kcsQ5tKWJmiE09oIoXjG tu4HS5dbjL3qoIewnFpVzMVoShGskedO3ASko3X8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hauke Mehrtens , DENG Qingfang , =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , "David S. Miller" Subject: [PATCH 5.15 102/196] net: phy: mediatek: remove PHY mode check on MT7531 Date: Mon, 21 Feb 2022 09:48:54 +0100 Message-Id: <20220221084934.352555481@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084930.872957717@linuxfoundation.org> References: <20220221084930.872957717@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: DENG Qingfang commit 525b108e6d95b643eccbd84fb10aa9aa101b18dd upstream. The function mt7531_phy_mode_supported in the DSA driver set supported mode to PHY_INTERFACE_MODE_GMII instead of PHY_INTERFACE_MODE_INTERNAL for the internal PHY, so this check breaks the PHY initialization: mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY: -EINVAL Remove the check to make it work again. Reported-by: Hauke Mehrtens Fixes: e40d2cca0189 ("net: phy: add MediaTek Gigabit Ethernet PHY driver") Signed-off-by: DENG Qingfang Acked-by: Arınç ÜNAL Tested-by: Hauke Mehrtens Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/mediatek-ge.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/net/phy/mediatek-ge.c +++ b/drivers/net/phy/mediatek-ge.c @@ -55,9 +55,6 @@ static int mt7530_phy_config_init(struct static int mt7531_phy_config_init(struct phy_device *phydev) { - if (phydev->interface != PHY_INTERFACE_MODE_INTERNAL) - return -EINVAL; - mtk_gephy_config_init(phydev); /* PHY link down power saving enable */