aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.15/drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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: remove redundant is_lagmember checksJan Hoffmann2023-05-071-13/+2
| | | | | | | | | | | | | 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-072-27/+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-071-5/+2
| | | | | | | | | | | | | 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-071-0/+1
| | | | | 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-071-1/+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-071-4/+4
| | | | | | | 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-071-17/+21
| | | | | | | | | | | 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-074-0/+50
| | | | | | | | | | | | | | | | | | | | 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-071-12/+11
| | | | | | | | | | | | | 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-071-5/+5
| | | | | | | | | | | | | | | | | 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: fix memory leak in netevent handlerJan Hoffmann2023-02-131-8/+9
| | | | | | | | | 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: 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: Register enabled scheduler clockSander Vanheule2023-01-281-1/+1
| | | | | | | | | | | | | 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: dsa: support active-high LEDsLorenz Brun2023-01-241-0/+8
| | | | | | | | | 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: use irq_force_affinity on otto timer insteadINAGAKI Hiroshi2023-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit e0d2c59ee995 ("genirq: Always limit the affinity to online CPUs", 5.10) on Linux, the cpumask passed to irq_set_affinity of irqchip driver is limited to online CPUs. When irq_do_set_affinity called from otto timer driver with only one secondary CPU, that CPU is not marked as online yet, filtered out by cpu_online_mask and fall to error path. Then, fail to set affinity for that CPU and it leads to instability of timer on secondary CPU(s). At least, RTL839x system will be affected. log: [ 37.560020] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 37.638025] rcu: 1-...!: (0 ticks this GP) idle=6ac/0/0x0 softirq=0/0 fqs=1 (false positive?) [ 37.752683] (detected by 0, t=6002 jiffies, g=-1179, q=26293) [ 37.829510] Sending NMI from CPU 0 to CPUs 1: [ 37.886857] NMI backtrace for cpu 1 skipped: idling at r4k_wait_irqoff+0x1c/0x24 [ 37.984801] rcu: rcu_sched kthread timer wakeup didn't happen for 5999 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 [ 38.132743] rcu: Possible timer handling issue on cpu=1 timer-softirq=0 [ 38.221033] rcu: rcu_sched kthread starved for 6000 jiffies! g-1179 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1 [ 38.356336] rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. [ 38.474440] rcu: RCU grace-period kthread stack dump: ... Replace to irq_force_affinity from irq_set_affinity and ignore cpu_online_mask to fix the issue. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Tested-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: Follow kernel comment style recommendationMarkus Stockhausen2023-01-131-21/+27
| | | | | | | While Linus is fine with longer code lines, comments should still be within the 80 char limit. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
* realtek: 5.15: Improve error handling in rtl838x_pie_rule_write()Pascal Ernster2023-01-051-6/+10
| | | | | | | In target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c, make rtl838x_pie_rule_write() return non-zero value case of error. Signed-off-by: Pascal Ernster <git@hardfalcon.net>
* realtek: 5.15: Improve rtl838x dsa driver error handlingPascal Ernster2023-01-051-24/+32
| | | | | | | | | Make sure functions calling rtl838x_smi_wait_op() return its return value in target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c. This brings the code style in line with the rtl839x implementation. Suggested-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Pascal Ernster <git@hardfalcon.net>
* realtek: return correct error value for phy opsPascal Ernster2023-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | A behavioural change was introduced with commit 758c88b96963 ("realtek: Whitespace and codestyle cleanup") causing rtl838x_read_phy() and rtl838x_write_phy() to unconditionally return -ETIMEDOUT. As a result, probing the device during boot fails: Error setting up netdev, freeing it again. rtl838x-eth: probe of 1b00a300.ethernet failed with error -5 Fix the bootloop caused by this regression with kernel 5.15 on rtl838x devices, by properly returning 0 on success. Tested on a Netgear GS108T v3, a Netgear GS310TP v1, a Zyxel GS1900-8HP v1 and an HPE 1920-8G. Fixes: 758c88b969639d0e6b684669d2e54dd1be3102f4 ("realtek: Whitespace and codestyle cleanup") Tested-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Jan Hoffmann <jan@3e8.eu> Signed-off-by: Pascal Ernster <git@hardfalcon.net>
* realtek: Fix reset register accessBirger Koblitz2022-12-281-1/+1
| | | | | | | | | | | The reset register on RTL93xx not merely have bits to execute a reset of a hardware component, but also configuration bits for reset procedures. Keep them during executing a reset. Signed-off-by: Birger Koblitz <git@birger-koblitz.de> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> [backport to 5.10 kernel] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: Reduce variable scopesOlliver Schinagl2022-12-2712-443/+335
| | | | | | | | | | | | | | Linus prefers to have loop initializers nice and tightly scoped. In OpenWRT this has been possible since 41a1a652fbd4 ("kernel: backport gnu11 upgrade"). This patch cleans up variable scope while trying to do the above for 'simple for loops'. This cleans up and simplifies some functions and code, and pulls in variables to a smaller scope. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: Replace C++ style commentsOlliver Schinagl2022-12-2718-956/+958
| | | | | | | The only exception to C++ style comments are SPDX license identifier markers at the start of C files (even headers have C style markers). Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: Whitespace and codestyle cleanupOlliver Schinagl2022-12-2722-805/+760
| | | | | | | | Fix some ugly whitepsaces and codestyle issues around the realtek sources. While this is by no means perfect, it catches what it caught. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* realtek: add cond_resched to loops accessing the FDB tableJan Hoffmann2022-12-272-0/+6
| | | | | | | | | A full loop accessing all FDB entries can take several milliseconds (on RTL839x about 20 ms), so give other kernel tasks a chance to run. This is especially important for rtl83xx_port_fdb_dump which is itself called in a loop for all ports by the kernel. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: restructure rtl_table_read/writeJan Hoffmann2022-12-272-14/+31
| | | | | | | | | | | | | | | | These two functions are identical apart from writing different values to the read/write bit. Create a new function rtl_table_exec to reduce code duplication. Also replace the unbounded busy-waiting loop. The new implementation may sleep, but as the hardware typically responds before the first poll, any callers doing many table accesses still need to make sure not to block other kernel tasks themselves. So far, polling timeout errors are only handled by logging an error, but a return value is added to allow proper handling in the future. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: simplify log messages in rtl83xx_mdio_probeJan Hoffmann2022-12-271-7/+1
| | | | | | | | | | This function currently prints three messages for every switch port at KERN_INFO level. This takes a considerable amount of time during bootup and can even trigger an external watchdog. Replace these log messages by a single one at KERN_DEBUG level. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: don't set L2LEARNING flag in rtl83xx TX headerJan Hoffmann2022-12-271-2/+2
| | | | | | | | | | | | | | | | | | | As learning for the CPU port is now disabled globally, the bit in the TX header doesn't have any effect anymore. Remove it to make the header consistent with the global configuration. Originally, this change was intended to be applied before commit eb456aedfe24 ("realtek: use assisted learning on CPU port"), which is why the commit message incorrectly mentions that the TX header already disables learning. The reason for disabling learning on the CPU port in the first place is that it doesn't work correctly when packets are trapped to the CPU and then forwarded by the CPU to other ports. In that case, the switch would incorrectly learn the CPU port as source. An example that triggered this issue are Multicast Listener Reports and IGMP membership reports. Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* realtek: enable needs_standalone_vlan_filtering on DSA driver in 5.15INAGAKI Hiroshi2022-12-151-0/+1
| | | | | | | To configure VLAN 0, enable needs_standalone_vlan_filtering option of dsa_switch struct. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: update dsa.c of DSA driver for 5.15INAGAKI Hiroshi2022-12-151-101/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rtl83xx_vlan_filtering() "struct switchdev_trans *trans" parameter was removed[1] and "struct netlink_ext_ack *extack" was added[2]. [1]: https://www.spinics.net/lists/netdev/msg712250.html [2]: https://www.spinics.net/lists/netdev/msg722496.html - rtl83xx_vlan_add/del() vlan->vid_begin and vlan->vid_end were removed and vlan->vid was added[3]. [3]: https://www.spinics.net/lists/netdev/msg712248.html - rtl83xx_vlan_prepare() "port_vlan_prepare" member was removed from "dsa_switch_ops" struct in dsa.h[4] and vlan_prepare function should be called from vlan_add function. Also, change return type of vlan_add function to int. [4]: https://www.spinics.net/lists/netdev/msg712252.html - rtl83xx_port_mdb_add() "port_mdb_prepare" member in "dsa_switch_ops" struct was removed and preparation need to be done in the function of "port_mdb_add" member instead. And also, int type need to be returned on "port_mdb_add" member[5]. [5]: https://www.spinics.net/lists/netdev/msg712251.html - rtl83xx_port_pre_bridge_flags(), rtl83xx_port_bridge_flags() The current "port_pre_bridge_flags" member and "port_bridge_flags" member in "dsa_switch_ops" in dsa.h has flags of "struct switchdev_brport_flags" type instead[6], so adjust to it. And, the changed features are passed by flags.mask[7] in rtl83xx_port_bridge_flags(), so check it before calling function to enable/disable fieature. [6]: https://lore.kernel.org/lkml/20210212151600.3357121-7-olteanv@gmail.com/ [7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e18f4c18ab5b0dd47caaf8377c2e36d66f632a8c Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [shorten final return statement of rtl83xx_port_mdb_add()] Signed-off-by: Sander Vanheule <sander@svanheule.net>
* realtek: copy dts/files/patches/configs for 5.15INAGAKI Hiroshi2022-12-1528-0/+24942
Copy dts/files/patches/configs from 5.10 to 5.15. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [refresh with updated DGS-1210 dts files] Signed-off-by: Sander Vanheule <sander@svanheule.net>