Xiaoliang Yang
a0244e7621
net: hsr: create an API to get hsr port type
...
Since the introduction of HSR_PT_INTERLINK in commit 5055cccfc2 ("net:
hsr: Provide RedBox support (HSR-SAN)"), we see that different port
types require different settings for hardware offload, which was not the
case before when we only had HSR_PT_SLAVE_A and HSR_PT_SLAVE_B. But
there is currently no way to know which port is which type, so create
the hsr_get_port_type() API function and export it.
When hsr_get_port_type() is called from the device driver, the port can
must be found in the HSR port list. An important use case is for this
function to work from offloading drivers' NETDEV_CHANGEUPPER handler,
which is triggered by hsr_portdev_setup() -> netdev_master_upper_dev_link().
Therefore, we need to move the addition of the hsr_port to the HSR port
list prior to calling hsr_portdev_setup(). This makes the error
restoration path also more similar to hsr_del_port(), where
kfree_rcu(port) is already used.
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Lukasz Majewski <lukma@denx.de >
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com >
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com >
Reviewed-by: Łukasz Majewski <lukma@nabladev.com >
Link: https://patch.msgid.link/20251130131657.65080-3-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2025-12-01 16:45:06 -08:00
..
2025-11-06 14:19:43 -08:00
2025-09-24 19:32:00 -06:00
2025-11-29 13:37:12 +01:00
2025-10-08 23:30:46 +02:00
2025-10-06 13:02:50 -05:00
2025-10-01 17:32:51 -07:00
2025-10-22 08:52:17 +02:00
2025-09-25 09:09:31 +03:00
2025-09-25 14:31:56 -06:00
2025-10-04 16:26:32 -07:00
2025-11-19 20:32:28 -08:00
2025-10-02 15:17:01 -07:00
2025-10-03 17:23:18 +02:00
2025-11-05 17:38:03 -08:00
2025-11-27 10:41:31 +01:00
2025-10-06 10:41:03 -07:00
2025-11-06 09:27:40 -08:00
2025-10-02 18:44:54 -07:00
2025-11-24 14:37:54 +01:00
2025-10-06 13:22:21 -07:00
2025-11-10 17:28:38 -08:00
2025-10-13 10:34:46 +01:00
2025-11-20 13:37:17 +01:00
2025-10-07 08:05:44 -06:00
2025-10-28 07:52:55 -06:00
2025-10-10 10:37:13 -07:00
2025-11-04 19:10:33 -08:00
2025-10-15 12:22:22 +02:00
2025-10-13 17:36:20 -07:00
2025-09-24 14:29:14 -07:00
2025-09-24 14:29:14 -07:00
2025-09-29 11:20:29 -07:00
2025-10-03 04:30:28 -10:00
2025-09-30 17:58:11 -07:00
2025-11-09 09:22:08 -08:00
2025-10-11 11:19:16 -07:00
2025-09-29 17:48:27 -07:00
2025-10-01 13:57:22 +02:00
2025-11-05 13:43:41 +01:00
2025-10-31 17:59:17 -07:00
2025-11-13 16:27:56 +01:00
2025-11-11 17:38:48 -08:00
2025-10-06 14:26:50 +02:00
2025-10-28 22:59:19 +01:00
2025-11-20 09:13:26 -08:00
2025-10-03 10:51:44 -07:00
2025-11-12 10:47:42 +01:00
2025-11-05 17:05:19 -08:00
2025-11-09 21:19:42 -08:00
2025-09-24 16:30:34 -07:00
2025-10-14 11:57:40 +02:00
2025-11-18 08:21:27 -08:00
2025-11-09 21:19:41 -08:00
2025-10-15 13:24:33 -07:00
2025-10-04 18:52:58 +02:00
2025-10-11 23:57:33 +02:00
2025-10-29 18:28:29 -07:00
2025-11-10 10:38:14 +01:00
2025-11-20 10:25:10 +01:00
2025-11-10 10:38:14 +01:00
2025-11-10 10:38:14 +01:00
2025-11-10 10:38:15 +01:00
2025-11-10 10:38:15 +01:00
2025-11-10 10:38:15 +01:00
2025-11-10 10:38:14 +01:00
2025-11-25 10:28:20 +01:00
2025-12-01 16:45:06 -08:00
2025-11-10 10:52:31 -08:00
2025-10-02 09:56:23 -07:00
2025-09-29 11:20:29 -07:00
2025-10-17 16:06:52 -07:00
2025-10-02 18:18:33 -07:00
2025-10-07 13:48:55 -07:00
2025-09-28 11:51:32 -07:00
2025-10-18 10:25:43 +02:00
2025-09-30 13:40:02 -04:00
2025-10-13 09:12:36 +02:00
2025-10-04 11:28:45 -07:00
2025-09-29 09:42:35 +02:00
2025-09-29 09:42:35 +02:00
2025-10-03 11:14:02 -07:00
2025-09-24 19:32:00 -06:00
2025-10-29 09:41:40 +01:00
2025-10-02 18:18:33 -07:00
2025-10-14 19:16:13 -07:00
2025-10-07 14:01:11 -07:00
2025-10-05 12:11:07 -07:00
2025-11-26 16:56:33 -08:00
2025-10-17 05:31:56 -10:00
2025-10-06 11:21:26 -06:00
2025-10-02 18:18:33 -07:00
2025-11-15 10:52:00 -08:00
2025-09-29 11:20:29 -07:00
2025-09-24 09:10:45 -07:00
2025-09-30 16:00:29 -07:00
2025-10-03 16:32:36 -07:00
2025-11-04 19:10:33 -08:00
2025-10-21 18:08:23 -07:00
2025-10-16 16:25:10 -07:00
2025-11-28 00:00:38 +00:00
2025-10-13 14:33:00 -04:00
2025-10-06 13:22:21 -07:00
2025-09-25 09:23:54 +02:00
2025-09-29 11:20:29 -07:00
2025-09-25 09:23:47 +02:00
2025-10-01 07:55:42 -05:00
2025-09-25 08:01:16 +02:00
2025-10-03 17:41:12 -07:00
2025-10-03 14:20:40 -07:00
2025-10-02 15:28:42 -06:00
2025-11-09 05:13:02 -05:00
2025-11-12 18:47:16 -06:00
2025-09-25 16:10:35 -07:00
2025-11-07 18:53:13 -08:00
2025-12-01 15:08:24 -08:00
2025-10-24 18:52:08 -07:00
2025-09-29 11:20:29 -07:00
2025-10-22 11:38:11 +02:00
2025-09-25 09:57:16 +02:00
2025-09-25 09:23:54 +02:00
2025-10-01 15:11:00 -07:00
2025-09-29 18:13:10 -07:00
2025-10-17 16:08:42 -07:00
2025-10-07 08:40:15 -07:00
2025-10-28 15:17:36 +00:00
2025-09-28 11:51:29 -07:00
2025-10-13 13:18:03 +02:00
2025-09-30 15:06:33 -07:00
2025-09-29 09:42:35 +02:00
2025-10-31 11:14:54 -07:00
2025-10-03 11:14:02 -07:00
2025-11-27 17:41:51 -08:00
2025-10-02 18:18:33 -07:00
2025-11-04 19:10:33 -08:00
2025-11-20 17:57:40 -08:00
2025-10-01 11:34:12 -07:00
2025-09-26 18:53:48 +02:00
2025-09-29 11:20:29 -07:00
2025-10-10 08:21:45 +03:00
2025-09-30 11:11:21 -07:00
2025-09-29 11:20:29 -07:00
2025-10-01 07:24:55 -04:00
2025-10-01 07:24:43 -04:00
2025-11-26 19:45:54 -08:00
2025-10-01 07:24:43 -04:00
2025-10-01 07:24:55 -04:00
2025-10-02 18:18:33 -07:00