Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 42 ++++++++++---------
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 42 ++++++++++++----------
2 files changed, 26 insertions(+), 19 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index d423ee979bd09..30064e4a33938 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6613,6 +6613,9 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
+@@ -6578,6 +6578,9 @@ static int stmmac_vlan_update(struct stm
hash = 0;
}
return stmmac_update_vlan_hash(priv, priv->hw, hash, pmatch, is_double);
}
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index fcc34867405ed..e24efe3bfedbe 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -76,7 +76,9 @@ static int vlan_add_hw_rx_fltr(struct net_device *dev,
+@@ -76,7 +76,9 @@ static int vlan_add_hw_rx_fltr(struct ne
}
hw->vlan_filter[0] = vid;
return 0;
}
-@@ -97,12 +99,15 @@ static int vlan_add_hw_rx_fltr(struct net_device *dev,
+@@ -97,12 +99,15 @@ static int vlan_add_hw_rx_fltr(struct ne
return -EPERM;
}
}
static int vlan_del_hw_rx_fltr(struct net_device *dev,
-@@ -115,7 +120,9 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -115,7 +120,9 @@ static int vlan_del_hw_rx_fltr(struct ne
if (hw->num_vlan == 1) {
if ((hw->vlan_filter[0] & VLAN_TAG_VID) == vid) {
hw->vlan_filter[0] = 0;
}
return 0;
}
-@@ -124,22 +131,23 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -124,22 +131,23 @@ static int vlan_del_hw_rx_fltr(struct ne
for (i = 0; i < hw->num_vlan; i++) {
if ((hw->vlan_filter[i] & VLAN_TAG_DATA_VEN) &&
((hw->vlan_filter[i] & VLAN_TAG_DATA_VID) == vid)) {
int i;
/* Single Rx VLAN Filter */
-@@ -149,12 +157,8 @@ static void vlan_restore_hw_rx_fltr(struct net_device *dev,
+@@ -149,12 +157,8 @@ static void vlan_restore_hw_rx_fltr(stru
}
/* Extended Rx VLAN Filter Enable */
}
static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
---
-2.51.0
-
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++----
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index 46299b7925b44..769342e4bafa1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6638,9 +6638,13 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6603,9 +6603,13 @@ static int stmmac_vlan_rx_add_vid(struct
if (priv->hw->num_vlan) {
ret = stmmac_add_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
err_pm_put:
pm_runtime_put(priv->device);
-@@ -6664,15 +6668,21 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6629,15 +6633,21 @@ static int stmmac_vlan_rx_kill_vid(struc
is_double = true;
clear_bit(vid, priv->active_vlans);
del_vlan_error:
pm_runtime_put(priv->device);
---
-2.51.0
-
Stable-dep-of: 2cd70e3968f5 ("net: stmmac: Defer VLAN HW configuration when interface is down")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 24 +++++++++++++++++--
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 10 --------
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 24 ++++++++++++++++++++--
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 10 ---------
2 files changed, 22 insertions(+), 12 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index 6bebc57e6ae7c..d423ee979bd09 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -139,6 +139,7 @@ static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
+@@ -139,6 +139,7 @@ static void stmmac_tx_timer_arm(struct s
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
static void stmmac_set_dma_operation_mode(struct stmmac_priv *priv, u32 txmode,
u32 rxmode, u32 chan);
#ifdef CONFIG_DEBUG_FS
static const struct net_device_ops stmmac_netdev_ops;
-@@ -3967,6 +3968,8 @@ static int __stmmac_open(struct net_device *dev,
+@@ -3932,6 +3933,8 @@ static int __stmmac_open(struct net_devi
/* We may have called phylink_speed_down before */
phylink_speed_up(priv->phylink);
ret = stmmac_request_irq(dev);
if (ret)
goto irq_error;
-@@ -6697,6 +6700,23 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6662,6 +6665,23 @@ del_vlan_error:
return ret;
}
static int stmmac_bpf(struct net_device *dev, struct netdev_bpf *bpf)
{
struct stmmac_priv *priv = netdev_priv(dev);
-@@ -7931,10 +7951,10 @@ int stmmac_resume(struct device *dev)
+@@ -7895,10 +7915,10 @@ int stmmac_resume(struct device *dev)
stmmac_init_coalesce(priv);
phylink_rx_clk_stop_block(priv->phylink);
stmmac_set_rx_mode(ndev);
stmmac_enable_all_queues(priv);
stmmac_enable_all_dma_irq(priv);
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index de1a70e1c86ef..fcc34867405ed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -139,9 +139,6 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -139,9 +139,6 @@ static int vlan_del_hw_rx_fltr(struct ne
static void vlan_restore_hw_rx_fltr(struct net_device *dev,
struct mac_device_info *hw)
{
u32 val;
int i;
-@@ -158,13 +155,6 @@ static void vlan_restore_hw_rx_fltr(struct net_device *dev,
+@@ -158,13 +155,6 @@ static void vlan_restore_hw_rx_fltr(stru
vlan_write_filter(dev, hw, i, val);
}
}
}
static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
---
-2.51.0
-
Stable-dep-of: 2cd70e3968f5 ("net: stmmac: Defer VLAN HW configuration when interface is down")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++----
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 8 ++++++++
+ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++----
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 8 ++++++++
3 files changed, 21 insertions(+), 4 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
-index 7ca5477be390b..81706f175d330 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
-@@ -318,6 +318,7 @@ struct stmmac_priv {
+@@ -316,6 +316,7 @@ struct stmmac_priv {
void __iomem *ptpaddr;
void __iomem *estaddr;
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
int sfty_irq;
int sfty_ce_irq;
int sfty_ue_irq;
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index 769342e4bafa1..6bebc57e6ae7c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6619,6 +6619,7 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
+@@ -6584,6 +6584,7 @@ static int stmmac_vlan_update(struct stm
static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid)
{
struct stmmac_priv *priv = netdev_priv(ndev);
bool is_double = false;
int ret;
-@@ -6630,7 +6631,8 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6595,7 +6596,8 @@ static int stmmac_vlan_rx_add_vid(struct
is_double = true;
set_bit(vid, priv->active_vlans);
if (ret) {
clear_bit(vid, priv->active_vlans);
goto err_pm_put;
-@@ -6640,11 +6642,13 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6605,11 +6607,13 @@ static int stmmac_vlan_rx_add_vid(struct
ret = stmmac_add_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
if (ret) {
clear_bit(vid, priv->active_vlans);
err_pm_put:
pm_runtime_put(priv->device);
-@@ -6657,6 +6661,7 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6622,6 +6626,7 @@ err_pm_put:
static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vid)
{
struct stmmac_priv *priv = netdev_priv(ndev);
bool is_double = false;
int ret;
-@@ -6668,7 +6673,8 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6633,7 +6638,8 @@ static int stmmac_vlan_rx_kill_vid(struc
is_double = true;
clear_bit(vid, priv->active_vlans);
if (ret) {
set_bit(vid, priv->active_vlans);
goto del_vlan_error;
-@@ -6678,11 +6684,13 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6643,11 +6649,13 @@ static int stmmac_vlan_rx_kill_vid(struc
ret = stmmac_del_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
if (ret) {
set_bit(vid, priv->active_vlans);
del_vlan_error:
pm_runtime_put(priv->device);
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index b18404dd5a8be..de1a70e1c86ef 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -183,6 +183,10 @@ static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
+@@ -183,6 +183,10 @@ static void vlan_update_hash(struct mac_
value |= VLAN_EDVLP;
value |= VLAN_ESVL;
value |= VLAN_DOVLTC;
}
writel(value, ioaddr + VLAN_TAG);
-@@ -193,6 +197,10 @@ static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
+@@ -193,6 +197,10 @@ static void vlan_update_hash(struct mac_
value |= VLAN_EDVLP;
value |= VLAN_ESVL;
value |= VLAN_DOVLTC;
}
writel(value | perfect_match, ioaddr + VLAN_TAG);
---
-2.51.0
-
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 42 ++++++++++---------
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 42 ++++++++++++----------
2 files changed, 26 insertions(+), 19 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index 293efccb5d312..a76b2acffde5a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6756,6 +6756,9 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
+@@ -6721,6 +6721,9 @@ static int stmmac_vlan_update(struct stm
hash = 0;
}
return stmmac_update_vlan_hash(priv, priv->hw, hash, pmatch, is_double);
}
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index fcc34867405ed..e24efe3bfedbe 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -76,7 +76,9 @@ static int vlan_add_hw_rx_fltr(struct net_device *dev,
+@@ -76,7 +76,9 @@ static int vlan_add_hw_rx_fltr(struct ne
}
hw->vlan_filter[0] = vid;
return 0;
}
-@@ -97,12 +99,15 @@ static int vlan_add_hw_rx_fltr(struct net_device *dev,
+@@ -97,12 +99,15 @@ static int vlan_add_hw_rx_fltr(struct ne
return -EPERM;
}
}
static int vlan_del_hw_rx_fltr(struct net_device *dev,
-@@ -115,7 +120,9 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -115,7 +120,9 @@ static int vlan_del_hw_rx_fltr(struct ne
if (hw->num_vlan == 1) {
if ((hw->vlan_filter[0] & VLAN_TAG_VID) == vid) {
hw->vlan_filter[0] = 0;
}
return 0;
}
-@@ -124,22 +131,23 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -124,22 +131,23 @@ static int vlan_del_hw_rx_fltr(struct ne
for (i = 0; i < hw->num_vlan; i++) {
if ((hw->vlan_filter[i] & VLAN_TAG_DATA_VEN) &&
((hw->vlan_filter[i] & VLAN_TAG_DATA_VID) == vid)) {
int i;
/* Single Rx VLAN Filter */
-@@ -149,12 +157,8 @@ static void vlan_restore_hw_rx_fltr(struct net_device *dev,
+@@ -149,12 +157,8 @@ static void vlan_restore_hw_rx_fltr(stru
}
/* Extended Rx VLAN Filter Enable */
}
static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
---
-2.51.0
-
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++----
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index f98fd254315f6..74dc64c5156e9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6781,9 +6781,13 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6746,9 +6746,13 @@ static int stmmac_vlan_rx_add_vid(struct
if (priv->hw->num_vlan) {
ret = stmmac_add_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
err_pm_put:
pm_runtime_put(priv->device);
-@@ -6807,15 +6811,21 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6772,15 +6776,21 @@ static int stmmac_vlan_rx_kill_vid(struc
is_double = true;
clear_bit(vid, priv->active_vlans);
del_vlan_error:
pm_runtime_put(priv->device);
---
-2.51.0
-
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 24 +++++++++++++++++--
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 10 --------
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 24 ++++++++++++++++++++--
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 10 ---------
2 files changed, 22 insertions(+), 12 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index a21c34d23681c..293efccb5d312 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -140,6 +140,7 @@ static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
+@@ -140,6 +140,7 @@ static void stmmac_tx_timer_arm(struct s
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
static void stmmac_set_dma_operation_mode(struct stmmac_priv *priv, u32 txmode,
u32 rxmode, u32 chan);
#ifdef CONFIG_DEBUG_FS
static const struct net_device_ops stmmac_netdev_ops;
-@@ -4099,6 +4100,8 @@ static int __stmmac_open(struct net_device *dev,
+@@ -4064,6 +4065,8 @@ static int __stmmac_open(struct net_devi
phylink_start(priv->phylink);
ret = stmmac_request_irq(dev);
if (ret)
goto irq_error;
-@@ -6840,6 +6843,23 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6805,6 +6808,23 @@ del_vlan_error:
return ret;
}
static int stmmac_bpf(struct net_device *dev, struct netdev_bpf *bpf)
{
struct stmmac_priv *priv = netdev_priv(dev);
-@@ -8233,10 +8253,10 @@ int stmmac_resume(struct device *dev)
+@@ -8197,10 +8217,10 @@ int stmmac_resume(struct device *dev)
stmmac_init_coalesce(priv);
phylink_rx_clk_stop_block(priv->phylink);
stmmac_set_rx_mode(ndev);
stmmac_enable_all_queues(priv);
stmmac_enable_all_dma_irq(priv);
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index de1a70e1c86ef..fcc34867405ed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -139,9 +139,6 @@ static int vlan_del_hw_rx_fltr(struct net_device *dev,
+@@ -139,9 +139,6 @@ static int vlan_del_hw_rx_fltr(struct ne
static void vlan_restore_hw_rx_fltr(struct net_device *dev,
struct mac_device_info *hw)
{
u32 val;
int i;
-@@ -158,13 +155,6 @@ static void vlan_restore_hw_rx_fltr(struct net_device *dev,
+@@ -158,13 +155,6 @@ static void vlan_restore_hw_rx_fltr(stru
vlan_write_filter(dev, hw, i, val);
}
}
}
static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
---
-2.51.0
-
Stable-dep-of: bd7ad51253a7 ("net: stmmac: Fix VLAN HW state restore")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++----
- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 8 ++++++++
+ drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++----
+ drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 8 ++++++++
3 files changed, 21 insertions(+), 4 deletions(-)
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
-index 012b0a477255d..a2e838688118b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
-@@ -324,6 +324,7 @@ struct stmmac_priv {
+@@ -322,6 +322,7 @@ struct stmmac_priv {
void __iomem *ptpaddr;
void __iomem *estaddr;
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
int sfty_irq;
int sfty_ce_irq;
int sfty_ue_irq;
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-index 74dc64c5156e9..a21c34d23681c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -6762,6 +6762,7 @@ static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
+@@ -6727,6 +6727,7 @@ static int stmmac_vlan_update(struct stm
static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid)
{
struct stmmac_priv *priv = netdev_priv(ndev);
bool is_double = false;
int ret;
-@@ -6773,7 +6774,8 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6738,7 +6739,8 @@ static int stmmac_vlan_rx_add_vid(struct
is_double = true;
set_bit(vid, priv->active_vlans);
if (ret) {
clear_bit(vid, priv->active_vlans);
goto err_pm_put;
-@@ -6783,11 +6785,13 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6748,11 +6750,13 @@ static int stmmac_vlan_rx_add_vid(struct
ret = stmmac_add_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
if (ret) {
clear_bit(vid, priv->active_vlans);
err_pm_put:
pm_runtime_put(priv->device);
-@@ -6800,6 +6804,7 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
+@@ -6765,6 +6769,7 @@ err_pm_put:
static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vid)
{
struct stmmac_priv *priv = netdev_priv(ndev);
bool is_double = false;
int ret;
-@@ -6811,7 +6816,8 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6776,7 +6781,8 @@ static int stmmac_vlan_rx_kill_vid(struc
is_double = true;
clear_bit(vid, priv->active_vlans);
if (ret) {
set_bit(vid, priv->active_vlans);
goto del_vlan_error;
-@@ -6821,11 +6827,13 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
+@@ -6786,11 +6792,13 @@ static int stmmac_vlan_rx_kill_vid(struc
ret = stmmac_del_hw_vlan_rx_fltr(priv, ndev, priv->hw, proto, vid);
if (ret) {
set_bit(vid, priv->active_vlans);
del_vlan_error:
pm_runtime_put(priv->device);
-diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-index b18404dd5a8be..de1a70e1c86ef 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
-@@ -183,6 +183,10 @@ static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
+@@ -183,6 +183,10 @@ static void vlan_update_hash(struct mac_
value |= VLAN_EDVLP;
value |= VLAN_ESVL;
value |= VLAN_DOVLTC;
}
writel(value, ioaddr + VLAN_TAG);
-@@ -193,6 +197,10 @@ static void vlan_update_hash(struct mac_device_info *hw, u32 hash,
+@@ -193,6 +197,10 @@ static void vlan_update_hash(struct mac_
value |= VLAN_EDVLP;
value |= VLAN_ESVL;
value |= VLAN_DOVLTC;
}
writel(value | perfect_match, ioaddr + VLAN_TAG);
---
-2.51.0
-