public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: MarkLee <Mark-MC.Lee@mediatek•com>
To: "David S. Miller" <davem@davemloft•net>,
	Sean Wang <sean.wang@mediatek•com>,
	John Crispin <john@phrozen•org>,
	Nelson Chang <nelson.chang@mediatek•com>,
	Matthias Brugger <matthias.bgg@gmail•com>,
	Andrew Lunn <andrew@lunn•ch>
Cc: Mark Rutland <mark.rutland@arm•com>,
	devicetree@vger•kernel.org,
	Jakub Kicinski <jakub.kicinski@netronome•com>,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
	Rene van Dorst <opensource@vdorst•com>,
	Rob Herring <robh+dt@kernel•org>,
	linux-mediatek@lists•infradead.org,
	MarkLee <Mark-MC.Lee@mediatek•com>,
	linux-arm-kernel@lists•infradead.org
Subject: [PATCH net, v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
Date: Mon, 14 Oct 2019 15:15:17 +0800	[thread overview]
Message-ID: <20191014071518.11923-2-Mark-MC.Lee@mediatek.com> (raw)
In-Reply-To: <20191014071518.11923-1-Mark-MC.Lee@mediatek.com>

In the original design, mtk_phy_connect function will set ge_mode=1
if phy-mode is GMII(PHY_INTERFACE_MODE_GMII) and then set the correct
ge_mode to ETHSYS_SYSCFG0 register. This logic was broken after apply  
mediatek PHYLINK patch(Fixes tag), the new mtk_mac_config function will
not set ge_mode=1 for GMII mode hence the final ETHSYS_SYSCFG0 setting 
will be incorrect for mt7629 GMII mode. This patch add the missing logic
back to fix it.
			 
Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek•com>
--
v2->v3:
* no change
v1->v2:
* no change
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index c61069340f4f..703adb96429e 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -261,6 +261,7 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode,
 		ge_mode = 0;
 		switch (state->interface) {
 		case PHY_INTERFACE_MODE_MII:
+		case PHY_INTERFACE_MODE_GMII:
 			ge_mode = 1;
 			break;
 		case PHY_INTERFACE_MODE_REVMII:
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-14  7:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  7:15 [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-14  7:15 ` MarkLee [this message]
2019-10-15 19:28   ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support Jakub Kicinski
2019-10-14  7:15 ` [PATCH net, v3 2/2] arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding MarkLee
2019-10-16  1:03 ` [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191014071518.11923-2-Mark-MC.Lee@mediatek.com \
    --to=mark-mc.lee@mediatek$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=jakub.kicinski@netronome$(echo .)com \
    --cc=john@phrozen$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mediatek@lists$(echo .)infradead.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=matthias.bgg@gmail$(echo .)com \
    --cc=nelson.chang@mediatek$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=opensource@vdorst$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=sean.wang@mediatek$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox