mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-06 04:34:00 -05:00
generic: 6.12: backport b53 fixes for BCM5325
Replace pending b53 fixes patches with the accepted ones from net-next for linux v6.19. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
6c94b53f11
commit
4814636b9b
@ -58,7 +58,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
+ the phy interface, but actually requires internal delays enabled.
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1434,6 +1434,16 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
@@ -1444,6 +1444,16 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
else
|
||||
off = B53_RGMII_CTRL_P(port);
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
/* Configure the port RGMII clock delay by DLL disabled and
|
||||
* tx_clk aligned timing (restoring to reset defaults)
|
||||
*/
|
||||
@@ -1445,19 +1455,24 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
@@ -1455,19 +1465,24 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
* account for this internal delay that is inserted, otherwise
|
||||
* the switch won't be able to receive correctly.
|
||||
*
|
||||
|
||||
@ -1,13 +1,20 @@
|
||||
From 36ee43df98b0ac16bb73e62fa8cffcdf710c37e4 Mon Sep 17 00:00:00 2001
|
||||
From 6f268e275c74dae0536e0b61982a8db25bcf4f16 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:44 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:19 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since BCM5325 and BCM5365 only support up to 256 VLANs, the VLAN_ID_IDX
|
||||
register is only 8 bit wide, not 16 bit, so use an appropriate accessor.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-2-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
@ -1,7 +1,10 @@
|
||||
From 2bed2d0932c37d6cae9a745613c2e8f83649ed39 Mon Sep 17 00:00:00 2001
|
||||
From 9316012dd01952f75e37035360138ccc786ef727 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:45 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:20 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix extracting VID from entry for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
BCM5325/65's Entry register uses the highest three bits for
|
||||
VALID/STATIC/AGE, so shifting by 53 only will add these to
|
||||
@ -10,7 +13,11 @@ b53_arl_entry::vid.
|
||||
So make sure to mask the vid value as well, to not get invalid VIDs.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-3-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_priv.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
@ -1,14 +1,21 @@
|
||||
From 8d2f3f0e87fe526686f7a2744bf965ce4e99ae41 Mon Sep 17 00:00:00 2001
|
||||
From 8e46aacea4264bcb8d4265fb07577afff58ae78d Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:46 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:21 +0100
|
||||
Subject: [PATCH] net: dsa: b53: use same ARL search result offset for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
BCM5365's search result is at the same offset as BCM5325's search
|
||||
result, and they (mostly) share the same format, so switch BCM5365 to
|
||||
BCM5325's arl ops.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-4-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 18 +-----------------
|
||||
drivers/net/dsa/b53/b53_regs.h | 4 +---
|
||||
@ -1,6 +1,6 @@
|
||||
From d0d7daf6e051f8795e4e1b759ff5055c80a85832 Mon Sep 17 00:00:00 2001
|
||||
From 85132103f700b1340fc17df8a981509d17bf4872 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:47 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:22 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix CPU port unicast ARL entries for BCM5325/65
|
||||
|
||||
On BCM5325 and BCM5365, unicast ARL entries use 8 as the value for the
|
||||
@ -9,6 +9,9 @@ at most other places.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-5-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_priv.h | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
@ -27,7 +30,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
u64_to_ether_addr(mac_vid, ent->mac);
|
||||
+ ent->port = (mac_vid >> ARLTBL_DATA_PORT_ID_S_25) &
|
||||
+ ARLTBL_DATA_PORT_ID_MASK_25;
|
||||
+ if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
+ if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
+ ent->port = B53_CPU_PORT_25;
|
||||
ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
}
|
||||
@ -38,7 +41,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
*mac_vid = ether_addr_to_u64(ent->mac);
|
||||
- *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
- ARLTBL_DATA_PORT_ID_S_25;
|
||||
+ if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
+ if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
+ *mac_vid |= (u64)B53_CPU_PORT << ARLTBL_DATA_PORT_ID_S_25;
|
||||
+ else
|
||||
+ *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
@ -1,6 +1,6 @@
|
||||
From 0a215e4d8da0c5e36ee29304879a111daff5b461 Mon Sep 17 00:00:00 2001
|
||||
From 3b08863469aa6028ac7c3120966f4e2f6051cf6b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:48 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:23 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks
|
||||
|
||||
We currently use the mask 0xf for writing and reading b53_entry::port,
|
||||
@ -20,7 +20,10 @@ contained in the Search Result Extension register. So create a separate
|
||||
search result parse function that properly handles this.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-6-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 4 +++-
|
||||
drivers/net/dsa/b53/b53_priv.h | 25 +++++++++++++++++++++----
|
||||
@ -53,11 +56,11 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
- ARLTBL_DATA_PORT_ID_MASK_25;
|
||||
+ ent->port = (mac_vid & ARLTBL_DATA_PORT_ID_MASK_25) >>
|
||||
+ ARLTBL_DATA_PORT_ID_S_25;
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
ent->port = B53_CPU_PORT_25;
|
||||
ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
@@ -388,8 +388,8 @@ static inline void b53_arl_from_entry_25
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
*mac_vid |= (u64)B53_CPU_PORT << ARLTBL_DATA_PORT_ID_S_25;
|
||||
else
|
||||
- *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
@ -1,6 +1,6 @@
|
||||
From d41f2d5f1c9c6d492ccd3ffdd09e064e70ebc934 Mon Sep 17 00:00:00 2001
|
||||
From d39514e6a2d14f57830d649e2bf03b49612c2f73 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:49 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:24 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix BCM5325/65 ARL entry VIDs
|
||||
|
||||
BCM5325/65's ARL entry registers do not contain the VID, only the search
|
||||
@ -12,6 +12,9 @@ move the VLAN ID field definition to the search register definition.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-7-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 9 +++++++--
|
||||
drivers/net/dsa/b53/b53_priv.h | 12 ++++++------
|
||||
@ -60,7 +63,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
ent->is_valid = !!(mac_vid & ARLTBL_VALID_25);
|
||||
@@ -352,7 +352,7 @@ static inline void b53_arl_to_entry_25(s
|
||||
ARLTBL_DATA_PORT_ID_S_25;
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
ent->port = B53_CPU_PORT_25;
|
||||
- ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
+ ent->vid = vid_entry;
|
||||
@ -0,0 +1,44 @@
|
||||
From 0b2b27058692d437b12d3f2a3bf0fa699af7376e Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Fri, 28 Nov 2025 09:06:25 +0100
|
||||
Subject: [PATCH] net: dsa: b53: allow VID 0 for BCM5325/65
|
||||
|
||||
Now that writing ARL entries works properly, we can actually use VID 0
|
||||
as the default untagged VLAN for BCM5325 and BCM5365 as well.
|
||||
|
||||
So use 0 as default PVID for all chips and do not reject VLAN 0 anymore,
|
||||
which we ignored since commit 45e9d59d3950 ("net: dsa: b53: do not allow
|
||||
to configure VLAN 0") anyway.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-8-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -852,10 +852,7 @@ static void b53_enable_stp(struct b53_de
|
||||
|
||||
static u16 b53_default_pvid(struct b53_device *dev)
|
||||
{
|
||||
- if (is5325(dev) || is5365(dev))
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
|
||||
@@ -1679,9 +1676,6 @@ static int b53_vlan_prepare(struct dsa_s
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
|
||||
- if ((is5325(dev) || is5365(dev)) && vlan->vid == 0)
|
||||
- return -EOPNOTSUPP;
|
||||
-
|
||||
/* Port 7 on 7278 connects to the ASP's UniMAC which is not capable of
|
||||
* receiving VLAN tagged frames at all, we can still allow the port to
|
||||
* be configured for egress untagged.
|
||||
@ -1,175 +0,0 @@
|
||||
From b5a97c36457e4299afdb420603d39d1e30da843e Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:50 +0100
|
||||
Subject: [PATCH] net: dsa: b53: allow VID 0 for BCM5325/65
|
||||
|
||||
Now that writing ARL entries works properly, we can actually use VID 0
|
||||
as the default untagged VLAN for BCM5325 and BCM5365 as well, so use 0
|
||||
as default PVID always.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 49 +++++++++++---------------------
|
||||
1 file changed, 17 insertions(+), 32 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -850,14 +850,6 @@ static void b53_enable_stp(struct b53_de
|
||||
b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
|
||||
}
|
||||
|
||||
-static u16 b53_default_pvid(struct b53_device *dev)
|
||||
-{
|
||||
- if (is5325(dev) || is5365(dev))
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
@@ -886,14 +878,12 @@ int b53_configure_vlan(struct dsa_switch
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan vl = { 0 };
|
||||
struct b53_vlan *v;
|
||||
- int i, def_vid;
|
||||
u16 vid;
|
||||
-
|
||||
- def_vid = b53_default_pvid(dev);
|
||||
+ int i;
|
||||
|
||||
/* clear all vlan entries */
|
||||
if (is5325(dev) || is5365(dev)) {
|
||||
- for (i = def_vid; i < dev->num_vlans; i++)
|
||||
+ for (i = 0; i < dev->num_vlans; i++)
|
||||
b53_set_vlan_entry(dev, i, &vl);
|
||||
} else {
|
||||
b53_do_vlan_op(dev, VTA_CMD_CLEAR);
|
||||
@@ -907,7 +897,7 @@ int b53_configure_vlan(struct dsa_switch
|
||||
* entry. Do this only when the tagging protocol is not
|
||||
* DSA_TAG_PROTO_NONE
|
||||
*/
|
||||
- v = &dev->vlans[def_vid];
|
||||
+ v = &dev->vlans[0];
|
||||
b53_for_each_port(dev, i) {
|
||||
if (!b53_vlan_port_may_join_untagged(ds, i))
|
||||
continue;
|
||||
@@ -915,16 +905,15 @@ int b53_configure_vlan(struct dsa_switch
|
||||
vl.members |= BIT(i);
|
||||
if (!b53_vlan_port_needs_forced_tagged(ds, i))
|
||||
vl.untag = vl.members;
|
||||
- b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(i),
|
||||
- def_vid);
|
||||
+ b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(i), 0);
|
||||
}
|
||||
- b53_set_vlan_entry(dev, def_vid, &vl);
|
||||
+ b53_set_vlan_entry(dev, 0, &vl);
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Upon initial call we have not set-up any VLANs, but upon
|
||||
* system resume, we need to restore all VLAN entries.
|
||||
*/
|
||||
- for (vid = def_vid + 1; vid < dev->num_vlans; vid++) {
|
||||
+ for (vid = 1; vid < dev->num_vlans; vid++) {
|
||||
v = &dev->vlans[vid];
|
||||
|
||||
if (!v->members)
|
||||
@@ -1260,7 +1249,6 @@ static int b53_setup(struct dsa_switch *
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan *vl;
|
||||
unsigned int port;
|
||||
- u16 pvid;
|
||||
int ret;
|
||||
|
||||
/* Request bridge PVID untagged when DSA_TAG_PROTO_NONE is set
|
||||
@@ -1290,8 +1278,7 @@ static int b53_setup(struct dsa_switch *
|
||||
}
|
||||
|
||||
/* setup default vlan for filtering mode */
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
b53_for_each_port(dev, port) {
|
||||
vl->members |= BIT(port);
|
||||
if (!b53_vlan_port_needs_forced_tagged(ds, port))
|
||||
@@ -1720,7 +1707,7 @@ int b53_vlan_add(struct dsa_switch *ds,
|
||||
if (pvid)
|
||||
new_pvid = vlan->vid;
|
||||
else if (!pvid && vlan->vid == old_pvid)
|
||||
- new_pvid = b53_default_pvid(dev);
|
||||
+ new_pvid = 0;
|
||||
else
|
||||
new_pvid = old_pvid;
|
||||
dev->ports[port].pvid = new_pvid;
|
||||
@@ -1770,7 +1757,7 @@ int b53_vlan_del(struct dsa_switch *ds,
|
||||
vl->members &= ~BIT(port);
|
||||
|
||||
if (pvid == vlan->vid)
|
||||
- pvid = b53_default_pvid(dev);
|
||||
+ pvid = 0;
|
||||
dev->ports[port].pvid = pvid;
|
||||
|
||||
if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
|
||||
@@ -2249,7 +2236,7 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan *vl;
|
||||
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
- u16 pvlan, reg, pvid;
|
||||
+ u16 pvlan, reg;
|
||||
unsigned int i;
|
||||
|
||||
/* On 7278, port 7 which connects to the ASP should only receive
|
||||
@@ -2258,8 +2245,7 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
if (dev->chip_id == BCM7278_DEVICE_ID && port == 7)
|
||||
return -EINVAL;
|
||||
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Make this port leave the all VLANs join since we will have
|
||||
@@ -2275,9 +2261,9 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
reg);
|
||||
}
|
||||
|
||||
- b53_get_vlan_entry(dev, pvid, vl);
|
||||
+ b53_get_vlan_entry(dev, 0, vl);
|
||||
vl->members &= ~BIT(port);
|
||||
- b53_set_vlan_entry(dev, pvid, vl);
|
||||
+ b53_set_vlan_entry(dev, 0, vl);
|
||||
}
|
||||
|
||||
b53_read16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), &pvlan);
|
||||
@@ -2316,7 +2302,7 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
struct b53_vlan *vl;
|
||||
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
unsigned int i;
|
||||
- u16 pvlan, reg, pvid;
|
||||
+ u16 pvlan, reg;
|
||||
|
||||
b53_read16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), &pvlan);
|
||||
|
||||
@@ -2341,8 +2327,7 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
|
||||
dev->ports[port].vlan_ctl_mask = pvlan;
|
||||
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Make this port join all VLANs without VLAN entries */
|
||||
@@ -2354,9 +2339,9 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
b53_write16(dev, B53_VLAN_PAGE, B53_JOIN_ALL_VLAN_EN, reg);
|
||||
}
|
||||
|
||||
- b53_get_vlan_entry(dev, pvid, vl);
|
||||
+ b53_get_vlan_entry(dev, 0, vl);
|
||||
vl->members |= BIT(port);
|
||||
- b53_set_vlan_entry(dev, pvid, vl);
|
||||
+ b53_set_vlan_entry(dev, 0, vl);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(b53_br_leave);
|
||||
Loading…
Reference in New Issue
Block a user