CC: upgrade kernel to 3.18.68

- compile tested on sunxi, imx6
 - runtime tested on sunxi, imx6
 - refresh patches
 - remove unnecessary patches

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
This commit is contained in:
Zoltan HERPAI
2017-09-17 02:00:14 +02:00
parent 998618bb30
commit 03ffd583b9
62 changed files with 239 additions and 353 deletions

View File

@@ -83,7 +83,7 @@
offset + trx->offset[i],
0);
i++;
@@ -205,7 +235,8 @@ static int bcm47xxpart_parse(struct mtd_
@@ -203,7 +233,8 @@ static int bcm47xxpart_parse(struct mtd_
}
/* Squashfs on devices not using TRX */

View File

@@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1515,6 +1515,8 @@ static int bgmac_probe(struct bcma_devic
@@ -1521,6 +1521,8 @@ static int bgmac_probe(struct bcma_devic
if (core->bus->sprom.boardflags_lo & BGMAC_BFL_ENETADM)
bgmac_warn(bgmac, "Support for ADMtek ethernet switch not implemented\n");
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = bgmac_mii_register(bgmac);
if (err) {
bgmac_err(bgmac, "Cannot register MDIO\n");
@@ -1529,8 +1531,6 @@ static int bgmac_probe(struct bcma_devic
@@ -1535,8 +1537,6 @@ static int bgmac_probe(struct bcma_devic
netif_carrier_off(net_dev);
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
err_mii_unregister:
@@ -1549,9 +1549,9 @@ static void bgmac_remove(struct bcma_dev
@@ -1555,9 +1555,9 @@ static void bgmac_remove(struct bcma_dev
{
struct bgmac *bgmac = bcma_get_drvdata(core);

View File

@@ -1,40 +0,0 @@
From 21697336d46b71dd031f29e426dda0b1e7f06cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Date: Wed, 11 Feb 2015 18:06:34 +0100
Subject: [PATCH] bgmac: fix device initialization on Northstar SoCs (condition
typo)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On Northstar (Broadcom's ARM architecture) we need to manually enable
all cores. Code for that is already in place, but the condition for it
was wrong.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
static int bgmac_probe(struct bcma_device *core)
{
+ struct bcma_chipinfo *ci = &core->bus->chipinfo;
struct net_device *net_dev;
struct bgmac *bgmac;
struct ssb_sprom *sprom = &core->bus->sprom;
@@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_devic
bgmac_chip_reset(bgmac);
/* For Northstar, we have to take all GMAC core out of reset */
- if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
- core->id.id == BCMA_CHIP_ID_BCM53018) {
+ if (ci->id == BCMA_CHIP_ID_BCM4707 ||
+ ci->id == BCMA_CHIP_ID_BCM53018) {
struct bcma_device *ns_core;
int ns_gmac;

View File

@@ -254,7 +254,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
}
}
@@ -1583,6 +1657,10 @@ static int bgmac_probe(struct bcma_devic
@@ -1588,6 +1662,10 @@ static int bgmac_probe(struct bcma_devic
goto err_dma_free;
}

View File

@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
pr_err("Unsupported core_unit %d\n", core->core_unit);
return -ENOTSUPP;
}
@@ -1588,8 +1597,17 @@ static int bgmac_probe(struct bcma_devic
@@ -1593,8 +1602,17 @@ static int bgmac_probe(struct bcma_devic
}
bgmac->cmn = core->bus->drv_gmac_cmn.core;

View File

@@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct net_device *net_dev;
struct bgmac *bgmac;
struct ssb_sprom *sprom = &core->bus->sprom;
@@ -1626,8 +1629,7 @@ static int bgmac_probe(struct bcma_devic
@@ -1631,8 +1634,7 @@ static int bgmac_probe(struct bcma_devic
bgmac_chip_reset(bgmac);
/* For Northstar, we have to take all GMAC core out of reset */

View File

@@ -19,9 +19,9 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1578,6 +1578,11 @@ static int bgmac_probe(struct bcma_devic
dev_warn(&core->dev, "Using random MAC: %pM\n", mac);
}
@@ -1583,6 +1583,11 @@ static int bgmac_probe(struct bcma_devic
*/
bcma_core_enable(core, 0);
+ /* This (reset &) enable is not preset in specs or reference driver but
+ * Broadcom does it in arch PCI code when enabling fake PCI device.

View File

@@ -172,7 +172,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 portid;
net = sock_net(skb->sk);
@@ -971,9 +976,7 @@ static void nl_fib_input(struct sk_buff
@@ -972,9 +977,7 @@ static void nl_fib_input(struct sk_buff
nlh = nlmsg_hdr(skb);
frn = (struct fib_result_nl *) nlmsg_data(nlh);

View File

@@ -44,7 +44,7 @@ Closes 20532
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -597,20 +597,22 @@ int ip6_fragment(struct sk_buff *skb, in
@@ -600,20 +600,22 @@ int ip6_fragment(struct sk_buff *skb, in
}
mtu -= hlen + sizeof(struct frag_hdr);
@@ -69,7 +69,7 @@ Closes 20532
goto slow_path_clean;
/* Partially cloned skb? */
@@ -627,8 +629,6 @@ int ip6_fragment(struct sk_buff *skb, in
@@ -630,8 +632,6 @@ int ip6_fragment(struct sk_buff *skb, in
err = 0;
offset = 0;
@@ -78,7 +78,7 @@ Closes 20532
/* BUILD HEADER */
*prevhdr = NEXTHDR_FRAGMENT;
@@ -636,8 +636,11 @@ int ip6_fragment(struct sk_buff *skb, in
@@ -639,8 +639,11 @@ int ip6_fragment(struct sk_buff *skb, in
if (!tmp_hdr) {
IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
IPSTATS_MIB_FRAGFAILS);
@@ -91,7 +91,7 @@ Closes 20532
__skb_pull(skb, hlen);
fh = (struct frag_hdr *)__skb_push(skb, sizeof(struct frag_hdr));
@@ -735,7 +738,6 @@ slow_path:
@@ -738,7 +741,6 @@ slow_path:
*/
*prevhdr = NEXTHDR_FRAGMENT;

View File

@@ -1,33 +0,0 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Date: Sat, 5 Dec 2015 02:03:32 +0100
Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS)
only
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We allowed using bcm47xxpart on BCM5301X arch with commit:
9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X")
BCM5301X devices may contain some partitions in higher memory, e.g.
Netgear R8000 has board_data at 0x2600000. To detect them we should
use size limit on MIPS only.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/mtd/bcm47xxpart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_
/* Parse block by block looking for magics */
for (offset = 0; offset <= master->size - blocksize;
offset += blocksize) {
- /* Nothing more in higher memory */
- if (offset >= 0x2000000)
+ /* Nothing more in higher memory on BCM47XX (MIPS) */
+ if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000)
break;
if (curr_part >= BCM47XXPART_MAX_PARTS) {

View File

@@ -58,7 +58,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
continue;
}
@@ -254,10 +258,11 @@ static int bcm47xxpart_parse(struct mtd_
@@ -252,10 +256,11 @@ static int bcm47xxpart_parse(struct mtd_
}
/* Read middle of the block */
@@ -74,7 +74,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
continue;
}
@@ -277,10 +282,11 @@ static int bcm47xxpart_parse(struct mtd_
@@ -275,10 +280,11 @@ static int bcm47xxpart_parse(struct mtd_
}
offset = master->size - possible_nvram_sizes[i];

View File

@@ -1,35 +0,0 @@
From a95f03e51471dbdbafd3391991d867ac2358ed02 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Sun, 23 Aug 2015 14:23:29 +0200
Subject: [PATCH] usb: ehci-orion: fix probe for !GENERIC_PHY
Commit d445913ce0ab7f ("usb: ehci-orion: add optional PHY support")
added support for optional phys, but devm_phy_optional_get returns
-ENOSYS if GENERIC_PHY is not enabled.
This causes probe failures, even when there are no phys specified:
[ 1.443365] orion-ehci f1058000.usb: init f1058000.usb fail, -38
[ 1.449403] orion-ehci: probe of f1058000.usb failed with error -38
Similar to dwc3, treat -ENOSYS as no phy.
Fixes: d445913ce0ab7f ("usb: ehci-orion: add optional PHY support")
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
drivers/usb/host/ehci-orion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -226,7 +226,8 @@ static int ehci_orion_drv_probe(struct p
priv->phy = devm_phy_optional_get(&pdev->dev, "usb");
if (IS_ERR(priv->phy)) {
err = PTR_ERR(priv->phy);
- goto err_phy_get;
+ if (err != -ENOSYS)
+ goto err_phy_get;
} else {
err = phy_init(priv->phy);
if (err)

View File

@@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
@@ -614,9 +614,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-P
@@ -618,9 +618,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-P
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE

View File

@@ -32,8 +32,8 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+#if defined(MODULE) && !defined(CONFIG_MODULE_STRIPPED)
/* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVICE_TABLE(type, name) \
extern const struct type##_device_id __mod_##type##__##name##_device_table \
@@ -159,7 +160,9 @@ void trim_init_extable(struct module *m)
extern const typeof(name) __mod_##type##__##name##_device_table \
@@ -159,7 +160,9 @@ extern const typeof(name) __mod_##type##
*/
#if defined(MODULE) || !defined(CONFIG_SYSFS)
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#else
#define MODULE_VERSION(_version) \
static struct module_version_attribute ___modver_attr = { \
@@ -181,7 +184,7 @@ void trim_init_extable(struct module *m)
@@ -181,7 +184,7 @@ extern const typeof(name) __mod_##type##
/* Optional firmware file (or files) needed by the module
* format is simply firmware file name. Multiple firmware
* files require multiple MODULE_FIRMWARE() specifiers */
@@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
set_license(mod, get_modinfo(info, "license"));
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1726,7 +1726,9 @@ static void read_symbols(char *modname)
@@ -1758,7 +1758,9 @@ static void read_symbols(char *modname)
symname = remove_dot(info.strtab + sym->st_name);
handle_modversions(mod, &info, sym, symname);
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
}
if (!is_vmlinux(modname) ||
(is_vmlinux(modname) && vmlinux_section_warnings))
@@ -1870,7 +1872,9 @@ static void add_header(struct buffer *b,
@@ -1902,7 +1904,9 @@ static void add_header(struct buffer *b,
buf_printf(b, "#include <linux/vermagic.h>\n");
buf_printf(b, "#include <linux/compiler.h>\n");
buf_printf(b, "\n");
@@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
buf_printf(b, "\n");
buf_printf(b, "__visible struct module __this_module\n");
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
@@ -1887,16 +1891,20 @@ static void add_header(struct buffer *b,
@@ -1919,16 +1923,20 @@ static void add_header(struct buffer *b,
static void add_intree_flag(struct buffer *b, int is_intree)
{
@@ -168,7 +168,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
}
/**
@@ -1989,11 +1997,13 @@ static void add_depends(struct buffer *b
@@ -2021,11 +2029,13 @@ static void add_depends(struct buffer *b
static void add_srcversion(struct buffer *b, struct module *mod)
{
@@ -182,7 +182,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
}
static void write_if_changed(struct buffer *b, const char *fname)
@@ -2224,7 +2234,9 @@ int main(int argc, char **argv)
@@ -2256,7 +2266,9 @@ int main(int argc, char **argv)
add_staging_flag(&buf, mod->name);
err |= add_versions(&buf, mod);
add_depends(&buf, mod, modules);

View File

@@ -1,6 +1,6 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -963,6 +963,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -970,6 +970,7 @@ int spi_nor_scan(struct spi_nor *nor, co
if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||

View File

@@ -16,7 +16,7 @@
config CRYPTO_ANSI_CPRNG
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -89,6 +89,7 @@ obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.
@@ -91,6 +91,7 @@ obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.
obj-$(CONFIG_CRYPTO_LZO) += lzo.o
obj-$(CONFIG_CRYPTO_LZ4) += lz4.o
obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o

View File

@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#define PACKET_FANOUT_LB 1
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1530,6 +1530,7 @@ static int packet_rcv_spkt(struct sk_buf
@@ -1529,6 +1529,7 @@ static int packet_rcv_spkt(struct sk_buf
{
struct sock *sk;
struct sockaddr_pkt *spkt;
@@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
/*
* When we registered the protocol we saved the socket in the data
@@ -1537,6 +1538,7 @@ static int packet_rcv_spkt(struct sk_buf
@@ -1536,6 +1537,7 @@ static int packet_rcv_spkt(struct sk_buf
*/
sk = pt->af_packet_priv;
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
/*
* Yank back the headers [hope the device set this
@@ -1549,7 +1551,7 @@ static int packet_rcv_spkt(struct sk_buf
@@ -1548,7 +1550,7 @@ static int packet_rcv_spkt(struct sk_buf
* so that this procedure is noop.
*/
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
goto out;
if (!net_eq(dev_net(dev), sock_net(sk)))
@@ -1748,12 +1750,12 @@ static int packet_rcv(struct sk_buff *sk
@@ -1747,12 +1749,12 @@ static int packet_rcv(struct sk_buff *sk
int skb_len = skb->len;
unsigned int snaplen, res;
@@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -1873,12 +1875,12 @@ static int tpacket_rcv(struct sk_buff *s
@@ -1872,12 +1874,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -2828,6 +2830,7 @@ static int packet_create(struct net *net
@@ -2831,6 +2833,7 @@ static int packet_create(struct net *net
spin_lock_init(&po->bind_lock);
mutex_init(&po->pg_vec_lock);
po->prot_hook.func = packet_rcv;
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3409,6 +3412,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3425,6 +3428,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@@ -108,7 +108,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
default:
return -ENOPROTOOPT;
}
@@ -3460,6 +3473,13 @@ static int packet_getsockopt(struct sock
@@ -3476,6 +3489,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;

View File

@@ -1,6 +1,6 @@
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -88,6 +88,12 @@ int ipv6_rcv_saddr_equal(const struct so
@@ -90,6 +90,12 @@ int ipv6_rcv_saddr_equal(const struct so
void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr);
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
@@ -52,7 +52,7 @@
int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
u32 banned_flags)
@@ -5469,6 +5468,9 @@ int __init addrconf_init(void)
@@ -5473,6 +5472,9 @@ int __init addrconf_init(void)
ipv6_addr_label_rtnl_register();
@@ -62,7 +62,7 @@
return 0;
errout:
rtnl_af_unregister(&inet6_ops);
@@ -5488,6 +5490,9 @@ void addrconf_cleanup(void)
@@ -5492,6 +5494,9 @@ void addrconf_cleanup(void)
struct net_device *dev;
int i;

View File

@@ -1,15 +1,12 @@
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1721,27 +1721,7 @@ void netlink_detachskb(struct sock *sk,
@@ -1107,24 +1107,7 @@ void netlink_detachskb(struct sock *sk,
static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
{
- int delta;
-
WARN_ON(skb->sk != NULL);
- if (netlink_skb_is_mmaped(skb))
- return skb;
-
- delta = skb->end - skb->tail;
- if (is_vmalloc_addr(skb->head) || delta * 2 < skb->truesize)
- return skb;

View File

@@ -1,6 +1,6 @@
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2023,7 +2023,7 @@ static inline int pskb_network_may_pull(
@@ -2024,7 +2024,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD

View File

@@ -14,7 +14,7 @@ when needed.
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2068,6 +2068,24 @@ static inline void pskb_trim_unique(stru
@@ -2069,6 +2069,24 @@ static inline void pskb_trim_unique(stru
BUG_ON(err);
}

View File

@@ -145,7 +145,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (dev == ip6n->fb_tnl_dev)
RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
else
@@ -771,6 +786,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
@@ -781,6 +796,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
}
EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl);
@@ -254,7 +254,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_rcv - decapsulate IPv6 packet and retransmit it locally
* @skb: received socket buffer
@@ -815,6 +932,26 @@ static int ip6_tnl_rcv(struct sk_buff *s
@@ -825,6 +942,26 @@ static int ip6_tnl_rcv(struct sk_buff *s
skb_reset_network_header(skb);
skb->protocol = htons(protocol);
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
@@ -281,7 +281,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
__skb_tunnel_rx(skb, t->dev, t->net);
@@ -1076,6 +1213,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1086,6 +1223,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
__u8 dsfield;
__u32 mtu;
int err;
@@ -289,7 +289,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if ((t->parms.proto != IPPROTO_IPIP && t->parms.proto != 0) ||
!ip6_tnl_xmit_ctl(t))
@@ -1095,6 +1233,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1105,6 +1243,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
fl6.flowi6_mark = skb->mark;
@@ -308,7 +308,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu);
if (err != 0) {
/* XXX: send ICMP error even if DF is not set. */
@@ -1263,6 +1413,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1273,6 +1423,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.flowinfo = p->flowinfo;
t->parms.link = p->link;
t->parms.proto = p->proto;
@@ -323,7 +323,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
ip6_tnl_dst_reset(t);
ip6_tnl_link_config(t);
return 0;
@@ -1293,6 +1451,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1303,6 +1461,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@@ -331,7 +331,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
@@ -1568,6 +1727,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1578,6 +1737,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@@ -347,7 +347,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
@@ -1601,6 +1769,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -1611,6 +1779,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_PROTO])
parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);
@@ -394,7 +394,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
@@ -1653,6 +1861,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -1663,6 +1871,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@@ -407,7 +407,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -1670,6 +1884,24 @@ static size_t ip6_tnl_get_size(const str
@@ -1680,6 +1894,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(4) +
/* IFLA_IPTUN_PROTO */
nla_total_size(1) +
@@ -432,7 +432,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -1677,6 +1909,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -1687,6 +1919,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -442,7 +442,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put(skb, IFLA_IPTUN_LOCAL, sizeof(struct in6_addr),
@@ -1687,8 +1922,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -1697,8 +1932,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) ||
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
@@ -471,7 +471,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return 0;
nla_put_failure:
@@ -1704,6 +1958,7 @@ static const struct nla_policy ip6_tnl_p
@@ -1714,6 +1968,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_FLOWINFO] = { .type = NLA_U32 },
[IFLA_IPTUN_FLAGS] = { .type = NLA_U32 },
[IFLA_IPTUN_PROTO] = { .type = NLA_U8 },

View File

@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -903,21 +903,45 @@ static int ip6_dst_lookup_tail(struct so
@@ -906,21 +906,45 @@ static int ip6_dst_lookup_tail(struct so
#endif
int err;
@@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* Here if the dst entry we've looked up
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2182,9 +2182,10 @@ int ip6_route_get_saddr(struct net *net,
@@ -2184,9 +2184,10 @@ int ip6_route_get_saddr(struct net *net,
unsigned int prefs,
struct in6_addr *saddr)
{

View File

@@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
default:
rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN
@@ -2139,6 +2161,17 @@ static int ip6_pkt_prohibit_out(struct s
@@ -2141,6 +2163,17 @@ static int ip6_pkt_prohibit_out(struct s
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -2363,7 +2396,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -2365,7 +2398,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -2565,6 +2599,9 @@ static int rt6_fill_node(struct net *net
@@ -2567,6 +2601,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
@@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
@@ -2818,6 +2855,8 @@ static int ip6_route_dev_notify(struct n
@@ -2825,6 +2862,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -3034,6 +3073,17 @@ static int __net_init ip6_route_net_init
@@ -3047,6 +3086,17 @@ static int __net_init ip6_route_net_init
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -220,7 +220,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
net->ipv6.sysctl.flush_delay = 0;
@@ -3052,6 +3102,8 @@ out:
@@ -3065,6 +3115,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -229,7 +229,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -3069,6 +3121,7 @@ static void __net_exit ip6_route_net_exi
@@ -3082,6 +3134,7 @@ static void __net_exit ip6_route_net_exi
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
@@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
}
@@ -3165,6 +3218,9 @@ int __init ip6_route_init(void)
@@ -3155,6 +3208,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
@@ -245,5 +245,5 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+ init_net.ipv6.ip6_policy_failed_entry->rt6i_idev =
+ in6_dev_get(init_net.loopback_dev);
#endif
ret = fib6_init();
if (ret)
}

View File

@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4002,6 +4002,9 @@ static enum gro_result dev_gro_receive(s
@@ -4006,6 +4006,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
@@ -5067,6 +5070,48 @@ static void __netdev_adjacent_dev_unlink
@@ -5077,6 +5080,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *private)
@@ -5127,6 +5172,7 @@ static int __netdev_upper_dev_link(struc
@@ -5137,6 +5182,7 @@ static int __netdev_upper_dev_link(struc
goto rollback_lower_mesh;
}
@@ -84,15 +84,15 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev);
return 0;
@@ -5244,6 +5290,7 @@ void netdev_upper_dev_unlink(struct net_
@@ -5254,6 +5300,7 @@ void netdev_upper_dev_unlink(struct net_
list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
__netdev_adjacent_dev_unlink(dev, i->dev);
__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
+ netdev_update_addr_mask(dev);
call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev);
}
EXPORT_SYMBOL(netdev_upper_dev_unlink);
@@ -5763,6 +5810,7 @@ int dev_set_mac_address(struct net_devic
@@ -5773,6 +5820,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
@@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#endif
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -597,7 +597,8 @@ struct sk_buff {
@@ -598,7 +598,8 @@ struct sk_buff {
#endif
__u8 ipvs_property:1;
__u8 inner_protocol_type:1;

View File

@@ -53,7 +53,7 @@
* @phydev: the phy_device struct
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -748,6 +748,7 @@ void phy_start_machine(struct phy_device
@@ -752,6 +752,7 @@ void phy_start_machine(struct phy_device
void phy_stop_machine(struct phy_device *phydev);
int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd);
int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);

View File

@@ -9,16 +9,7 @@
{
/* Do nothing for now */
return 0;
@@ -1347,7 +1347,7 @@ static struct phy_driver genphy_driver[]
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic PHY",
- .soft_reset = genphy_soft_reset,
+ .soft_reset = no_soft_reset,
.config_init = genphy_config_init,
.features = PHY_GBIT_FEATURES | SUPPORTED_MII |
SUPPORTED_AUI | SUPPORTED_FIBRE |
@@ -1362,7 +1362,7 @@ static struct phy_driver genphy_driver[]
@@ -1364,7 +1364,7 @@ static struct phy_driver genphy_driver[]
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",

View File

@@ -46,7 +46,7 @@
phy_device_free(phydev);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -785,4 +785,22 @@ int __init mdio_bus_init(void);
@@ -789,4 +789,22 @@ int __init mdio_bus_init(void);
void mdio_bus_exit(void);
extern struct bus_type mdio_bus_type;

View File

@@ -41,7 +41,7 @@
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2054,6 +2054,10 @@ static inline int pskb_trim(struct sk_bu
@@ -2055,6 +2055,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
@@ -52,7 +52,7 @@
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
@@ -2180,16 +2184,6 @@ static inline struct sk_buff *dev_alloc_
@@ -2181,16 +2185,6 @@ static inline struct sk_buff *dev_alloc_
}
@@ -86,7 +86,7 @@
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2623,10 +2623,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -2626,10 +2626,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all))
dev_queue_xmit_nit(skb, dev);
@@ -121,7 +121,7 @@
#include <net/protocol.h>
#include <net/dst.h>
@@ -469,6 +470,22 @@ struct sk_buff *__netdev_alloc_skb(struc
@@ -471,6 +472,22 @@ struct sk_buff *__netdev_alloc_skb(struc
}
EXPORT_SYMBOL(__netdev_alloc_skb);

View File

@@ -64,7 +64,7 @@
#endif /* HOSTAP_H */
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -928,6 +928,7 @@ static int hfa384x_set_rid(struct net_de
@@ -933,6 +933,7 @@ static int hfa384x_set_rid(struct net_de
prism2_hw_reset(dev);
}

View File

@@ -30,7 +30,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/**************************************************
* BCMA bus ops
**************************************************/
@@ -1688,6 +1700,14 @@ static int bgmac_probe(struct bcma_devic
@@ -1693,6 +1705,14 @@ static int bgmac_probe(struct bcma_devic
net_dev->hw_features = net_dev->features;
net_dev->vlan_features = net_dev->features;
@@ -45,7 +45,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
err = register_netdev(bgmac->net_dev);
if (err) {
bgmac_err(bgmac, "Cannot register net device\n");
@@ -1714,6 +1734,10 @@ static void bgmac_remove(struct bcma_dev
@@ -1719,6 +1739,10 @@ static void bgmac_remove(struct bcma_dev
{
struct bgmac *bgmac = bcma_get_drvdata(core);

View File

@@ -1,7 +1,7 @@
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -97,6 +97,8 @@ struct amd_chipset_type {
@@ -98,6 +98,8 @@ struct amd_chipset_type {
u8 rev;
};
@@ -10,7 +10,7 @@
static struct amd_chipset_info {
struct pci_dev *nb_dev;
struct pci_dev *smbus_dev;
@@ -454,6 +456,10 @@ void usb_amd_dev_put(void)
@@ -461,6 +463,10 @@ void usb_amd_dev_put(void)
}
EXPORT_SYMBOL_GPL(usb_amd_dev_put);
@@ -21,7 +21,7 @@
/*
* Make sure the controller is completely inactive, unable to
* generate interrupts or do DMA.
@@ -533,8 +539,17 @@ reset_needed:
@@ -540,8 +546,17 @@ reset_needed:
uhci_reset_hc(pdev, base);
return 1;
}
@@ -39,7 +39,7 @@
static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
{
u16 cmd;
@@ -1095,3 +1110,4 @@ static void quirk_usb_early_handoff(stru
@@ -1102,3 +1117,4 @@ static void quirk_usb_early_handoff(stru
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);

View File

@@ -173,7 +173,7 @@
goto err;
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2933,6 +2933,8 @@ static __net_initdata struct pernet_oper
@@ -2939,6 +2939,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@@ -9,7 +9,7 @@
+
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -101,6 +101,8 @@ obj-$(CONFIG_CRYPTO_USER_API) += af_alg.
@@ -103,6 +103,8 @@ obj-$(CONFIG_CRYPTO_USER_API) += af_alg.
obj-$(CONFIG_CRYPTO_USER_API_HASH) += algif_hash.o
obj-$(CONFIG_CRYPTO_USER_API_SKCIPHER) += algif_skcipher.o

View File

@@ -1,6 +1,6 @@
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -903,6 +903,9 @@ int __init early_init_dt_scan_chosen(uns
@@ -909,6 +909,9 @@ int __init early_init_dt_scan_chosen(uns
p = of_get_flat_dt_prop(node, "bootargs", &l);
if (p != NULL && l > 0)
strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));