public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "René van Dorst" <opensource@vdorst•com>
To: sean.wang@mediatek•com, f.fainelli@gmail•com,
	linux@armlinux•org.uk, davem@davemloft•net,
	matthias.bgg@gmail•com, andrew@lunn•ch, vivien.didelot@gmail•com
Cc: frank-w@public-files•de, netdev@vger•kernel.org,
	linux-mediatek@lists•infradead.org, linux-mips@vger•kernel.org,
	"René van Dorst" <opensource@vdorst•com>
Subject: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits.
Date: Sat, 29 Jun 2019 14:24:19 +0200	[thread overview]
Message-ID: <20190629122419.19026-1-opensource@vdorst.com> (raw)

Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10.

This causes issues on non-MT7621 devices which has the
MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) capability set.
The wrong TRGMII setup code is executed.

Moving the MTK_PATH_BIT to bit 11 fixes the issue.

Fixes: 8efaa653a8a5 ("net: ethernet: mediatek: Add MT7621 TRGMII mode
support")
Signed-off-by: René van Dorst <opensource@vdorst•com>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index 876ce6798709..2cb8a915731c 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -626,7 +626,7 @@ enum mtk_eth_path {
 #define MTK_TRGMII_MT7621_CLK		BIT(10)
 
 /* Supported path present on SoCs */
-#define MTK_PATH_BIT(x)         BIT((x) + 10)
+#define MTK_PATH_BIT(x)         BIT((x) + 11)
 
 #define MTK_GMAC1_RGMII \
 	(MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) | MTK_RGMII)
-- 
2.20.1


             reply	other threads:[~2019-06-29 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 12:24 René van Dorst [this message]
2019-06-29 19:33 ` [PATCH] net: ethernet: mediatek: Fix overlapping capability bits Willem de Bruijn
2019-07-01 12:44   ` René van Dorst
2019-07-01 12:57     ` Willem de Bruijn

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=20190629122419.19026-1-opensource@vdorst.com \
    --to=opensource@vdorst$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=frank-w@public-files$(echo .)de \
    --cc=linux-mediatek@lists$(echo .)infradead.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=matthias.bgg@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sean.wang@mediatek$(echo .)com \
    --cc=vivien.didelot@gmail$(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