[source] ramips: fix mt7621 ethernet support for v4.9

LEDE Commits lede-commits at lists.infradead.org
Wed Feb 15 00:16:25 PST 2017


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/6cb0372d42761a0d8e0113bc17f395daaaa4b309

commit 6cb0372d42761a0d8e0113bc17f395daaaa4b309
Author: John Crispin <john at phrozen.org>
AuthorDate: Wed Feb 15 09:11:41 2017 +0100

    ramips: fix mt7621 ethernet support for v4.9
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../linux/ramips/files-4.9/drivers/net/ethernet/mtk/soc_mt7621.c   | 2 +-
 target/linux/ramips/mt7621/config-4.9                              | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/soc_mt7621.c b/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/soc_mt7621.c
index b1c84fc..3a8653e 100644
--- a/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/soc_mt7621.c
+++ b/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/soc_mt7621.c
@@ -82,7 +82,7 @@ static const u16 mt7621_reg_table[FE_REG_COUNT] = {
 
 static int mt7621_gsw_config(struct fe_priv *priv)
 {
-	if (priv->mii_bus && priv->mii_bus->phy_map[0x1f])
+	if (priv->mii_bus &&  mdiobus_get_phy(priv->mii_bus, 0x1f))
 		mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
 
 	return 0;
diff --git a/target/linux/ramips/mt7621/config-4.9 b/target/linux/ramips/mt7621/config-4.9
index eab7a97..d531a2d 100644
--- a/target/linux/ramips/mt7621/config-4.9
+++ b/target/linux/ramips/mt7621/config-4.9
@@ -170,6 +170,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_PHYSMAP=y
+# CONFIG_MTD_PHYSMAP_OF_VERSATILE is not set
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_SEAMA_FW=y
@@ -183,6 +184,12 @@ CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_MEDIATEK_GSW_MT7621=y
+CONFIG_NET_MEDIATEK_MDIO=y
+CONFIG_NET_MEDIATEK_MDIO_MT7620=y
+CONFIG_NET_MEDIATEK_MT7621=y
+CONFIG_NET_MEDIATEK_SOC=y
+CONFIG_NET_VENDOR_MEDIATEK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 # CONFIG_NO_IOPORT_MAP is not set
 CONFIG_NR_CPUS=4



More information about the lede-commits mailing list