diff --git a/target/linux/generic/files/drivers/net/phy/adm6996.c b/target/linux/generic/files/drivers/net/phy/adm6996.c index 66013f273..271df815e 100644 --- a/target/linux/generic/files/drivers/net/phy/adm6996.c +++ b/target/linux/generic/files/drivers/net/phy/adm6996.c @@ -1199,14 +1199,20 @@ static int adm6996_gpio_probe(struct platform_device *pdev) return 0; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int adm6996_gpio_remove(struct platform_device *pdev) +#else +static void adm6996_gpio_remove(struct platform_device *pdev) +#endif { struct adm6996_priv *priv = platform_get_drvdata(pdev); if (priv && (priv->model == ADM6996M || priv->model == ADM6996L)) unregister_switch(&priv->dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static struct platform_driver adm6996_gpio_driver = { diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index dce52ce0e..c5a0a5b2f 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -15,6 +15,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -1171,7 +1172,7 @@ ar8327_sw_hw_apply(struct switch_dev *dev) return 0; } -int +static int ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -1189,7 +1190,7 @@ ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev, return 0; } -int +static int ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -1207,7 +1208,7 @@ ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev, return 0; } -int +static int ar8327_sw_get_igmp_snooping(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -1224,7 +1225,7 @@ ar8327_sw_get_igmp_snooping(struct switch_dev *dev, return 0; } -int +static int ar8327_sw_set_igmp_snooping(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -1240,7 +1241,7 @@ ar8327_sw_set_igmp_snooping(struct switch_dev *dev, return 0; } -int +static int ar8327_sw_get_igmp_v3(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -1256,7 +1257,7 @@ ar8327_sw_get_igmp_v3(struct switch_dev *dev, return 0; } -int +static int ar8327_sw_set_igmp_v3(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c index 0a21ff1de..241ba0f7d 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mmap.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "b53_priv.h" @@ -217,14 +218,20 @@ static int b53_mmap_probe(struct platform_device *pdev) return b53_swconfig_switch_register(dev); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int b53_mmap_remove(struct platform_device *pdev) +#else +static void b53_mmap_remove(struct platform_device *pdev) +#endif { struct b53_device *dev = platform_get_drvdata(pdev); if (dev) b53_switch_remove(dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static struct platform_driver b53_mmap_driver = { diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c index ead5209cf..e63a6c09d 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "b53_priv.h" @@ -354,14 +355,20 @@ static int b53_srab_probe(struct platform_device *pdev) return b53_swconfig_switch_register(dev); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int b53_srab_remove(struct platform_device *pdev) +#else +static void b53_srab_remove(struct platform_device *pdev) +#endif { struct b53_device *dev = platform_get_drvdata(pdev); if (dev) b53_switch_remove(dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static struct platform_driver b53_srab_driver = { diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c index a26fd204c..89fc04fa6 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c @@ -254,7 +254,7 @@ static int __rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data) #define MDC_MDIO_WRITE_OP 0x0003 #define MDC_REALTEK_PHY_ADDR 0x0 -int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data) +static int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data) { u32 phy_id = smi->phy_id; struct mii_bus *mbus = smi->ext_mbus; @@ -1527,7 +1527,7 @@ static void rtl8366_smi_reset(struct rtl8366_smi *smi, bool active) reset_control_deassert(smi->reset); } -int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi) +static int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi) { int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0); int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0); @@ -1577,7 +1577,7 @@ static inline int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8 } #endif -int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi) +static int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi) { struct rtl8366_platform_data *pdata = pdev->dev.platform_data; diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index 0e0116051..442aaded0 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "rtl8366_smi.h" @@ -1478,7 +1479,11 @@ static int rtl8366rb_probe(struct platform_device *pdev) return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int rtl8366rb_remove(struct platform_device *pdev) +#else +static void rtl8366rb_remove(struct platform_device *pdev) +#endif { struct rtl8366_smi *smi = platform_get_drvdata(pdev); @@ -1489,7 +1494,9 @@ static int rtl8366rb_remove(struct platform_device *pdev) kfree(smi); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } #ifdef CONFIG_OF diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c index 8c746778b..20bed070b 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "rtl8366_smi.h" @@ -1266,7 +1267,11 @@ static int rtl8366s_probe(struct platform_device *pdev) return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int rtl8366s_remove(struct platform_device *pdev) +#else +static void rtl8366s_remove(struct platform_device *pdev) +#endif { struct rtl8366_smi *smi = platform_get_drvdata(pdev); @@ -1277,7 +1282,9 @@ static int rtl8366s_remove(struct platform_device *pdev) kfree(smi); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } #ifdef CONFIG_OF diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367.c b/target/linux/generic/files/drivers/net/phy/rtl8367.c index b14b63e03..89f37cac4 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8367.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8367.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "rtl8366_smi.h" @@ -1790,7 +1791,11 @@ static int rtl8367_probe(struct platform_device *pdev) return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int rtl8367_remove(struct platform_device *pdev) +#else +static void rtl8367_remove(struct platform_device *pdev) +#endif { struct rtl8366_smi *smi = platform_get_drvdata(pdev); @@ -1801,7 +1806,9 @@ static int rtl8367_remove(struct platform_device *pdev) kfree(smi); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static void rtl8367_shutdown(struct platform_device *pdev) diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367b.c b/target/linux/generic/files/drivers/net/phy/rtl8367b.c index 8eb0ca61d..1bd18a70d 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8367b.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8367b.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "rtl8366_smi.h" @@ -1423,7 +1424,11 @@ static int rtl8367b_probe(struct platform_device *pdev) return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) static int rtl8367b_remove(struct platform_device *pdev) +#else +static void rtl8367b_remove(struct platform_device *pdev) +#endif { struct rtl8366_smi *smi = platform_get_drvdata(pdev); @@ -1434,7 +1439,9 @@ static int rtl8367b_remove(struct platform_device *pdev) kfree(smi); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) return 0; +#endif } static void rtl8367b_shutdown(struct platform_device *pdev) diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 5fa2b147c..1e23b8785 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -1060,7 +1060,7 @@ static struct genl_family switch_fam = { }; #ifdef CONFIG_OF -void +static void of_switch_load_portmap(struct switch_dev *dev) { struct device_node *port; diff --git a/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch b/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch new file mode 100644 index 000000000..fe0f260ae --- /dev/null +++ b/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch @@ -0,0 +1,48 @@ +From 5f7c5e1c0d7a79be144e5efc1f24728ddd7fc25c Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Sat, 5 Nov 2022 20:02:56 +0100 +Subject: [PATCH 1/2] bus: mhi: core: add SBL state callback + +Add support for SBL state callback in MHI core. + +It is required for ath11k MHI devices in order to be able to set QRTR +instance ID in the SBL state so that QRTR instance ID-s dont conflict in +case of multiple PCI/MHI cards or AHB + PCI/MHI card. +Setting QRTR instance ID is only possible in SBL state and there is +currently no way to ensure that we are in that state, so provide a +callback that the controller can trigger off. + +Signed-off-by: Robert Marko +--- + drivers/bus/mhi/host/main.c | 1 + + include/linux/mhi.h | 2 ++ + 2 files changed, 3 insertions(+) + +--- a/drivers/bus/mhi/host/main.c ++++ b/drivers/bus/mhi/host/main.c +@@ -906,6 +906,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_ + switch (event) { + case MHI_EE_SBL: + st = DEV_ST_TRANSITION_SBL; ++ mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_SBL_MODE); + break; + case MHI_EE_WFW: + case MHI_EE_AMSS: +--- a/include/linux/mhi.h ++++ b/include/linux/mhi.h +@@ -34,6 +34,7 @@ struct mhi_buf_info; + * @MHI_CB_SYS_ERROR: MHI device entered error state (may recover) + * @MHI_CB_FATAL_ERROR: MHI device entered fatal error state + * @MHI_CB_BW_REQ: Received a bandwidth switch request from device ++ * @MHI_CB_EE_SBL_MODE: MHI device entered SBL mode + */ + enum mhi_callback { + MHI_CB_IDLE, +@@ -45,6 +46,7 @@ enum mhi_callback { + MHI_CB_SYS_ERROR, + MHI_CB_FATAL_ERROR, + MHI_CB_BW_REQ, ++ MHI_CB_EE_SBL_MODE, + }; + + /**