]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
authorSasha Levin <sashal@kernel.org>
Tue, 16 Nov 2021 00:57:30 +0000 (19:57 -0500)
committerSasha Levin <sashal@kernel.org>
Tue, 16 Nov 2021 00:57:30 +0000 (19:57 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch [deleted file]
queue-5.10/series
queue-5.14/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch [deleted file]
queue-5.14/series
queue-5.15/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch [deleted file]
queue-5.15/series
queue-5.4/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch [deleted file]
queue-5.4/series

diff --git a/queue-5.10/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch b/queue-5.10/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
deleted file mode 100644 (file)
index 6e4cb3d..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-From 73d9637a60bf6a53a4a2debc9869c2ad6de10bd5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 22 Oct 2021 21:43:08 +0300
-Subject: net: dsa: lantiq_gswip: serialize access to the PCE table
-
-From: Vladimir Oltean <vladimir.oltean@nxp.com>
-
-[ Upstream commit 49753a75b9a32de4c0393bb8d1e51ea223fda8e4 ]
-
-Looking at the code, the GSWIP switch appears to hold bridging service
-structures (VLANs, FDBs, forwarding rules) in PCE table entries.
-Hardware access to the PCE table is non-atomic, and is comprised of
-several register reads and writes.
-
-These accesses are currently serialized by the rtnl_lock, but DSA is
-changing its driver API and that lock will no longer be held when
-calling ->port_fdb_add() and ->port_fdb_del().
-
-So this driver needs to serialize the access to the PCE table using its
-own locking scheme. This patch adds that.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/dsa/lantiq_gswip.c | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
-index 4d23a7aba7961..f54e7f48b0dd7 100644
---- a/drivers/net/dsa/lantiq_gswip.c
-+++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -274,6 +274,7 @@ struct gswip_priv {
-       int num_gphy_fw;
-       struct gswip_gphy_fw *gphy_fw;
-       u32 port_vlan_filter;
-+      struct mutex pce_table_lock;
- };
- struct gswip_pce_table_entry {
-@@ -521,10 +522,14 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSRD :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADRD;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -534,8 +539,10 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       for (i = 0; i < ARRAY_SIZE(tbl->key); i++)
-               tbl->key[i] = gswip_switch_r(priv, GSWIP_PCE_TBL_KEY(i));
-@@ -551,6 +558,8 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       tbl->valid = !!(crtl & GSWIP_PCE_TBL_CTRL_VLD);
-       tbl->gmap = (crtl & GSWIP_PCE_TBL_CTRL_GMAP_MASK) >> 7;
-+      mutex_unlock(&priv->pce_table_lock);
-+
-       return 0;
- }
-@@ -563,10 +572,14 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSWR :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADWR;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -598,8 +611,12 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       crtl |= GSWIP_PCE_TBL_CTRL_BAS;
-       gswip_switch_w(priv, crtl, GSWIP_PCE_TBL_CTRL);
--      return gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
--                                    GSWIP_PCE_TBL_CTRL_BAS);
-+      err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-+                                   GSWIP_PCE_TBL_CTRL_BAS);
-+
-+      mutex_unlock(&priv->pce_table_lock);
-+
-+      return err;
- }
- /* Add the LAN port into a bridge with the CPU port by
-@@ -2040,6 +2057,7 @@ static int gswip_probe(struct platform_device *pdev)
-       priv->ds->priv = priv;
-       priv->ds->ops = &gswip_switch_ops;
-       priv->dev = dev;
-+      mutex_init(&priv->pce_table_lock);
-       version = gswip_switch_r(priv, GSWIP_VERSION);
-       /* bring up the mdio bus */
--- 
-2.33.0
-
index f13d08d49e00f87902ca7f3e3c87974a35ce6d4d..d3303346e11efcdfb6b35253724352090821c7c1 100644 (file)
@@ -237,7 +237,6 @@ iwlwifi-mvm-disable-rx-diversity-in-powersave.patch
 smackfs-use-__gfp_nofail-for-smk_cipso_doi.patch
 arm-clang-do-not-rely-on-lr-register-for-stacktrace.patch
 gre-sit-don-t-generate-link-local-addr-if-addr_gen_m.patch
-net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
 gfs2-cancel-remote-delete-work-asynchronously.patch
 gfs2-fix-glock_hash_walk-bugs.patch
 arm-9136-1-armv7-m-uses-be-8-not-be-32.patch
diff --git a/queue-5.14/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch b/queue-5.14/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
deleted file mode 100644 (file)
index dc1b188..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-From 56c28b42b54e7d10da1c427764058e14db1bb50d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 22 Oct 2021 21:43:08 +0300
-Subject: net: dsa: lantiq_gswip: serialize access to the PCE table
-
-From: Vladimir Oltean <vladimir.oltean@nxp.com>
-
-[ Upstream commit 49753a75b9a32de4c0393bb8d1e51ea223fda8e4 ]
-
-Looking at the code, the GSWIP switch appears to hold bridging service
-structures (VLANs, FDBs, forwarding rules) in PCE table entries.
-Hardware access to the PCE table is non-atomic, and is comprised of
-several register reads and writes.
-
-These accesses are currently serialized by the rtnl_lock, but DSA is
-changing its driver API and that lock will no longer be held when
-calling ->port_fdb_add() and ->port_fdb_del().
-
-So this driver needs to serialize the access to the PCE table using its
-own locking scheme. This patch adds that.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/dsa/lantiq_gswip.c | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
-index 1b9b7569c371b..b6e7f2cda1da4 100644
---- a/drivers/net/dsa/lantiq_gswip.c
-+++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -276,6 +276,7 @@ struct gswip_priv {
-       int num_gphy_fw;
-       struct gswip_gphy_fw *gphy_fw;
-       u32 port_vlan_filter;
-+      struct mutex pce_table_lock;
- };
- struct gswip_pce_table_entry {
-@@ -523,10 +524,14 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSRD :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADRD;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -536,8 +541,10 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       for (i = 0; i < ARRAY_SIZE(tbl->key); i++)
-               tbl->key[i] = gswip_switch_r(priv, GSWIP_PCE_TBL_KEY(i));
-@@ -553,6 +560,8 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       tbl->valid = !!(crtl & GSWIP_PCE_TBL_CTRL_VLD);
-       tbl->gmap = (crtl & GSWIP_PCE_TBL_CTRL_GMAP_MASK) >> 7;
-+      mutex_unlock(&priv->pce_table_lock);
-+
-       return 0;
- }
-@@ -565,10 +574,14 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSWR :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADWR;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -600,8 +613,12 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       crtl |= GSWIP_PCE_TBL_CTRL_BAS;
-       gswip_switch_w(priv, crtl, GSWIP_PCE_TBL_CTRL);
--      return gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
--                                    GSWIP_PCE_TBL_CTRL_BAS);
-+      err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-+                                   GSWIP_PCE_TBL_CTRL_BAS);
-+
-+      mutex_unlock(&priv->pce_table_lock);
-+
-+      return err;
- }
- /* Add the LAN port into a bridge with the CPU port by
-@@ -2106,6 +2123,7 @@ static int gswip_probe(struct platform_device *pdev)
-       priv->ds->priv = priv;
-       priv->ds->ops = priv->hw_info->ops;
-       priv->dev = dev;
-+      mutex_init(&priv->pce_table_lock);
-       version = gswip_switch_r(priv, GSWIP_VERSION);
-       np = dev->of_node;
--- 
-2.33.0
-
index 46fd7d75cbfa3ec232b96ebb1b79c2fb3a53d37a..568037049a828ae7526c8049a0d12fa70e81c04d 100644 (file)
@@ -305,7 +305,6 @@ iwlwifi-mvm-disable-rx-diversity-in-powersave.patch
 smackfs-use-__gfp_nofail-for-smk_cipso_doi.patch
 arm-clang-do-not-rely-on-lr-register-for-stacktrace.patch
 gre-sit-don-t-generate-link-local-addr-if-addr_gen_m.patch
-net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
 can-bittiming-can_fixup_bittiming-change-type-of-tse.patch
 gfs2-cancel-remote-delete-work-asynchronously.patch
 gfs2-fix-glock_hash_walk-bugs.patch
diff --git a/queue-5.15/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch b/queue-5.15/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
deleted file mode 100644 (file)
index 3f0986c..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-From f5b48b051b089066c6f1db520ea689edeb5b2653 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 22 Oct 2021 21:43:08 +0300
-Subject: net: dsa: lantiq_gswip: serialize access to the PCE table
-
-From: Vladimir Oltean <vladimir.oltean@nxp.com>
-
-[ Upstream commit 49753a75b9a32de4c0393bb8d1e51ea223fda8e4 ]
-
-Looking at the code, the GSWIP switch appears to hold bridging service
-structures (VLANs, FDBs, forwarding rules) in PCE table entries.
-Hardware access to the PCE table is non-atomic, and is comprised of
-several register reads and writes.
-
-These accesses are currently serialized by the rtnl_lock, but DSA is
-changing its driver API and that lock will no longer be held when
-calling ->port_fdb_add() and ->port_fdb_del().
-
-So this driver needs to serialize the access to the PCE table using its
-own locking scheme. This patch adds that.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/dsa/lantiq_gswip.c | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
-index dbd4486a173ff..1a96df70d1e85 100644
---- a/drivers/net/dsa/lantiq_gswip.c
-+++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -276,6 +276,7 @@ struct gswip_priv {
-       int num_gphy_fw;
-       struct gswip_gphy_fw *gphy_fw;
-       u32 port_vlan_filter;
-+      struct mutex pce_table_lock;
- };
- struct gswip_pce_table_entry {
-@@ -523,10 +524,14 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSRD :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADRD;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -536,8 +541,10 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       for (i = 0; i < ARRAY_SIZE(tbl->key); i++)
-               tbl->key[i] = gswip_switch_r(priv, GSWIP_PCE_TBL_KEY(i));
-@@ -553,6 +560,8 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       tbl->valid = !!(crtl & GSWIP_PCE_TBL_CTRL_VLD);
-       tbl->gmap = (crtl & GSWIP_PCE_TBL_CTRL_GMAP_MASK) >> 7;
-+      mutex_unlock(&priv->pce_table_lock);
-+
-       return 0;
- }
-@@ -565,10 +574,14 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSWR :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADWR;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -600,8 +613,12 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       crtl |= GSWIP_PCE_TBL_CTRL_BAS;
-       gswip_switch_w(priv, crtl, GSWIP_PCE_TBL_CTRL);
--      return gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
--                                    GSWIP_PCE_TBL_CTRL_BAS);
-+      err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-+                                   GSWIP_PCE_TBL_CTRL_BAS);
-+
-+      mutex_unlock(&priv->pce_table_lock);
-+
-+      return err;
- }
- /* Add the LAN port into a bridge with the CPU port by
-@@ -2106,6 +2123,7 @@ static int gswip_probe(struct platform_device *pdev)
-       priv->ds->priv = priv;
-       priv->ds->ops = priv->hw_info->ops;
-       priv->dev = dev;
-+      mutex_init(&priv->pce_table_lock);
-       version = gswip_switch_r(priv, GSWIP_VERSION);
-       np = dev->of_node;
--- 
-2.33.0
-
index 047467fdbcf85a33a9846e29a0aa9d0a2765f34c..bbf68e9b5a36426cf0ac5fa30f49ae0dbd9198cf 100644 (file)
@@ -288,7 +288,6 @@ iwlwifi-mvm-disable-rx-diversity-in-powersave.patch
 smackfs-use-__gfp_nofail-for-smk_cipso_doi.patch
 arm-clang-do-not-rely-on-lr-register-for-stacktrace.patch
 gre-sit-don-t-generate-link-local-addr-if-addr_gen_m.patch
-net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
 can-bittiming-can_fixup_bittiming-change-type-of-tse.patch
 gfs2-cancel-remote-delete-work-asynchronously.patch
 gfs2-fix-glock_hash_walk-bugs.patch
diff --git a/queue-5.4/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch b/queue-5.4/net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
deleted file mode 100644 (file)
index f6f218c..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-From 5e2817afb9f9efd4d1d49235d9fb199a4ffe4b33 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 22 Oct 2021 21:43:08 +0300
-Subject: net: dsa: lantiq_gswip: serialize access to the PCE table
-
-From: Vladimir Oltean <vladimir.oltean@nxp.com>
-
-[ Upstream commit 49753a75b9a32de4c0393bb8d1e51ea223fda8e4 ]
-
-Looking at the code, the GSWIP switch appears to hold bridging service
-structures (VLANs, FDBs, forwarding rules) in PCE table entries.
-Hardware access to the PCE table is non-atomic, and is comprised of
-several register reads and writes.
-
-These accesses are currently serialized by the rtnl_lock, but DSA is
-changing its driver API and that lock will no longer be held when
-calling ->port_fdb_add() and ->port_fdb_del().
-
-So this driver needs to serialize the access to the PCE table using its
-own locking scheme. This patch adds that.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/dsa/lantiq_gswip.c | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
-index 60e36f46f8abe..d612ef8648baa 100644
---- a/drivers/net/dsa/lantiq_gswip.c
-+++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -274,6 +274,7 @@ struct gswip_priv {
-       int num_gphy_fw;
-       struct gswip_gphy_fw *gphy_fw;
-       u32 port_vlan_filter;
-+      struct mutex pce_table_lock;
- };
- struct gswip_pce_table_entry {
-@@ -521,10 +522,14 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSRD :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADRD;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -534,8 +539,10 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       for (i = 0; i < ARRAY_SIZE(tbl->key); i++)
-               tbl->key[i] = gswip_switch_r(priv, GSWIP_PCE_TBL_KEY(i));
-@@ -551,6 +558,8 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
-       tbl->valid = !!(crtl & GSWIP_PCE_TBL_CTRL_VLD);
-       tbl->gmap = (crtl & GSWIP_PCE_TBL_CTRL_GMAP_MASK) >> 7;
-+      mutex_unlock(&priv->pce_table_lock);
-+
-       return 0;
- }
-@@ -563,10 +572,14 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSWR :
-                                       GSWIP_PCE_TBL_CTRL_OPMOD_ADWR;
-+      mutex_lock(&priv->pce_table_lock);
-+
-       err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-                                    GSWIP_PCE_TBL_CTRL_BAS);
--      if (err)
-+      if (err) {
-+              mutex_unlock(&priv->pce_table_lock);
-               return err;
-+      }
-       gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
-       gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
-@@ -598,8 +611,12 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
-       crtl |= GSWIP_PCE_TBL_CTRL_BAS;
-       gswip_switch_w(priv, crtl, GSWIP_PCE_TBL_CTRL);
--      return gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
--                                    GSWIP_PCE_TBL_CTRL_BAS);
-+      err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
-+                                   GSWIP_PCE_TBL_CTRL_BAS);
-+
-+      mutex_unlock(&priv->pce_table_lock);
-+
-+      return err;
- }
- /* Add the LAN port into a bridge with the CPU port by
-@@ -2020,6 +2037,7 @@ static int gswip_probe(struct platform_device *pdev)
-       priv->ds->priv = priv;
-       priv->ds->ops = &gswip_switch_ops;
-       priv->dev = dev;
-+      mutex_init(&priv->pce_table_lock);
-       version = gswip_switch_r(priv, GSWIP_VERSION);
-       /* bring up the mdio bus */
--- 
-2.33.0
-
index eb8c2027d9dc0089d3e7c5852a430d2d171ad0c6..f88d05e83c8173bd73bec428300ecaebfcdb83e4 100644 (file)
@@ -165,7 +165,6 @@ iwlwifi-mvm-disable-rx-diversity-in-powersave.patch
 smackfs-use-__gfp_nofail-for-smk_cipso_doi.patch
 arm-clang-do-not-rely-on-lr-register-for-stacktrace.patch
 gre-sit-don-t-generate-link-local-addr-if-addr_gen_m.patch
-net-dsa-lantiq_gswip-serialize-access-to-the-pce-tab.patch
 arm-9136-1-armv7-m-uses-be-8-not-be-32.patch
 vrf-run-conntrack-only-in-context-of-lower-physdev-f.patch
 net-annotate-data-race-in-neigh_output.patch