From a5eaccb29a57e2364be479184d9b3c2ecad46a92 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 10 Jul 2023 17:13:37 +0200 Subject: [PATCH] ipq807x: enable 4k vlan by default on realtek switches Signed-off-by: John Crispin --- .../ipq807x/patches/700-RTL8367C_S.patch | 66 +++++++++++++------ 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/feeds/ipq807x/ipq807x/patches/700-RTL8367C_S.patch b/feeds/ipq807x/ipq807x/patches/700-RTL8367C_S.patch index 49b219e4d..ce77feaa5 100644 --- a/feeds/ipq807x/ipq807x/patches/700-RTL8367C_S.patch +++ b/feeds/ipq807x/ipq807x/patches/700-RTL8367C_S.patch @@ -1,19 +1,22 @@ ---- a/drivers/net/phy/Kconfig 2023-03-16 09:38:22.742281029 +0800 -+++ b/drivers/net/phy/Kconfig 2023-03-16 09:41:46.400370236 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Kconfig ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig @@ -332,6 +332,10 @@ config RTL8367B_PHY - tristate "Driver fot the Realtek RTL8367R-VB switch" - select SWCONFIG - + tristate "Driver fot the Realtek RTL8367R-VB switch" + select SWCONFIG + +config RTL8367C_PHY + tristate "Driver fot the Realtek RTL8367C/S switch" + select SWCONFIG + endif # RTL8366_SMI - + source "drivers/net/phy/b53/Kconfig" - ---- a/drivers/net/phy/Makefile 2023-03-16 09:38:12.210161055 +0800 -+++ b/drivers/net/phy/Makefile 2023-03-16 09:41:14.548069150 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Makefile ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile @@ -34,6 +34,7 @@ obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o obj-$(CONFIG_RTL8367_PHY) += rtl8367.o @@ -22,9 +25,10 @@ obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o obj-$(CONFIG_PSB6970_PHY) += psb6970.o obj-$(CONFIG_B53) += b53/ - ---- a/drivers/net/phy/rtl8366_smi.h 2023-03-21 09:29:19.422575683 +0800 -+++ b/drivers/net/phy/rtl8366_smi.h 2023-03-20 08:55:48.041464368 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.h ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h @@ -14,6 +14,7 @@ #include #include @@ -80,8 +84,10 @@ struct rtl8366_smi* rtl8366_smi_probe(struct platform_device *pdev); ---- a/drivers/net/phy/rtl8366_smi.c 2023-03-21 09:28:56.426383208 +0800 -+++ b/drivers/net/phy/rtl8366_smi.c 2023-03-21 09:15:07.869753295 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.c ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c @@ -19,6 +19,8 @@ #include #include @@ -382,6 +388,18 @@ int rtl8366_sw_get_vlan_info(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) +@@ -1207,9 +1428,9 @@ int rtl8366_sw_set_vlan_enable(struct sw + if (attr->ofs > 2) + return -EINVAL; + +- if (attr->ofs == 1) ++/* if (attr->ofs == 1) + err = rtl8366_enable_vlan(smi, val->value.i); +- else ++ else*/ + err = rtl8366_enable_vlan4k(smi, val->value.i); + + return err; @@ -1237,25 +1458,27 @@ static int __rtl8366_smi_init(struct rtl { int err; @@ -525,9 +543,11 @@ + return ERR_PTR(err); } EXPORT_SYMBOL_GPL(rtl8366_smi_probe); - ---- a/drivers/net/phy/rtl8367c.c 2023-05-31 15:05:26.928595310 +0800 -+++ b/drivers/net/phy/rtl8367c.c 2023-05-31 15:09:38.943976240 +0800 + +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c +=================================================================== +--- /dev/null ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c @@ -0,0 +1,2462 @@ +/* + * Platform driver for the Realtek RTL8367R-VB/S/C ethernet switches @@ -2991,8 +3011,10 @@ +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" RTL8367B_DRIVER_NAME); + ---- a/include/linux/rtl8367.h 2023-05-31 16:18:04.480612826 +0800 -+++ b/include/linux/rtl8367.h 2023-05-25 16:18:41.452870197 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/include/linux/rtl8367.h ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h @@ -18,6 +18,8 @@ enum rtl8367_port_speed { RTL8367_PORT_SPEED_10 = 0, RTL8367_PORT_SPEED_100, @@ -3016,8 +3038,10 @@ }; struct rtl8367_extif_config { ---- a/drivers/net/phy/mdio-qca.c 2023-05-31 16:18:19.152756159 +0800 -+++ b/drivers/net/phy/mdio-qca.c 2023-05-31 16:21:18.086437571 +0800 +Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c +=================================================================== +--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/mdio-qca.c ++++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c @@ -37,8 +37,9 @@ #define MDIO_CTRL_4_ACCESS_CODE_C45_ADDR 0 #define MDIO_CTRL_4_ACCESS_CODE_C45_WRITE 1