kernel: update kernel 4.9 to 4.9.37

- Refreshed all patches
- Removed upstreamed
- Adapted 4 patches:

473-fix-marvell-phy-initialization-issues.patch
-----------------------------------------------
Removed hunk 5 which got upstreamed

403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch
404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
--------------------------------------------------------------
Adapted these 2 RFC patches, merging the delta's from an upstream commit
(see below) which made it before these 2.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0

180-usb-xhci-add-support-for-performing-fake-doorbell.patch
-----------------------------------------------------------
- Moved fake_doorbell bitmask due to new item

Compile tested on: cns3xxx, imx6
Run tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
Koen Vandeputte 2017-07-12 22:59:03 +02:00 committed by Hauke Mehrtens
parent 027aea8af7
commit cd54b2d42b
45 changed files with 83 additions and 316 deletions

View file

@ -4,11 +4,11 @@ LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .43
LINUX_VERSION-4.4 = .74
LINUX_VERSION-4.9 = .34
LINUX_VERSION-4.9 = .37
LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
LINUX_KERNEL_HASH-4.4.74 = c319ad6150d112bd4f8c9d1427868eeafd3ab461becf9457f814e4ba7c57808e
LINUX_KERNEL_HASH-4.9.34 = 13d159d1b1fa41ea19fcc2defe09d7532f312ee0b8279b8e12c961d8b02a4546
LINUX_KERNEL_HASH-4.9.37 = f61ecf083b690d97cfdeec2b4457992e98882250c4f41ade36fd7cdfda066090
ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

View file

@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
#include "xhci.h"
#include "xhci-trace.h"
@@ -230,6 +232,458 @@ static void xhci_pme_acpi_rtd3_enable(st
@@ -242,6 +244,458 @@ static void xhci_pme_acpi_rtd3_enable(st
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */
@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
/* called during probe() after chip reset completes */
static int xhci_pci_setup(struct usb_hcd *hcd)
{
@@ -269,6 +723,22 @@ static int xhci_pci_probe(struct pci_dev
@@ -281,6 +735,22 @@ static int xhci_pci_probe(struct pci_dev
struct hc_driver *driver;
struct usb_hcd *hcd;
@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
driver = (struct hc_driver *)id->driver_data;
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
@@ -326,6 +796,16 @@ static void xhci_pci_remove(struct pci_d
@@ -338,6 +808,16 @@ static void xhci_pci_remove(struct pci_d
{
struct xhci_hcd *xhci;

View file

@ -13,7 +13,7 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -191,7 +191,7 @@ static void xhci_pci_quirks(struct devic
@@ -203,7 +203,7 @@ static void xhci_pci_quirks(struct devic
}
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
pdev->device == 0x0015)
@ -44,7 +44,7 @@ produce a noisy warning.
/* hcd->irq is 0, we have MSI */
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1678,6 +1678,7 @@ struct xhci_hcd {
@@ -1679,6 +1679,7 @@ struct xhci_hcd {
/* support xHCI 0.96 spec USB2 software LPM */
unsigned sw_lpm_support:1;
/* support xHCI 1.0 spec USB2 hardware LPM */

View file

@ -1,48 +0,0 @@
From bb1a619735b4660f21bce3e728b937640024b4ad Mon Sep 17 00:00:00 2001
From: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
Date: Wed, 8 Feb 2017 17:14:26 -0500
Subject: [PATCH] net: phy: Initialize mdio clock at probe function
USB PHYs need the MDIO clock divisor enabled earlier to work.
Initialize mdio clock divisor in probe function. The ext bus
bit available in the same register will be used by mdio mux
to enable external mdio.
Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
Fixes: ddc24ae1 ("net: phy: Broadcom iProc MDIO bus driver")
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/phy/mdio-bcm-iproc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/net/phy/mdio-bcm-iproc.c
+++ b/drivers/net/phy/mdio-bcm-iproc.c
@@ -81,8 +81,6 @@ static int iproc_mdio_read(struct mii_bu
if (rc)
return rc;
- iproc_mdio_config_clk(priv->base);
-
/* Prepare the read operation */
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
(reg << MII_DATA_RA_SHIFT) |
@@ -112,8 +110,6 @@ static int iproc_mdio_write(struct mii_b
if (rc)
return rc;
- iproc_mdio_config_clk(priv->base);
-
/* Prepare the write operation */
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
(reg << MII_DATA_RA_SHIFT) |
@@ -163,6 +159,8 @@ static int iproc_mdio_probe(struct platf
bus->read = iproc_mdio_read;
bus->write = iproc_mdio_write;
+ iproc_mdio_config_clk(priv->base);
+
rc = of_mdiobus_register(bus, pdev->dev.of_node);
if (rc) {
dev_err(&pdev->dev, "MDIO bus registration failed\n");

View file

@ -127,11 +127,11 @@ it on BCM4708 family.
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1660,6 +1660,7 @@ struct xhci_hcd {
/* For controller with a broken Port Disable implementation */
@@ -1661,6 +1661,7 @@ struct xhci_hcd {
#define XHCI_BROKEN_PORT_PED (1 << 25)
#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
+#define XHCI_FAKE_DOORBELL (1 << 27)
#define XHCI_U2_DISABLE_WAKE (1 << 27)
+#define XHCI_FAKE_DOORBELL (1 << 28)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View file

@ -46,7 +46,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
struct bcm2835_dmadev {
struct dma_device ddev;
@@ -922,6 +924,9 @@ static int bcm2835_dma_probe(struct plat
@@ -925,6 +927,9 @@ static int bcm2835_dma_probe(struct plat
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
@ -56,7 +56,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
od->base = base;
@@ -959,6 +964,9 @@ static int bcm2835_dma_probe(struct plat
@@ -962,6 +967,9 @@ static int bcm2835_dma_probe(struct plat
goto err_no_dma;
}
@ -66,7 +66,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
/* get irqs for each channel that we support */
for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) {
/* skip masked out channels */
@@ -1033,6 +1041,7 @@ static int bcm2835_dma_remove(struct pla
@@ -1036,6 +1044,7 @@ static int bcm2835_dma_remove(struct pla
{
struct bcm2835_dmadev *od = platform_get_drvdata(pdev);
@ -74,7 +74,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
dma_async_device_unregister(&od->ddev);
bcm2835_dma_free(od);
@@ -1048,7 +1057,22 @@ static struct platform_driver bcm2835_dm
@@ -1051,7 +1060,22 @@ static struct platform_driver bcm2835_dm
},
};

View file

@ -1,39 +0,0 @@
From 9fd7a158ec098ab05b8d3ec2c2973b3dc7e498f3 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Mon, 20 Feb 2017 20:01:16 +0100
Subject: [PATCH] dmaengine: bcm2835: Fix cyclic DMA period splitting
The code responsible for splitting periods into chunks that
can be handled by the DMA controller missed to update total_len,
the number of bytes processed in the current period, when there
are more chunks to follow.
Therefore total_len was stuck at 0 and the code didn't work at all.
This resulted in a wrong control block layout and audio issues because
the cyclic DMA callback wasn't executing on period boundaries.
Fix this by adding the missing total_len update.
Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Tested-by: Clive Messer <clive.messer@digitaldreamtime.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
---
drivers/dma/bcm2835-dma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -253,8 +253,11 @@ static void bcm2835_dma_create_cb_set_le
*/
/* have we filled in period_length yet? */
- if (*total_len + control_block->length < period_len)
+ if (*total_len + control_block->length < period_len) {
+ /* update number of bytes in this period so far */
+ *total_len += control_block->length;
return;
+ }
/* calculate the length that remains to reach period_length */
control_block->length = period_len - *total_len;

View file

@ -39,7 +39,7 @@
/**
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -983,6 +983,9 @@ static int spi_transfer_one_message(stru
@@ -985,6 +985,9 @@ static int spi_transfer_one_message(stru
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
trace_spi_transfer_start(msg, xfer);

View file

@ -26,8 +26,8 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1256,6 +1256,13 @@ static int spansion_quad_enable(struct s
return -EINVAL;
@@ -1263,6 +1263,13 @@ static int spansion_quad_enable(struct s
return ret;
}
+ ret = spi_nor_wait_till_ready(nor);

View file

@ -206,7 +206,7 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
if (ret < 0)
goto write_err;
written = ret;
@@ -1312,6 +1401,47 @@ static int spi_nor_check(struct spi_nor
@@ -1319,6 +1408,47 @@ static int spi_nor_check(struct spi_nor
return 0;
}
@ -254,7 +254,7 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
{
const struct flash_info *info = NULL;
@@ -1360,6 +1490,14 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1367,6 +1497,14 @@ int spi_nor_scan(struct spi_nor *nor, co
mutex_init(&nor->lock);
/*
@ -269,7 +269,7 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
* Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
* with the software protection bits set
*/
@@ -1517,6 +1655,12 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1524,6 +1662,12 @@ int spi_nor_scan(struct spi_nor *nor, co
nor->read_dummy = spi_nor_read_dummy_cycles(nor);

View file

@ -95,7 +95,7 @@ Acked-by: Marek Vasut <marek.vasut@gmail.com>
static struct seq_rw_config stfsm_s25fl_write4_configs[] = {
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1625,16 +1625,16 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1632,16 +1632,16 @@ int spi_nor_scan(struct spi_nor *nor, co
/* Dedicated 4-byte command set */
switch (nor->flash_read) {
case SPI_NOR_QUAD:

View file

@ -116,7 +116,7 @@ Acked-by: Marek Vasut <marek.vasut@gmail.com>
/* Enable/disable 4-byte addressing mode. */
static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
int enable)
@@ -1621,27 +1697,10 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1628,27 +1704,10 @@ int spi_nor_scan(struct spi_nor *nor, co
else if (mtd->size > 0x1000000) {
/* enable 4-byte addressing if the device exceeds 16MiB */
nor->addr_width = 4;

View file

@ -1,30 +0,0 @@
From: Tobias Wolf <dev-NTEO@vplace.de>
Date: Wed, 23 Nov 2016 10:40:07 +0100
Subject: [PATCH] of: Add check to of_scan_flat_dt() before accessing
initial_boot_params
An empty __dtb_start to __dtb_end section might result in initial_boot_params
being null for arch/mips/ralink. This showed that the boot process hangs
indefinitely in of_scan_flat_dt().
Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
---
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -741,9 +741,12 @@ int __init of_scan_flat_dt(int (*it)(uns
const char *pathp;
int offset, rc = 0, depth = -1;
- for (offset = fdt_next_node(blob, -1, &depth);
- offset >= 0 && depth >= 0 && !rc;
- offset = fdt_next_node(blob, offset, &depth)) {
+ if (!blob)
+ return 0;
+
+ for (offset = fdt_next_node(blob, -1, &depth);
+ offset >= 0 && depth >= 0 && !rc;
+ offset = fdt_next_node(blob, offset, &depth)) {
pathp = fdt_get_name(blob, offset, NULL);
if (*pathp == '/')

View file

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -698,7 +698,7 @@ static void spi_set_cs(struct spi_device
@@ -700,7 +700,7 @@ static void spi_set_cs(struct spi_device
enable = !enable;
if (gpio_is_valid(spi->cs_gpio))

View file

@ -4,7 +4,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1588,6 +1588,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1595,6 +1595,7 @@ int spi_nor_scan(struct spi_nor *nor, co
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
JEDEC_MFR(info) == SNOR_MFR_INTEL ||

View file

@ -302,7 +302,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
@@ -1283,6 +1423,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1285,6 +1425,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
{
struct ip6_tnl *t = netdev_priv(dev);
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
@ -310,7 +310,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
int encap_limit = -1;
__u16 offset;
struct flowi6 fl6;
@@ -1338,6 +1479,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
@@ -1343,6 +1484,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_mark = skb->mark;
}
@ -329,7 +329,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
@@ -1463,6 +1616,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
@@ -1470,6 +1623,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.flowinfo = p->flowinfo;
t->parms.link = p->link;
t->parms.proto = p->proto;
@ -344,7 +344,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
return 0;
@@ -1501,6 +1662,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
@@ -1508,6 +1669,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@ -352,7 +352,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
@@ -1878,6 +2040,15 @@ static int ip6_tnl_validate(struct nlatt
@@ -1885,6 +2047,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@ -368,7 +368,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
@@ -1912,6 +2083,46 @@ static void ip6_tnl_netlink_parms(struct
@@ -1919,6 +2090,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_COLLECT_METADATA])
parms->collect_md = true;
@ -415,7 +415,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
@@ -2021,6 +2232,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2028,6 +2239,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@ -428,7 +428,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -2048,6 +2265,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2055,6 +2272,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(2) +
/* IFLA_IPTUN_COLLECT_METADATA */
nla_total_size(0) +
@ -453,7 +453,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -2055,6 +2290,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2062,6 +2297,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@ -463,7 +463,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
@@ -2063,9 +2301,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2070,9 +2308,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) ||
@ -492,7 +492,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
@@ -2103,6 +2359,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2110,6 +2366,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },

View file

@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
default:
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -88,6 +88,10 @@ static int fib6_rule_action(struct fib_r
@@ -77,6 +77,10 @@ static int fib6_rule_action(struct fib_r
err = -EACCES;
rt = net->ipv6.ip6_prohibit_entry;
goto discard_pkt;

View file

@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4512,6 +4512,9 @@ static enum gro_result dev_gro_receive(s
@@ -4513,6 +4513,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@nbd.name>
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
@@ -5789,6 +5792,48 @@ static void __netdev_adjacent_dev_unlink
@@ -5790,6 +5793,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info)
@@ -5987,6 +6032,8 @@ void netdev_upper_dev_unlink(struct net_
@@ -5988,6 +6033,8 @@ 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, i->ref_nr);
@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
}
@@ -6587,6 +6634,7 @@ int dev_set_mac_address(struct net_devic
@@ -6588,6 +6635,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;

View file

@ -53,7 +53,7 @@
* @phydev: the phy_device struct
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -813,6 +813,7 @@ int phy_ethtool_ksettings_get(struct phy
@@ -816,6 +816,7 @@ int phy_ethtool_ksettings_get(struct phy
struct ethtool_link_ksettings *cmd);
int phy_ethtool_ksettings_set(struct phy_device *phydev,
const struct ethtool_link_ksettings *cmd);

View file

@ -1,6 +1,6 @@
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -496,6 +496,12 @@ struct phy_driver {
@@ -499,6 +499,12 @@ struct phy_driver {
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);
@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1267,6 +1267,9 @@ int genphy_update_link(struct phy_device
@@ -1309,6 +1309,9 @@ int genphy_update_link(struct phy_device
{
int status;

View file

@ -12,7 +12,7 @@
phy_suspend(phydev);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -514,6 +514,12 @@ struct phy_driver {
@@ -517,6 +517,12 @@ struct phy_driver {
*/
int (*did_interrupt)(struct phy_device *phydev);

View file

@ -1,6 +1,6 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1485,7 +1485,7 @@ int genphy_config_init(struct phy_device
@@ -1527,7 +1527,7 @@ int genphy_config_init(struct phy_device
return 0;
}
@ -9,7 +9,7 @@
{
/* Do nothing for now */
return 0;
@@ -1724,7 +1724,7 @@ static struct phy_driver genphy_driver[]
@@ -1798,7 +1798,7 @@ static struct phy_driver genphy_driver[]
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic PHY",
@ -18,7 +18,7 @@
.config_init = genphy_config_init,
.features = PHY_GBIT_FEATURES | SUPPORTED_MII |
SUPPORTED_AUI | SUPPORTED_FIBRE |
@@ -1738,7 +1738,7 @@ static struct phy_driver genphy_driver[]
@@ -1812,7 +1812,7 @@ static struct phy_driver genphy_driver[]
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",

View file

@ -50,7 +50,7 @@
phy_device_free(phydev);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -856,6 +856,23 @@ void mdio_bus_exit(void);
@@ -859,6 +859,23 @@ void mdio_bus_exit(void);
extern struct bus_type mdio_bus_type;

View file

@ -86,7 +86,7 @@
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2931,10 +2931,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -2932,10 +2932,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);

View file

@ -122,7 +122,7 @@
return -ENOMEM;
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2703,6 +2703,8 @@ static const struct file_operations proc
@@ -2713,6 +2713,8 @@ static const struct file_operations proc
static int __init proc_vmalloc_init(void)
{

View file

@ -1,51 +0,0 @@
From e7748d641ae37081e2034869491f1629461ae13c Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@gmail.com>
Date: Thu, 16 Mar 2017 21:00:18 +0100
Subject: [PATCH] pinctrl: ipq4019: Add missing pingroups
This patch adds the missing PINGROUP for GPIO70-99.
This fixes a crash that happens in pinctrl-msm, if any
of the GPIO70-99 are accessed.
Fixes: 5303f7827fcd41d ("pinctrl: qcom: ipq4019: set ngpios to correct value")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
@@ -405,6 +405,36 @@ static const struct msm_pingroup ipq4019
PINGROUP(67, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
PINGROUP(68, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
PINGROUP(69, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(98, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
};
static const struct msm_pinctrl_soc_data ipq4019_pinctrl = {

View file

@ -1,37 +0,0 @@
From 833bfade96561216aa2129516a5926a0326860a2 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon, 17 Apr 2017 01:38:05 +0200
Subject: spi: double time out tolerance
The generic SPI code calculates how long the issued transfer would take
and adds 100ms in addition to the timeout as tolerance. On my 500 MHz
Lantiq Mips SoC I am getting timeouts from the SPI like this when the
system boots up:
m25p80 spi32766.4: SPI transfer timed out
blk_update_request: I/O error, dev mtdblock3, sector 2
SQUASHFS error: squashfs_read_data failed to read block 0x6e
After increasing the tolerance for the timeout to 200ms I haven't seen
these SPI transfer time outs any more.
The Lantiq SPI driver in use here has an extra work queue in between,
which gets triggered when the controller send the last word and the
hardware FIFOs used for reading and writing are only 8 words long.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1004,7 +1004,7 @@ static int spi_transfer_one_message(stru
ret = 0;
ms = 8LL * 1000LL * xfer->len;
do_div(ms, xfer->speed_hz);
- ms += ms + 100; /* some tolerance */
+ ms += ms + 200; /* some tolerance */
if (ms > UINT_MAX)
ms = UINT_MAX;

View file

@ -229,7 +229,7 @@
struct netpoll *netpoll;
int err = 0;
@@ -1235,11 +1235,16 @@ int dsa_slave_create(struct dsa_switch *
@@ -1233,11 +1233,16 @@ int dsa_slave_create(struct dsa_switch *
struct net_device *master;
struct net_device *slave_dev;
struct dsa_slave_priv *p;
@ -248,7 +248,7 @@
slave_dev = alloc_netdev(sizeof(struct dsa_slave_priv), name,
NET_NAME_UNKNOWN, ether_setup);
@@ -1265,6 +1270,7 @@ int dsa_slave_create(struct dsa_switch *
@@ -1263,6 +1268,7 @@ int dsa_slave_create(struct dsa_switch *
p->parent = ds;
p->port = port;
p->xmit = dst->tag_ops->xmit;

View file

@ -167,7 +167,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -426,6 +426,7 @@ struct phy_device {
@@ -429,6 +429,7 @@ struct phy_device {
u8 mdix;

View file

@ -256,7 +256,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+EXPORT_SYMBOL(phy_write_mmd);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -627,14 +627,7 @@ struct phy_fixup {
@@ -630,14 +630,7 @@ struct phy_fixup {
*
* Same rules as for phy_read();
*/
@ -272,7 +272,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* phy_read_mmd_indirect - reads data from the MMD registers
@@ -728,16 +721,7 @@ static inline bool phy_is_pseudo_fixed_l
@@ -731,16 +724,7 @@ static inline bool phy_is_pseudo_fixed_l
*
* Same rules as for phy_write();
*/

View file

@ -64,7 +64,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
EXPORT_SYMBOL(phy_write_mmd);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -570,6 +570,30 @@ struct phy_driver {
@@ -573,6 +573,30 @@ struct phy_driver {
*/
void (*link_change_notify)(struct phy_device *dev);

View file

@ -30,22 +30,27 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1343,11 +1343,16 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
@@ -1343,14 +1343,19 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
*/
int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
{
- int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised);
+ int cap, adv;
- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val);
- /* Mask prohibited EEE modes */
- val &= ~phydev->eee_broken_modes;
+ /* Get Supported EEE */
+ cap = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE);
+ if (cap < 0)
+ return cap;
+
+ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
- phy_write_mmd_indirect(phydev, MDIO_AN_EEE_ADV, MDIO_MMD_AN, val);
+ /* Mask prohibited EEE modes */
+ adv &= ~phydev->eee_broken_modes;
- return 0;
+ adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
+
+ return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
}
EXPORT_SYMBOL(phy_ethtool_set_eee);

View file

@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1343,16 +1343,33 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
@@ -1343,19 +1343,36 @@ EXPORT_SYMBOL(phy_ethtool_get_eee);
*/
int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data)
{
@ -30,6 +30,9 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+
adv = ethtool_adv_to_mmd_eee_adv_t(data->advertised) & cap;
/* Mask prohibited EEE modes */
adv &= ~phydev->eee_broken_modes;
- return phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
+ if (old_adv != adv) {
+ ret = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);

View file

@ -258,7 +258,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+EXPORT_SYMBOL_GPL(genphy_c45_read_pma);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1410,27 +1410,19 @@ EXPORT_SYMBOL(genphy_read_status);
@@ -1452,27 +1452,19 @@ EXPORT_SYMBOL(genphy_read_status);
static int gen10g_read_status(struct phy_device *phydev)
{
@ -295,7 +295,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
}
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -807,6 +807,8 @@ static inline const char *phydev_name(co
@@ -810,6 +810,8 @@ static inline const char *phydev_name(co
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
__printf(2, 3);
void phy_attached_info(struct phy_device *phydev);
@ -304,7 +304,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
int genphy_config_init(struct phy_device *phydev);
int genphy_setup_forced(struct phy_device *phydev);
int genphy_restart_aneg(struct phy_device *phydev);
@@ -817,6 +819,16 @@ int genphy_read_status(struct phy_device
@@ -820,6 +822,16 @@ int genphy_read_status(struct phy_device
int genphy_suspend(struct phy_device *phydev);
int genphy_resume(struct phy_device *phydev);
int genphy_soft_reset(struct phy_device *phydev);

View file

@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* phy_aneg_done - return auto-negotiation status
@@ -1439,3 +1457,14 @@ int phy_ethtool_set_link_ksettings(struc
@@ -1442,3 +1460,14 @@ int phy_ethtool_set_link_ksettings(struc
return phy_ethtool_ksettings_set(phydev, cmd);
}
EXPORT_SYMBOL(phy_ethtool_set_link_ksettings);

View file

@ -91,7 +91,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
{
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -642,6 +642,9 @@ struct phy_fixup {
@@ -645,6 +645,9 @@ struct phy_fixup {
int (*run)(struct phy_device *phydev);
};

View file

@ -305,7 +305,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
{
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -645,6 +645,21 @@ struct phy_fixup {
@@ -648,6 +648,21 @@ struct phy_fixup {
const char *phy_speed_to_str(int speed);
const char *phy_duplex_to_str(unsigned int duplex);

View file

@ -1007,7 +1007,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
struct sk_buff;
/*
@@ -422,6 +423,7 @@ struct phy_device {
@@ -425,6 +426,7 @@ struct phy_device {
struct mutex lock;

View file

@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1679,7 +1679,8 @@ static struct phy_driver marvell_drivers
@@ -1678,7 +1678,8 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1510,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1510",

View file

@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1531,7 +1531,7 @@ static struct phy_driver marvell_drivers
@@ -1530,7 +1530,7 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1111,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1111",

View file

@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1699,7 +1699,7 @@ static struct phy_driver marvell_drivers
@@ -1698,7 +1698,7 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1540,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1540",

View file

@ -1,26 +0,0 @@
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Fri, 23 Dec 2016 18:54:01 +0000
Subject: [PATCH] net: phy: fix marvell phy status reading
The Marvell driver incorrectly provides phydev->lp_advertising as the
logical and of the link partner's advert and our advert. This is
incorrect - this field is supposed to store the link parter's unmodified
advertisment.
This allows ethtool to report the correct link partner auto-negotiation
status.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1114,8 +1114,6 @@ static int marvell_read_status_page(stru
if (adv < 0)
return adv;
- lpa &= adv;
-
if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
phydev->duplex = DUPLEX_FULL;
else

View file

@ -49,13 +49,3 @@ Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
i = phy_write(phydev, MII_MARVELL_PHY_PAGE, saved_page);
if (ret == 0)
ret = i;
@@ -1200,7 +1198,8 @@ static int marvell_read_status(struct ph
int err;
/* Check the fiber mode first */
- if (phydev->supported & SUPPORTED_FIBRE) {
+ if (phydev->supported & SUPPORTED_FIBRE &&
+ phydev->interface != PHY_INTERFACE_MODE_SGMII) {
err = phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_M1111_FIBER);
if (err < 0)
goto error;

View file

@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1534,6 +1534,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1541,6 +1541,7 @@ int spi_nor_scan(struct spi_nor *nor, co
struct device *dev = nor->dev;
struct mtd_info *mtd = &nor->mtd;
struct device_node *np = spi_nor_get_flash_node(nor);
@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
int ret;
int i;
@@ -1598,7 +1599,12 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1605,7 +1606,12 @@ int spi_nor_scan(struct spi_nor *nor, co
spi_nor_wait_till_ready(nor);
}

View file

@ -67,7 +67,7 @@
static int macronix_quad_enable(struct spi_nor *nor)
{
int ret, val;
@@ -1623,10 +1683,12 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1630,10 +1690,12 @@ int spi_nor_scan(struct spi_nor *nor, co
}
/* sst nor chips use AAI word program */
@ -82,7 +82,7 @@
if (info->flags & USE_FSR)
nor->flags |= SNOR_F_USE_FSR;
@@ -1656,11 +1718,20 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -1663,11 +1725,20 @@ int spi_nor_scan(struct spi_nor *nor, co
mtd->writebufsize = nor->page_size;
if (np) {