aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek
Commit message (Collapse)AuthorAgeFilesLines
* kernel: bump 5.15 to 5.15.113John Audia2023-05-291-1/+1
| | | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me> (cherry picked from commit c815ecdebd77c3484f2cd0ef21e4c69d274ef33a)
* generic: mt7530: backport support for the MT7988 built-in switchDaniel Golle2023-05-242-3/+3
| | | | | | | | | | | | | | | | | Backport commits adding support for the MT7988 built-in switch to the mt7530 driver. This change results in the Kconfig symbol NET_DSA_MT7530 to be extended by NET_DSA_MT7530_MDIO (everything formally covered by NET_DSA_MT7530) and NET_DSA_MT7530_MMIO (a new driver for the MMIO-connected built-in switch of the MT7988 SoC). Select NET_DSA_MT7530_MDIO for all targets previously selecting NET_DSA_MT7530, with the exception of mediatek/filogic which also selects NET_DSA_MT7530_MMIO. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 958fdf36e35c814eb83faf2c39db4ca379c921b5)
* kernel: backport Motorcomm YT8521/YT8531 supportTianling Shen2023-05-181-1/+1
| | | | | | It will be used on NanoPi R2C and OrangePi R1 Plus LTS board. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* treewide: remove files for building 5.10 kernelNick Hainke2023-05-12140-40059/+0
| | | | | | | | | | | All targets are bumped to 5.15. Remove the old 5.10 patches, configs and files using: find target/linux -iname '*-5.10' -exec rm -r {} \; Further, remove the 5.10 include. Signed-off-by: Nick Hainke <vincent@systemli.org>
* realtek: 5.15: replace fallthrough comment for rtl838x ethernet driverChristian Marangi2023-05-121-1/+1
| | | | | | | | | | | | | | Replace fallthrough comment with fallthrough macro for rtl838x ethernet driver. Fix compilarion warning: drivers/net/ethernet/rtl838x_eth.c: In function 'rtl930x_mdio_reset': drivers/net/ethernet/rtl838x_eth.c:1959:43: error: this statement may fall through [-Werror=implicit-fallthrough=] 1959 | private_poll_mask |= BIT(i); drivers/net/ethernet/rtl838x_eth.c:1961:17: note: here 1961 | case PHY_INTERFACE_MODE_USXGMII: | ^~~~ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: 5.15: fix uninizialized variable in rtl83xx qos driverChristian Marangi2023-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Fix uninizialized variable in rtl83xx qos driver Fix compilation error: drivers/net/dsa/rtl83xx/qos.c: In function 'rtl838x_setup_prio2queue_matrix': drivers/net/dsa/rtl83xx/qos.c:298:19: error: 'v' is used uninitialized [-Werror=uninitialized] 298 | v |= i << (min_queues[i] * 3); | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/rtl83xx/qos.c:294:13: note: 'v' was declared here 294 | u32 v; | ^ drivers/net/dsa/rtl83xx/qos.c: In function 'rtl83xx_setup_prio2queue_cpu_matrix': drivers/net/dsa/rtl83xx/qos.c:320:19: error: 'v' is used uninitialized [-Werror=uninitialized] 320 | v |= max_queues[i] << (i * 3); | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/rtl83xx/qos.c:316:13: note: 'v' was declared here 316 | u32 v; | ^ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: 5.15: comment unused part of realtek ethernet driverChristian Marangi2023-05-127-253/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comment unused part of realtek phy driver. Fix compilation warning: drivers/net/phy/rtl83xx-phy.c: In function 'rtl8380_configure_int_rtl8218b': drivers/net/phy/rtl83xx-phy.c:747:21: error: unused variable 'ipd_flag' [-Werror=unused-variable] 747 | int ipd_flag = 1; | ^~~~~~~~ drivers/net/phy/rtl83xx-phy.c: At top level: drivers/net/phy/rtl83xx-phy.c:3333:13: error: 'rtl931x_sds_disable' defined but not used [-Werror=unused-function] 3333 | static void rtl931x_sds_disable(u32 sds) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Comment unused part of realtek dsa driver. Fix compilation warning: drivers/net/dsa/rtl83xx/common.c: In function 'rtl83xx_fib_event': drivers/net/dsa/rtl83xx/common.c:1430:58: error: unused variable 'fen6_info' [-Werror=unused-variable] 1430 | struct fib6_entry_notifier_info *fen6_info = ptr; | ^~~~~~~~~ drivers/net/dsa/rtl83xx/common.c: At top level: drivers/net/dsa/rtl83xx/common.c:531:12: error: 'rtl83xx_octet_cntr_alloc' defined but not used [-Werror=unused-function] 531 | static int rtl83xx_octet_cntr_alloc(struct rtl838x_switch_priv *priv) | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Drop unused priv in realtek dsa driver. Fix compilation warning: drivers/net/dsa/rtl83xx/dsa.c: In function 'rtl83xx_port_lag_change': drivers/net/dsa/rtl83xx/dsa.c:2016:37: error: unused variable 'priv' [-Werror=unused-variable] 2016 | struct rtl838x_switch_priv *priv = ds->priv; | ^~~~ cc1: all warnings being treated as errors Comment rtl838x_pie_rule_dump in realtek dsa driver for rtl83xx Fix compilation warning: drivers/net/dsa/rtl83xx/rtl838x.c:1294:13: error: 'rtl838x_pie_rule_dump' defined but not used [-Werror=unused-function] 1294 | static void rtl838x_pie_rule_dump(struct pie_rule *pr) | ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Comment multiple function in realtek dsa driver for rtl930x Fix compilation warning: drivers/net/dsa/rtl83xx/rtl930x.c:1463:12: error: 'rtl930x_l3_intf_add' defined but not used [-Werror=unused-function] 1463 | static int rtl930x_l3_intf_add(struct rtl838x_switch_priv *priv, struct rtl838x_l3_intf *intf) | ^~~~~~~~~~~~~~~~~~~ drivers/net/dsa/rtl83xx/rtl930x.c:1414:12: error: 'rtl930x_l3_mtu_del' defined but not used [-Werror=unused-function] 1414 | static int rtl930x_l3_mtu_del(struct rtl838x_switch_priv *priv, int mtu) | ^~~~~~~~~~~~~~~~~~ drivers/net/dsa/rtl83xx/rtl930x.c:995:12: error: 'rtl930x_l3_hash6' defined but not used [-Werror=unused-function] 995 | static u32 rtl930x_l3_hash6(struct in6_addr *ip6, int algorithm, bool move_dip) | ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors drivers/net/dsa/rtl83xx/rtl930x.c:1690:13: error: 'rtl930x_read_pie_fixed_fields' defined but not used [-Werror=unused-function] 1690 | static void rtl930x_read_pie_fixed_fields(u32 r[], struct pie_rule *pr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/rtl83xx/rtl930x.c:1432:12: error: 'rtl930x_l3_mtu_add' defined but not used [-Werror=unused-function] 1432 | static int rtl930x_l3_mtu_add(struct rtl838x_switch_priv *priv, int mtu) | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Comment rtl931x_read_pie_fixed_fields in realtek dsa driver for rtl931x Fix compilation warning: drivers/net/dsa/rtl83xx/rtl931x.c:1116:13: error: 'rtl931x_read_pie_fixed_fields' defined but not used [-Werror=unused-function] 1116 | static void rtl931x_read_pie_fixed_fields(u32 r[], struct pie_rule *pr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Comment rtl93xx_header_vlan_set in realtek ethernet driver for rtl838x Fix compilation warning: drivers/net/ethernet/rtl838x_eth.c: At top level: drivers/net/ethernet/rtl838x_eth.c:164:13: error: 'rtl93xx_header_vlan_set' defined but not used [-Werror=unused-function] 164 | static void rtl93xx_header_vlan_set(struct p_hdr *h, int vlan) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: 5.15: fix warning for i2c_mii_valid_phy_id and i2c_mii_phy_addrChristian Marangi2023-05-121-35/+15
| | | | | | | | | | | | | | | | Rework exposing i2c_mii_valid_phy_id and i2c_mii_phy_addr in global include. Fix compilation warning: In file included from drivers/net/phy/sfp.c:11: ./include/linux/mdio/mdio-i2c.h:27:21: error: 'i2c_mii_phy_addr' defined but not used [-Werror=unused-function] 27 | static unsigned int i2c_mii_phy_addr(int phy_id) | ^~~~~~~~~~~~~~~~ ./include/linux/mdio/mdio-i2c.h:22:13: error: 'i2c_mii_valid_phy_id' defined but not used [-Werror=unused-function] 22 | static bool i2c_mii_valid_phy_id(int phy_id) | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: 5.15: fix compilation warning with PHY_INTERFACE_MODE_HSGMIIChristian Marangi2023-05-121-1/+20
| | | | | | | | | | | | | PHY_INTERFACE_MODE_HSGMII was not handled in phylink_get_linkmodes and phylink_parse_mode. Fix compilation warning by adding it in the enum: drivers/net/phy/phylink.c: In function 'phylink_get_linkmodes': drivers/net/phy/phylink.c:360:9: error: enumeration value 'PHY_INTERFACE_MODE_HSGMII' not handled in switch [-Werror=switch] 360 | switch (interface) { | ^~~~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: remove redundant is_lagmember checksJan Hoffmann2023-05-072-26/+4
| | | | | | | | | | | | | All callers of the rtl83xx_mc_group_* functions already do the same check, so these aren't needed. For rtl83xx_mc_group_alloc, this branch also incorrectly returned 0 instead of a negative value. If the branch wasn't effectively dead code anyway, this could potentially have caused bugs, as 0 is a valid multicast group entry index. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: remove store_mcgroups/load_mcgroupsJan Hoffmann2023-05-074-58/+0
| | | | | | | | | | | | | | | | | | | The current implementation only works when store and load are called for the same port without any other calls in between. This is because the store function only saves a single port number instead of a portmask for each group. It also doesn't take into account that the allocation of multicast group entries might change between store/load calls. As a result, the multicast port mask table gets corrupted. This also includes the reserved entry for unknown multicast, which gets corrupted even when no other mdb entries have been added. Remove the code for storing/loading multicast groups entirely, as the original commit message doesn't offer a convincing reason why this would be necessary in the first place. Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: don't add CPU port to multicast portmasksJan Hoffmann2023-05-072-10/+4
| | | | | | | | | | | | | There shouldn't be any reason to forward all multicast to the CPU. The original commit message also doesn't provide a reason for this seemingly unrelated change. The current implementation of the delete method is also broken, as it entirely removes any entry when the portmask contains only the CPU port, even if it was explicitly created. Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: actually remove port from multicast portmaskJan Hoffmann2023-05-072-0/+2
| | | | | Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: don't treat first multicast portmask entry as reservedJan Hoffmann2023-05-072-2/+0
| | | | | | | | | | | | | | There doesn't appear to be a reason to do this, as only the last entry is actually reserved for unknown multicast. This also fixes two issues: - As the increment happened after the bounds check, the value of the actually reserved last entry could be overwritten. - On deletion of entries, a corresponding decrement was missing, causing the wrong entry to be marked as free. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: fix writing/deletion of CAM entriesJan Hoffmann2023-05-072-8/+8
| | | | | | | Actually use the index returned by rtl83xx_find_l2_cam_entry. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: handle changed flags in VLAN configurationJan Hoffmann2023-05-072-37/+43
| | | | | | | | | | | The port_vlan_add method may be called while a port is already a member of that VLAN, so it needs to be able to handle changed flags. Fix it to properly handle when the PVID or UNTAGGED flag was previously set, but now no longer is. To reduce duplication, move PVID configuration to a separate function. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: fix standalone ports in presence of static fdb entriesJan Hoffmann2023-05-078-0/+100
| | | | | | | | | | | | | | | | | | | | The registers L2_PORT_STATIC_MV_ACT seem to specify the action to take when the source address of a packet exists as a static fdb entry on another port. By default the configured action is to drop such packets. For standalone ports, this behaviour is undesired, as all traffic should be forwarded to the CPU. So change the action to forward on standalone ports. A situation where this issue can occur is when a non-offloaded bond interface is part of a bridge. In that case, the CPU port will have fdb entries for devices connected to the bond interface, which are managed by the assisted learning feature. For now, this is only implemented for RTL838x/RTL839x, as the available set of registers differs for the other devices. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: initialize port masks to match the default stateJan Hoffmann2023-05-072-24/+22
| | | | | | | | | | | | | All ports are disabled by default, so configure the port isolation masks and the pm field accordingly in the setup function. When port_enable is called for a port, the isolation masks will be set up so that traffic can flow between the port and the CPU. While at it, change the code to also use the traffic_set method in rtl83xx_setup, instead of writing to the RTL838x_PORT_ISO_CTRL(i) registers directly. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: properly update port masks when port leaves bridgeJan Hoffmann2023-05-072-10/+10
| | | | | | | | | | | | | | | | | Correctly update the isolation mask of the port being configured. The port_bitmap variable should contain all other bridge members and needs to be actually removed from the isolation mask instead of added to it. Also actually remove the port being configured from the pm field of the other ports, so that any other ports that are currently disabled will be configured correctly when they are enabled. Fixes: df8e6be59a1f ("rtl838x: add new architecture") [fixed updating pm field of other ports] Fixes: 2b88563ee5aa ("realtek: update the tree to the latest refactored version") [reintroduced incorrect pm field update] Fixes: 27029277f98d ("realtek: add switch driver support for the RTL93XX based switches") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: adapt patch description to it's current useNick Hainke2023-05-061-3/+2
| | | | | | The patch is not doing anymore what the descriptions says. Update it. Signed-off-by: Nick Hainke <vincent@systemli.org>
* realtek: hpe_1920-8g: add phy-handle for SFP portsJan Hoffmann2023-04-302-0/+4
| | | | | | | | The switch driver actually expects every port to have a PHY handle, and several branches in the code determine if a port is valid by checking for a non-zero phy field. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* kernel: Deactivate CONFIG_LEGACY_PTYSHauke Mehrtens2023-04-298-16/+0
| | | | | | | | | The legacy (BSD) PTY support could open security problems in a system, We do not need them in OpenWrt, deactivate this option in all targets. Debian also deactivates this option. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: bump 5.10 to 5.10.178John Audia2023-04-222-2/+2
| | | | | | | | | | | Removed upstreamed: backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1] 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.178&id=0279e82e148407feec88466990de14bcba9e12c0 All other patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.108John Audia2023-04-223-3/+3
| | | | | | | | | | | | | | | | | Removed upstreamed: backport-5.15/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1] backport-5.15/612-v6.3-skbuff-Fix-a-race-between-coalescing-and-releasing-S.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=85d7a7044b759d865d10395a357632af00de5867 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=906a6689bb0191ad2a44131a3377006aa098af59 Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: Fix typo for EnGenius EWS2910PRaylynn Knight2023-04-071-1/+1
| | | | | | | | Fix mis-typed DEVICE-MODEL in mk file for EnGenius EWS2910P. Signed-off-by: Raylynn Knight <rayknight@me.com> [ fix wrong SoB format and improve commit title/description ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* realtek: refresh patchesDaniel Golle2023-04-032-2/+2
| | | | | | | | Refresh patches which were no longer applying cleanly after a recently added SFP quirk. Fixes: 658b45ce48 ("generic: add quirk for HG MXPD-483II 2500M fiber SFP") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* generic: net: pcs: add driver for MediaTek SGMII PCSDaniel Golle2023-03-273-5/+5
| | | | | | Backport dedicated PCS driver for MediaTek LynxI SGMII/SerDes unit. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* realtek: switch to Kernel 5.15 by defaultPaul Spooren2023-03-141-2/+1
| | | | | | | | | Getting ready for the next release. Tested-by: Sander Vanheule <sander@svanheule.net> Tested-by: Olliver Schinagl <oliver@schinagl.nl> Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Paul Spooren <mail@aparcar.org>
* kernel: bump 5.15 to 5.15.96John Audia2023-02-281-1/+1
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.94John Audia2023-02-181-3/+3
| | | | | | | | | | Patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: add support for APRESIA ApresiaLightGS120GT-SSINAGAKI Hiroshi2023-02-133-0/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APRESIA ApresiaLightGS120GT-SS (APLGS120GTSS) is a 16 + 4 ports gigabit switch, based on RTL8382M. Specifications: - SoC : Realtek RTL8382M - RAM : DDR3 256 MiB (Nanya NT5CC256M8JQ-EK) - Flash : SPI-NOR 32 MiB (Macronix MX25L25635FMI-10G) - Ethernet : 10/100/1000 Mbps x16 + 4 - port 1-8 : RTL8218B - port 9-16 : RTL8382M, TP (SoC, RTL8218B) - port 17-20 : RTL8214FC, TP/SFP (Combo) - LEDs/Keys : 3x/1x - UART : through-hole on PCB - J6: 3.3V, TX, RX, GND from tri-angle marking side - 115200n8 - Power : 100-120/200-240 VAC, 50/60 Hz Max. 16 W, Avg 14 W (100 VAC) - Plug : IEC 60320-C13 Flash instruction using factory image: 1. Boot ApresiaLightGS120GT-SS normally 2. Login to WebUI and open firmware page ("ファームウェア") 3. If the device is booted from image1, set active image for next booting ("起動イメージ選択") to image2("イメージ2"), press apply ("適用") button and reboot the device to make booting from image2 4. On the WebUI, set active image to image1 5. Select the OpenWrt factory image and press update button ("更新") 6. Open reboot page ("再起動") and press reboot button ("再起動実行") Notes: - "ApresiaLightGS120GT-SS" is a model name and "APLGS120GTSS" is a model number - this device has 3x GPIO-controlled LEDs on PCB, but 1x LED ("green:unused") has no hole on the case Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: add common definition of cameo based firmwareINAGAKI Hiroshi2023-02-132-10/+16
| | | | | | | | | | | | The cameo-related recipes can also be used for APRESIA ApresiaLightGS series devices. So create common definition for the devices manufactured by Cameo. And also, the model name of ApresiaLightGS120GT-SS is too long for cameo header (max: 20 bytes), so use additional variable "CAMEO_BOARD_MODEL" in Build/cameo-headers instead of DEVICE_MODEL to use the custom name. (default of CAMEO_BOARD_MODEL: DEVICE_MODEL) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: rename cameo specific names in "Build/*" definitionsINAGAKI Hiroshi2023-02-132-10/+10
| | | | | | | | This patch renames some Cameo specific definitions for image generation. The same format is also used on APRESIA ApresiaLightGS series devices, not D-Link specific. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: fix memory leak in netevent handlerJan Hoffmann2023-02-132-16/+18
| | | | | | | | | The net_event_work struct is allocated, but only freed in a single case. Move the allocation to the branch where it is actually needed, and free it after the work has been done. Fixes: 03e1d93e0779 ("realtek: add driver support for routing offload") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: fix dts whitespaceFelix Baumann2023-02-094-9/+9
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* kernel: bump 5.10 to 5.10.166John Audia2023-02-031-11/+11
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.91John Audia2023-02-031-11/+11
| | | | | | | | | | | | | Manually rebased: pending-5.15/103-kbuild-export-SUBARCH.patch All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* realtek: use generic earlycon setup on 5.15INAGAKI Hiroshi2023-01-309-15/+32
| | | | | | | | | | Use generic earlycon on Linux Kernel instead of initialization in platform setup. And also, drop bootargs with console= parameter from I-O DATA BSH-G24MB. It uses 115200bps as baud-rate, the same as default in rtl838x.dtsi. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: remove KERNEL_PATCHVER overridesSander Vanheule2023-01-294-8/+0
| | | | | | | | | | On the realtek target, the subtarget makefiles include a KERNEL_PATCHVER setting, shadowing KERNEL_PATCHVER from target/linux/realtek/Makefile. This makes the realtek target an exception in this regard, and makes switching kernel version a bit bothersome. Remove the overrides so all subtargets use the same kernel version. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: dgs-1210-10mp: update sfp phy-handleDaniel Groth2023-01-282-4/+4
| | | | | | | | Adjust the wrong phy-handle definitions for the sfp ports so that they match the correct switch ports. Fixes: 89eb8b50d18d ("realtek: dgs-1210-10mp: add full sfp description") Signed-off-by: Daniel Groth <flygarn12@gmail.com>
* realtek: Refresh kernel patchesHauke Mehrtens2023-01-281-1/+1
| | | | | | | Make the patches apply cleanly again. Fixes: 4db8598e4296 ("realtek: Do not set KERNEL_ENTRY just to avoid NO_EXCEPT_FILL") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* realtek: timer: Fix cosmetic whitespace in commentsOlliver Schinagl2023-01-281-20/+7
| | | | | | Comments are a bit weird in the timer driver, lets fix those. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: timer: Remove CEVT_RTL9300 completelyOlliver Schinagl2023-01-283-268/+0
| | | | | | | As the timer has been fixed now, we can drop the CEVT_RTL9300 timer all together. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: timer: Activate for RTL930x devicesOlliver Schinagl2023-01-283-15/+16
| | | | | | | | | Use the new timer driver for the RTL930x devices. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> [remove old clock provider, select MIPS_EXTERNAL_TIMER and refresh kernel config] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: timer: Register enabled scheduler clockSander Vanheule2023-01-282-2/+2
| | | | | | | | | | | | | Before calling sched_clock_register(), the timer used to drive the scheduling clock should already be enabled. Otherwise the kernel log will show strange time jumps during, and the watchdog might not be pinged in a timely fashion, resulting in reboots. [ 0.160281] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 78.104319] clocksource: Switched to clocksource realtek_otto_timer Fixes: 3cc801117118 ("realtek: resurrect timer driver") Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: eth: Fix missing end of comment markerOlliver Schinagl2023-01-271-1/+1
| | | | | | | Because this comment is followed by another comment, nothing luckily breaks, so only a cosmetic change. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: rtl931x: drop LINKER_LOAD_ADDRESS bypassSander Vanheule2023-01-252-118/+0
| | | | | | | | | | | | | RTL931x kernel builds were patched to bypass the LINKER_LOAD_ADDRESS parameter, and hardcode it to 0x80220000. This doesn't make much sense, since value of LINKER_LOAD_ADDRESS, load-ld, only appears to be a copy of load-y, adjusted to the linker's taste. Dropping the hacks for bypassing LINKER_LOAD_ADDRESS results in a kernel that actually starts booting on an RTL9313 (Netgear MS510TXM), but currently still hangs when the kernel switches timers. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: dsa: support active-high LEDsLorenz Brun2023-01-242-0/+10
| | | | | | | | | The TP-LINK TL-ST1008F has active-high LEDs, so we need a device tree property to express this. Signed-off-by: Lorenz Brun <lorenz@brun.one> [Tidy up code, restrict changes to 5.15] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: rtl931x: drop CONFIG_NO_EXCEPT_FILL hackSander Vanheule2023-01-242-34/+0
| | | | | | | | | On RTL931x builds, CONFIG_RTL931X was used as a stand-in for CONFIG_NO_EXCEPT_FILL. Now that the latter is always selected for devices in the realtek target, this hack can be removed. Resulting device images are binary identical. Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: Refresh kernel config with no_except_fillOlliver Schinagl2023-01-248-0/+8
| | | | | | Update the config files with the previous commit. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>