mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
kernel: bump 5.10 to 5.10.68
Deleted (upstreamed): generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch generic/backport-5.10/792-v5.15-0001-net-dsa-b53-Fix-calculating-number-of-switch-ports.patch generic/backport-5.10/792-v5.15-0002-net-dsa-b53-Set-correct-number-of-ports-in-the-DSA-s.patch generic/backport-5.10/792-v5.15-0003-net-dsa-b53-Fix-IMP-port-setup-on-BCM5301x.patch generic/backport-5.10/840-0001-PCI-of-Don-t-fail-devm_pci_alloc_host_bridge-on-miss.patch generic/backport-5.10/840-0002-PCI-iproc-Fix-BCMA-probe-resource-handling.patch generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
This commit is contained in:
parent
6e7fadb0c7
commit
9664b41c05
@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .145
|
||||
LINUX_VERSION-5.10 = .67
|
||||
LINUX_VERSION-5.10 = .68
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.145 = 5cf7782ec2e91417edf0d5e6555da6d556962c8985e33ba9e7dadba5cbdc68f9
|
||||
LINUX_KERNEL_HASH-5.10.67 = 8c5740aa782593b8fabf9b71c2800182d4fe965adabd3595634113d48cb98a82
|
||||
LINUX_KERNEL_HASH-5.10.68 = 1baa830e3d359464e3762c30b96c1ba450a34d97834a57e455618c99de229421
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
@ -1,44 +0,0 @@
|
||||
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
|
||||
Date: Tue, 23 Mar 2021 00:56:20 +0100
|
||||
Subject: [PATCH] netfilter: Fix fall-through warnings for Clang
|
||||
|
||||
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
|
||||
warnings by explicitly adding multiple break statements instead of just
|
||||
letting the code fall through to the next case.
|
||||
|
||||
Link: https://github.com/KSPP/linux/issues/115
|
||||
Acked-by: Florian Westphal <fw@strlen.de>
|
||||
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
---
|
||||
|
||||
--- a/net/netfilter/nf_conntrack_proto_dccp.c
|
||||
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
|
||||
@@ -397,6 +397,7 @@ dccp_new(struct nf_conn *ct, const struc
|
||||
msg = "not picking up existing connection ";
|
||||
goto out_invalid;
|
||||
}
|
||||
+ break;
|
||||
case CT_DCCP_REQUEST:
|
||||
break;
|
||||
case CT_DCCP_INVALID:
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -8394,6 +8394,7 @@ static int nf_tables_check_loops(const s
|
||||
data->verdict.chain);
|
||||
if (err < 0)
|
||||
return err;
|
||||
+ break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
--- a/net/netfilter/nft_ct.c
|
||||
+++ b/net/netfilter/nft_ct.c
|
||||
@@ -528,6 +528,7 @@ static void __nft_ct_set_destroy(const s
|
||||
case NFT_CT_ZONE:
|
||||
if (--nft_ct_pcpu_template_refcnt == 0)
|
||||
nft_ct_tmpl_put_pcpu();
|
||||
+ break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2114,7 +2114,9 @@ static void dsa_slave_switchdev_event_wo
|
||||
@@ -2112,7 +2112,9 @@ static void dsa_slave_switchdev_event_wo
|
||||
|
||||
err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid);
|
||||
if (err) {
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
break;
|
||||
}
|
||||
fdb_info->offloaded = true;
|
||||
@@ -2129,9 +2131,11 @@ static void dsa_slave_switchdev_event_wo
|
||||
@@ -2127,9 +2129,11 @@ static void dsa_slave_switchdev_event_wo
|
||||
|
||||
err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid);
|
||||
if (err) {
|
||||
|
@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct sk_buff * (*xmit)(struct sk_buff *skb,
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2089,76 +2089,66 @@ static int dsa_slave_netdevice_event(str
|
||||
@@ -2087,76 +2087,66 @@ static int dsa_slave_netdevice_event(str
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
/* Called under rcu_read_lock() */
|
||||
@@ -2166,7 +2156,9 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2164,7 +2154,9 @@ static int dsa_slave_switchdev_event(str
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
struct net_device *dev = switchdev_notifier_info_to_dev(ptr);
|
||||
@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
int err;
|
||||
|
||||
if (event == SWITCHDEV_PORT_ATTR_SET) {
|
||||
@@ -2179,20 +2171,32 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2177,20 +2169,32 @@ static int dsa_slave_switchdev_event(str
|
||||
if (!dsa_slave_dev_check(dev))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
dev_hold(dev);
|
||||
break;
|
||||
default:
|
||||
@@ -2202,10 +2206,6 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2200,10 +2204,6 @@ static int dsa_slave_switchdev_event(str
|
||||
|
||||
dsa_schedule_work(&switchdev_work->work);
|
||||
return NOTIFY_OK;
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2161,31 +2161,29 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2159,31 +2159,29 @@ static int dsa_slave_switchdev_event(str
|
||||
struct dsa_port *dp;
|
||||
int err;
|
||||
|
||||
@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
fdb_info = ptr;
|
||||
|
||||
if (!fdb_info->added_by_user) {
|
||||
@@ -2198,13 +2196,12 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2196,13 +2194,12 @@ static int dsa_slave_switchdev_event(str
|
||||
switchdev_work->vid = fdb_info->vid;
|
||||
|
||||
dev_hold(dev);
|
||||
|
@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2174,6 +2174,9 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2172,6 +2172,9 @@ static int dsa_slave_switchdev_event(str
|
||||
|
||||
dp = dsa_slave_to_port(dev);
|
||||
|
||||
|
@ -170,7 +170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
*/
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2151,6 +2151,28 @@ static void dsa_slave_switchdev_event_wo
|
||||
@@ -2149,6 +2149,28 @@ static void dsa_slave_switchdev_event_wo
|
||||
dev_put(dp->slave);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
/* Called under rcu_read_lock() */
|
||||
static int dsa_slave_switchdev_event(struct notifier_block *unused,
|
||||
unsigned long event, void *ptr)
|
||||
@@ -2169,10 +2191,37 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2167,10 +2189,37 @@ static int dsa_slave_switchdev_event(str
|
||||
return notifier_from_errno(err);
|
||||
case SWITCHDEV_FDB_ADD_TO_DEVICE:
|
||||
case SWITCHDEV_FDB_DEL_TO_DEVICE:
|
||||
@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
if (!dp->ds->ops->port_fdb_add || !dp->ds->ops->port_fdb_del)
|
||||
return NOTIFY_DONE;
|
||||
@@ -2187,18 +2236,13 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2185,18 +2234,13 @@ static int dsa_slave_switchdev_event(str
|
||||
switchdev_work->port = dp->index;
|
||||
switchdev_work->event = event;
|
||||
|
||||
|
@ -1047,7 +1047,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
"no valid MAC address supplied, using a random one\n");
|
||||
--- a/drivers/net/ethernet/renesas/sh_eth.c
|
||||
+++ b/drivers/net/ethernet/renesas/sh_eth.c
|
||||
@@ -3144,7 +3144,6 @@ static struct sh_eth_plat_data *sh_eth_p
|
||||
@@ -3145,7 +3145,6 @@ static struct sh_eth_plat_data *sh_eth_p
|
||||
struct device_node *np = dev->of_node;
|
||||
struct sh_eth_plat_data *pdata;
|
||||
phy_interface_t interface;
|
||||
@ -1055,7 +1055,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int ret;
|
||||
|
||||
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
|
||||
@@ -3156,9 +3155,7 @@ static struct sh_eth_plat_data *sh_eth_p
|
||||
@@ -3157,9 +3156,7 @@ static struct sh_eth_plat_data *sh_eth_p
|
||||
return NULL;
|
||||
pdata->phy_interface = interface;
|
||||
|
||||
@ -1902,7 +1902,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
break;
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -1857,7 +1857,7 @@ int dsa_slave_create(struct dsa_port *po
|
||||
@@ -1855,7 +1855,7 @@ int dsa_slave_create(struct dsa_port *po
|
||||
slave_dev->hw_features |= NETIF_F_HW_TC;
|
||||
slave_dev->features |= NETIF_F_LLTX;
|
||||
slave_dev->ethtool_ops = &dsa_slave_ethtool_ops;
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_priv.h
|
||||
+++ b/drivers/net/dsa/b53/b53_priv.h
|
||||
@@ -185,11 +185,7 @@ static inline int is531x5(struct b53_dev
|
||||
@@ -186,11 +186,7 @@ static inline int is531x5(struct b53_dev
|
||||
|
||||
static inline int is63xx(struct b53_device *dev)
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
vl->untag &= ~(BIT(port));
|
||||
|
||||
b53_set_vlan_entry(dev, vid, vl);
|
||||
@@ -2623,7 +2635,6 @@ struct b53_device *b53_switch_alloc(stru
|
||||
@@ -2644,7 +2656,6 @@ struct b53_device *b53_switch_alloc(stru
|
||||
dev->ops = ops;
|
||||
ds->ops = &b53_switch_ops;
|
||||
ds->configure_vlan_while_not_filtering = true;
|
||||
|
@ -1,39 +0,0 @@
|
||||
From cdb067d31c0fe4cce98b9d15f1f2ef525acaa094 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 2 Sep 2021 10:30:50 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Fix calculating number of switch ports
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It isn't true that CPU port is always the last one. Switches BCM5301x
|
||||
have 9 ports (port 6 being inactive) and they use port 5 as CPU by
|
||||
default (depending on design some other may be CPU ports too).
|
||||
|
||||
A more reliable way of determining number of ports is to check for the
|
||||
last set bit in the "enabled_ports" bitfield.
|
||||
|
||||
This fixes b53 internal state, it will allow providing accurate info to
|
||||
the DSA and is required to fix BCM5301x support.
|
||||
|
||||
Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2584,9 +2584,8 @@ static int b53_switch_init(struct b53_de
|
||||
dev->cpu_port = 5;
|
||||
}
|
||||
|
||||
- /* cpu port is always last */
|
||||
- dev->num_ports = dev->cpu_port + 1;
|
||||
dev->enabled_ports |= BIT(dev->cpu_port);
|
||||
+ dev->num_ports = fls(dev->enabled_ports);
|
||||
|
||||
/* Include non standard CPU port built-in PHYs to be probed */
|
||||
if (is539x(dev) || is531x5(dev)) {
|
@ -1,43 +0,0 @@
|
||||
From d12e1c4649883e8ca5e8ff341e1948b3b6313259 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 2 Sep 2021 10:30:51 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Set correct number of ports in the DSA struct
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Setting DSA_MAX_PORTS caused DSA to call b53 callbacks (e.g.
|
||||
b53_disable_port() during dsa_register_switch()) for invalid
|
||||
(non-existent) ports. That made b53 modify unrelated registers and is
|
||||
one of reasons for a broken BCM5301x support.
|
||||
|
||||
This problem exists for years but DSA_MAX_PORTS usage has changed few
|
||||
times. It seems the most accurate to reference commit dropping
|
||||
dsa_switch_alloc() in the Fixes tag.
|
||||
|
||||
Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -2587,6 +2587,8 @@ static int b53_switch_init(struct b53_de
|
||||
dev->enabled_ports |= BIT(dev->cpu_port);
|
||||
dev->num_ports = fls(dev->enabled_ports);
|
||||
|
||||
+ dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS);
|
||||
+
|
||||
/* Include non standard CPU port built-in PHYs to be probed */
|
||||
if (is539x(dev) || is531x5(dev)) {
|
||||
for (i = 0; i < dev->num_ports; i++) {
|
||||
@@ -2631,7 +2633,6 @@ struct b53_device *b53_switch_alloc(stru
|
||||
return NULL;
|
||||
|
||||
ds->dev = base;
|
||||
- ds->num_ports = DSA_MAX_PORTS;
|
||||
|
||||
dev = devm_kzalloc(base, sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
@ -1,237 +0,0 @@
|
||||
From 63f8428b4077de3664eb0b252393c839b0b293ec Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sun, 5 Sep 2021 19:23:28 +0200
|
||||
Subject: [PATCH] net: dsa: b53: Fix IMP port setup on BCM5301x
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Broadcom's b53 switches have one IMP (Inband Management Port) that needs
|
||||
to be programmed using its own designed register. IMP port may be
|
||||
different than CPU port - especially on devices with multiple CPU ports.
|
||||
|
||||
For that reason it's required to explicitly note IMP port index and
|
||||
check for it when choosing a register to use.
|
||||
|
||||
This commit fixes BCM5301x support. Those switches use CPU port 5 while
|
||||
their IMP port is 8. Before this patch b53 was trying to program port 5
|
||||
with B53_PORT_OVERRIDE_CTRL instead of B53_GMII_PORT_OVERRIDE_CTRL(5).
|
||||
|
||||
It may be possible to also replace "cpu_port" usages with
|
||||
dsa_is_cpu_port() but that is out of the scope of thix BCM5301x fix.
|
||||
|
||||
Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 28 +++++++++++++++++++++++++---
|
||||
drivers/net/dsa/b53/b53_priv.h | 1 +
|
||||
2 files changed, 26 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1109,7 +1109,7 @@ static void b53_force_link(struct b53_de
|
||||
u8 reg, val, off;
|
||||
|
||||
/* Override the port settings */
|
||||
- if (port == dev->cpu_port) {
|
||||
+ if (port == dev->imp_port) {
|
||||
off = B53_PORT_OVERRIDE_CTRL;
|
||||
val = PORT_OVERRIDE_EN;
|
||||
} else {
|
||||
@@ -1133,7 +1133,7 @@ static void b53_force_port_config(struct
|
||||
u8 reg, val, off;
|
||||
|
||||
/* Override the port settings */
|
||||
- if (port == dev->cpu_port) {
|
||||
+ if (port == dev->imp_port) {
|
||||
off = B53_PORT_OVERRIDE_CTRL;
|
||||
val = PORT_OVERRIDE_EN;
|
||||
} else {
|
||||
@@ -1201,7 +1201,7 @@ static void b53_adjust_link(struct dsa_s
|
||||
b53_force_link(dev, port, phydev->link);
|
||||
|
||||
if (is531x5(dev) && phy_interface_is_rgmii(phydev)) {
|
||||
- if (port == 8)
|
||||
+ if (port == dev->imp_port)
|
||||
off = B53_RGMII_CTRL_IMP;
|
||||
else
|
||||
off = B53_RGMII_CTRL_P(port);
|
||||
@@ -2266,6 +2266,7 @@ struct b53_chip_data {
|
||||
const char *dev_name;
|
||||
u16 vlans;
|
||||
u16 enabled_ports;
|
||||
+ u8 imp_port;
|
||||
u8 cpu_port;
|
||||
u8 vta_regs[3];
|
||||
u8 arl_bins;
|
||||
@@ -2290,6 +2291,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 5,
|
||||
.cpu_port = B53_CPU_PORT_25,
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
@@ -2300,6 +2302,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 2,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 5,
|
||||
.cpu_port = B53_CPU_PORT_25,
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
},
|
||||
@@ -2310,6 +2313,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2323,6 +2327,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2336,6 +2341,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2349,6 +2355,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x7f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_9798,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2363,6 +2370,7 @@ static const struct b53_chip_data b53_sw
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
|
||||
@@ -2375,6 +2383,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0xff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2388,6 +2397,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1ff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2401,6 +2411,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0, /* pdata must provide them */
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS_63XX,
|
||||
.duplex_reg = B53_DUPLEX_STAT_63XX,
|
||||
@@ -2414,6 +2425,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2427,6 +2439,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1bf,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2440,6 +2453,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1bf,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2453,6 +2467,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2466,6 +2481,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1f,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2479,6 +2495,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1ff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2492,6 +2509,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x103,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2505,6 +2523,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1ff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 1024,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2518,6 +2537,7 @@ static const struct b53_chip_data b53_sw
|
||||
.enabled_ports = 0x1ff,
|
||||
.arl_bins = 4,
|
||||
.arl_buckets = 256,
|
||||
+ .imp_port = 8,
|
||||
.cpu_port = B53_CPU_PORT,
|
||||
.vta_regs = B53_VTA_REGS,
|
||||
.duplex_reg = B53_DUPLEX_STAT_GE,
|
||||
@@ -2543,6 +2563,7 @@ static int b53_switch_init(struct b53_de
|
||||
dev->vta_regs[1] = chip->vta_regs[1];
|
||||
dev->vta_regs[2] = chip->vta_regs[2];
|
||||
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
|
||||
+ dev->imp_port = chip->imp_port;
|
||||
dev->cpu_port = chip->cpu_port;
|
||||
dev->num_vlans = chip->vlans;
|
||||
dev->num_arl_bins = chip->arl_bins;
|
||||
--- a/drivers/net/dsa/b53/b53_priv.h
|
||||
+++ b/drivers/net/dsa/b53/b53_priv.h
|
||||
@@ -122,6 +122,7 @@ struct b53_device {
|
||||
|
||||
/* used ports mask */
|
||||
u16 enabled_ports;
|
||||
+ unsigned int imp_port;
|
||||
unsigned int cpu_port;
|
||||
|
||||
/* connect specific data */
|
@ -1,48 +0,0 @@
|
||||
From: Rob Herring <robh@kernel.org>
|
||||
Date: Tue, 3 Aug 2021 15:56:55 -0600
|
||||
Subject: [PATCH] PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing
|
||||
'ranges'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Commit 669cbc708122 ("PCI: Move DT resource setup into
|
||||
devm_pci_alloc_host_bridge()") made devm_pci_alloc_host_bridge() fail on
|
||||
any DT resource parsing errors, but Broadcom iProc uses
|
||||
devm_pci_alloc_host_bridge() on BCMA bus devices that don't have DT
|
||||
resources. In particular, there is no 'ranges' property. Fix iProc by
|
||||
making 'ranges' optional.
|
||||
|
||||
If 'ranges' is required by a platform, there's going to be more errors
|
||||
latter on if it is missing.
|
||||
|
||||
Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
|
||||
Reported-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Cc: Srinath Mannam <srinath.mannam@broadcom.com>
|
||||
Cc: Roman Bacik <roman.bacik@broadcom.com>
|
||||
Cc: Bharat Gooty <bharat.gooty@broadcom.com>
|
||||
Cc: Abhishek Shah <abhishek.shah@broadcom.com>
|
||||
Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
|
||||
Cc: Ray Jui <ray.jui@broadcom.com>
|
||||
Cc: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>
|
||||
Cc: Scott Branden <sbranden@broadcom.com>
|
||||
Cc: Bjorn Helgaas <bhelgaas@google.com>
|
||||
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
|
||||
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
|
||||
---
|
||||
drivers/pci/of.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/pci/of.c
|
||||
+++ b/drivers/pci/of.c
|
||||
@@ -295,7 +295,7 @@ static int devm_of_pci_get_host_bridge_r
|
||||
/* Check for ranges property */
|
||||
err = of_pci_range_parser_init(&parser, dev_node);
|
||||
if (err)
|
||||
- goto failed;
|
||||
+ return 0;
|
||||
|
||||
dev_dbg(dev, "Parsing ranges property...\n");
|
||||
for_each_of_pci_range(&parser, &range) {
|
@ -1,74 +0,0 @@
|
||||
From: Rob Herring <robh@kernel.org>
|
||||
Date: Tue, 3 Aug 2021 15:56:56 -0600
|
||||
Subject: [PATCH] PCI: iproc: Fix BCMA probe resource handling
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In commit 7ef1c871da16 ("PCI: iproc: Use
|
||||
pci_parse_request_of_pci_ranges()"), calling
|
||||
devm_request_pci_bus_resources() was dropped from the common iProc
|
||||
probe code, but is still needed for BCMA bus probing. Without it, there
|
||||
will be lots of warnings like this:
|
||||
|
||||
pci 0000:00:00.0: BAR 8: no space for [mem size 0x00c00000]
|
||||
pci 0000:00:00.0: BAR 8: failed to assign [mem size 0x00c00000]
|
||||
|
||||
Add back calling devm_request_pci_bus_resources() and adding the
|
||||
resources to pci_host_bridge.windows for BCMA bus probe.
|
||||
|
||||
Fixes: 7ef1c871da16 ("PCI: iproc: Use pci_parse_request_of_pci_ranges()")
|
||||
Reported-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Cc: Srinath Mannam <srinath.mannam@broadcom.com>
|
||||
Cc: Roman Bacik <roman.bacik@broadcom.com>
|
||||
Cc: Bharat Gooty <bharat.gooty@broadcom.com>
|
||||
Cc: Abhishek Shah <abhishek.shah@broadcom.com>
|
||||
Cc: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
|
||||
Cc: Ray Jui <ray.jui@broadcom.com>
|
||||
Cc: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>
|
||||
Cc: Scott Branden <sbranden@broadcom.com>
|
||||
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
|
||||
Cc: "Krzysztof Wilczyński" <kw@linux.com>
|
||||
Cc: Bjorn Helgaas <bhelgaas@google.com>
|
||||
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
drivers/pci/controller/pcie-iproc-bcma.c | 16 ++++++----------
|
||||
1 file changed, 6 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/pci/controller/pcie-iproc-bcma.c
|
||||
+++ b/drivers/pci/controller/pcie-iproc-bcma.c
|
||||
@@ -35,7 +35,6 @@ static int iproc_pcie_bcma_probe(struct
|
||||
{
|
||||
struct device *dev = &bdev->dev;
|
||||
struct iproc_pcie *pcie;
|
||||
- LIST_HEAD(resources);
|
||||
struct pci_host_bridge *bridge;
|
||||
int ret;
|
||||
|
||||
@@ -60,19 +59,16 @@ static int iproc_pcie_bcma_probe(struct
|
||||
pcie->mem.end = bdev->addr_s[0] + SZ_128M - 1;
|
||||
pcie->mem.name = "PCIe MEM space";
|
||||
pcie->mem.flags = IORESOURCE_MEM;
|
||||
- pci_add_resource(&resources, &pcie->mem);
|
||||
+ pci_add_resource(&bridge->windows, &pcie->mem);
|
||||
+ ret = devm_request_pci_bus_resources(dev, &bridge->windows);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
|
||||
pcie->map_irq = iproc_pcie_bcma_map_irq;
|
||||
|
||||
- ret = iproc_pcie_setup(pcie, &resources);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "PCIe controller setup failed\n");
|
||||
- pci_free_resource_list(&resources);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
bcma_set_drvdata(bdev, pcie);
|
||||
- return 0;
|
||||
+
|
||||
+ return iproc_pcie_setup(pcie, &bridge->windows);
|
||||
}
|
||||
|
||||
static void iproc_pcie_bcma_remove(struct bcma_device *bdev)
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/sched/sch_fq_codel.c
|
||||
+++ b/net/sched/sch_fq_codel.c
|
||||
@@ -461,7 +461,11 @@ static int fq_codel_init(struct Qdisc *s
|
||||
@@ -469,7 +469,11 @@ static int fq_codel_init(struct Qdisc *s
|
||||
|
||||
sch->limit = 10*1024;
|
||||
q->flows_cnt = 1024;
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
register_qdisc(&pfifo_head_drop_qdisc_ops);
|
||||
--- a/net/sched/sch_fq_codel.c
|
||||
+++ b/net/sched/sch_fq_codel.c
|
||||
@@ -701,7 +701,7 @@ static const struct Qdisc_class_ops fq_c
|
||||
@@ -709,7 +709,7 @@ static const struct Qdisc_class_ops fq_c
|
||||
.walk = fq_codel_walk,
|
||||
};
|
||||
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.cl_ops = &fq_codel_class_ops,
|
||||
.id = "fq_codel",
|
||||
.priv_size = sizeof(struct fq_codel_sched_data),
|
||||
@@ -716,6 +716,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
|
||||
@@ -724,6 +724,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
|
||||
.dump_stats = fq_codel_dump_stats,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- a/drivers/mtd/mtdconcat.c
|
||||
+++ b/drivers/mtd/mtdconcat.c
|
||||
@@ -683,8 +683,12 @@ struct mtd_info *mtd_concat_create(struc
|
||||
concat->mtd._writev = concat_writev;
|
||||
if (subdev[0]->_read_oob)
|
||||
concat->mtd._read_oob = concat_read_oob;
|
||||
+ else
|
||||
+ concat->mtd._read = concat_read;
|
||||
if (subdev[0]->_write_oob)
|
||||
concat->mtd._write_oob = concat_write_oob;
|
||||
+ else
|
||||
+ concat->mtd._write = concat_write;
|
||||
if (subdev[0]->_block_isbad)
|
||||
concat->mtd._block_isbad = concat_block_isbad;
|
||||
if (subdev[0]->_block_markbad)
|
||||
@@ -744,8 +748,6 @@ struct mtd_info *mtd_concat_create(struc
|
||||
concat->mtd.name = name;
|
||||
|
||||
concat->mtd._erase = concat_erase;
|
||||
- concat->mtd._read = concat_read;
|
||||
- concat->mtd._write = concat_write;
|
||||
concat->mtd._sync = concat_sync;
|
||||
concat->mtd._lock = concat_lock;
|
||||
concat->mtd._unlock = concat_unlock;
|
@ -18,7 +18,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2194,10 +2194,12 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2192,10 +2192,12 @@ static int dsa_slave_switchdev_event(str
|
||||
fdb_info = ptr;
|
||||
|
||||
if (dsa_slave_dev_check(dev)) {
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2208,7 +2208,11 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2206,7 +2206,11 @@ static int dsa_slave_switchdev_event(str
|
||||
struct net_device *br_dev;
|
||||
struct dsa_slave_priv *p;
|
||||
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/net/dsa/slave.c
|
||||
+++ b/net/dsa/slave.c
|
||||
@@ -2201,9 +2201,12 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2199,9 +2199,12 @@ static int dsa_slave_switchdev_event(str
|
||||
else if (!fdb_info->added_by_user)
|
||||
return NOTIFY_OK;
|
||||
} else {
|
||||
@ -44,7 +44,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
*/
|
||||
struct net_device *br_dev;
|
||||
struct dsa_slave_priv *p;
|
||||
@@ -2225,7 +2228,8 @@ static int dsa_slave_switchdev_event(str
|
||||
@@ -2223,7 +2226,8 @@ static int dsa_slave_switchdev_event(str
|
||||
|
||||
dp = p->dp->cpu_dp;
|
||||
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
#include <linux/platform_data/x86/apple.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/suspend.h>
|
||||
@@ -5708,3 +5709,34 @@ static void apex_pci_fixup_class(struct
|
||||
@@ -5762,3 +5763,34 @@ static void apex_pci_fixup_class(struct
|
||||
}
|
||||
DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
|
||||
PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
|
||||
|
Loading…
Reference in New Issue
Block a user