rockchip: disable vlan hw filter for nanopi r6s
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
a3b7cd0483
commit
07e476cac8
@ -189,6 +189,7 @@
|
||||
&gmac1_rx_bus2
|
||||
&gmac1_rgmii_clk
|
||||
&gmac1_rgmii_bus>;
|
||||
snps,no-vlhash;
|
||||
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
From 32230f9e59438899c949a4bab178a8f10f17b903 Mon Sep 17 00:00:00 2001
|
||||
From: jensen <jensenhuang@friendlyarm.com>
|
||||
Date: Thu, 17 Nov 2022 18:35:43 +0800
|
||||
Subject: [PATCH] ethernet: stmmac: Add property to disable VLAN hw filter
|
||||
|
||||
Since adding VLAN in promisc mode not supported, which makes unable to
|
||||
setup bridge, add a configurable option to disable it.
|
||||
|
||||
Signed-off-by: jensen <jensenhuang@friendlyarm.com>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
|
||||
include/linux/stmmac.h | 1 +
|
||||
3 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -7528,7 +7528,7 @@ int stmmac_dvr_probe(struct device *devi
|
||||
#ifdef STMMAC_VLAN_TAG_USED
|
||||
/* Both mac100 and gmac support receive VLAN tag detection */
|
||||
ndev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX;
|
||||
- if (priv->dma_cap.vlhash) {
|
||||
+ if (priv->plat->vlhash_en && priv->dma_cap.vlhash) {
|
||||
ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||
ndev->features |= NETIF_F_HW_VLAN_STAG_FILTER;
|
||||
}
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
@@ -570,6 +570,9 @@ stmmac_probe_config_dt(struct platform_d
|
||||
"force_sf_dma_mode is ignored if force_thresh_dma_mode is set.\n");
|
||||
}
|
||||
|
||||
+ /* To disable VLAN tag filter */
|
||||
+ plat->vlhash_en = !of_property_read_bool(np, "snps,no-vlhash");
|
||||
+
|
||||
of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed);
|
||||
|
||||
plat->axi = stmmac_axi_setup(pdev);
|
||||
--- a/include/linux/stmmac.h
|
||||
+++ b/include/linux/stmmac.h
|
||||
@@ -300,6 +300,7 @@ struct plat_stmmacenet_data {
|
||||
int rss_en;
|
||||
int mac_port_sel_speed;
|
||||
int has_xgmac;
|
||||
+ bool vlhash_en;
|
||||
u8 vlan_fail_q;
|
||||
unsigned int eee_usecs_rate;
|
||||
struct pci_dev *pdev;
|
||||
@ -8,7 +8,7 @@
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -5413,6 +5414,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5409,6 +5410,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
int jumbo_max, region, rc;
|
||||
enum mac_version chipset;
|
||||
struct net_device *dev;
|
||||
@ -16,7 +16,7 @@
|
||||
u32 txconfig;
|
||||
u16 xid;
|
||||
|
||||
@@ -5420,6 +5422,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5416,6 +5418,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user