mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-19 08:36:47 +00:00
kernel: bump 4.4 to 4.4.167
Refreshed all patches. Removed upstreamed: - 203-MIPS-ath79-fix-restart.patch - 330-Revert-MIPS-BCM47XX-Enable-74K-Core-ExternalSync-for.patch - 051-0001-ovl-rename-is_merge-to-is_lowest.patch - 051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch - 051-0005-ovl-proper-cleanup-of-workdir.patch Altered patches: - 201-extra_optimization.patch - 304-mips_disable_fpu.patch Compile-tested on: ar71xx, cns3xxx, imx6, mpc85xx Runtime-tested on: ar71xx, cns3xxx, imx6, mpc85xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
parent
26b8069604
commit
65044a50ab
@ -3,10 +3,10 @@
|
||||
LINUX_RELEASE?=1
|
||||
|
||||
LINUX_VERSION-3.18 = .43
|
||||
LINUX_VERSION-4.4 = .153
|
||||
LINUX_VERSION-4.4 = .167
|
||||
|
||||
LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
|
||||
LINUX_KERNEL_HASH-4.4.153 = 0f2355515c22ca705600043bedc75218c68dcb8ab528f57f67851fbcb8545402
|
||||
LINUX_KERNEL_HASH-4.4.167 = 33ca4c28a565404fc7b07f9d6b734c291035f7e7e46c280131494b04e3953edf
|
||||
|
||||
ifdef KERNEL_PATCHVER
|
||||
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
|
||||
|
@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
||||
|
||||
#include "xhci.h"
|
||||
#include "xhci-trace.h"
|
||||
@@ -227,6 +229,458 @@ static void xhci_pme_acpi_rtd3_enable(st
|
||||
@@ -229,6 +231,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)
|
||||
{
|
||||
@@ -266,6 +720,22 @@ static int xhci_pci_probe(struct pci_dev
|
||||
@@ -268,6 +722,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 */
|
||||
@@ -323,6 +793,16 @@ static void xhci_pci_remove(struct pci_d
|
||||
@@ -325,6 +795,16 @@ static void xhci_pci_remove(struct pci_d
|
||||
{
|
||||
struct xhci_hcd *xhci;
|
||||
|
||||
|
@ -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
|
||||
@@ -193,7 +193,7 @@ static void xhci_pci_quirks(struct devic
|
||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
||||
pdev->device == 0x0015)
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- a/arch/mips/ath79/setup.c
|
||||
+++ b/arch/mips/ath79/setup.c
|
||||
@@ -44,6 +44,7 @@ static char ath79_sys_type[ATH79_SYS_TYP
|
||||
|
||||
static void ath79_restart(char *command)
|
||||
{
|
||||
+ local_irq_disable();
|
||||
ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
|
||||
for (;;)
|
||||
if (cpu_wait)
|
||||
--- a/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
@@ -134,6 +134,7 @@ static inline u32 ath79_pll_rr(unsigned
|
||||
static inline void ath79_reset_wr(unsigned reg, u32 val)
|
||||
{
|
||||
__raw_writel(val, ath79_reset_base + reg);
|
||||
+ (void) __raw_readl(ath79_reset_base + reg); /* flush */
|
||||
}
|
||||
|
||||
static inline u32 ath79_reset_rr(unsigned reg)
|
@ -310,7 +310,7 @@
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
--- a/net/ipv6/ip6_tunnel.c
|
||||
+++ b/net/ipv6/ip6_tunnel.c
|
||||
@@ -1310,7 +1310,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
@@ -1319,7 +1319,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
|
||||
dsfield = ipv6_get_dsfield(ipv6h);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
|
||||
@ -346,7 +346,7 @@
|
||||
#endif /* _LINUX_TYPES_H */
|
||||
--- a/net/ipv4/af_inet.c
|
||||
+++ b/net/ipv4/af_inet.c
|
||||
@@ -1321,8 +1321,8 @@ static struct sk_buff **inet_gro_receive
|
||||
@@ -1322,8 +1322,8 @@ static struct sk_buff **inet_gro_receive
|
||||
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
|
||||
goto out_unlock;
|
||||
|
||||
@ -610,7 +610,7 @@
|
||||
goto next_ht;
|
||||
--- a/net/ipv6/ip6_offload.c
|
||||
+++ b/net/ipv6/ip6_offload.c
|
||||
@@ -225,7 +225,7 @@ static struct sk_buff **ipv6_gro_receive
|
||||
@@ -226,7 +226,7 @@ static struct sk_buff **ipv6_gro_receive
|
||||
continue;
|
||||
|
||||
iph2 = (struct ipv6hdr *)(p->data + off);
|
||||
@ -642,9 +642,9 @@
|
||||
- *(__be32 *)iph = to;
|
||||
+ net_hdr_word(iph) = to;
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE)
|
||||
skb->csum = csum_add(csum_sub(skb->csum, from), to);
|
||||
return 1;
|
||||
@@ -134,7 +134,7 @@ static inline int IP6_ECN_set_ce(struct
|
||||
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
|
||||
(__force __wsum)to);
|
||||
@@ -135,7 +135,7 @@ static inline int IP6_ECN_set_ce(struct
|
||||
|
||||
static inline void IP6_ECN_clear(struct ipv6hdr *iph)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -875,6 +875,18 @@ static const struct flash_info *spi_nor_
|
||||
@@ -881,6 +881,18 @@ static const struct flash_info *spi_nor_
|
||||
}
|
||||
dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %2x, %2x\n",
|
||||
id[0], id[1], id[2]);
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -1785,7 +1785,6 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1788,7 +1788,6 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(skb);
|
||||
skb_trim(skb, skb->len - 4); /* remove fcs */
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1803,7 +1802,6 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1806,7 +1805,6 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(ax_skb);
|
||||
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
||||
|
@ -659,7 +659,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function
|
||||
}
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5005,7 +5005,7 @@ static void port_event(struct usb_hub *h
|
||||
@@ -5007,7 +5007,7 @@ static void port_event(struct usb_hub *h
|
||||
if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
|
||||
u16 status = 0, unused;
|
||||
|
||||
@ -670,7 +670,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function
|
||||
msleep(100); /* Cool down */
|
||||
--- a/drivers/usb/core/message.c
|
||||
+++ b/drivers/usb/core/message.c
|
||||
@@ -1913,6 +1913,85 @@ free_interfaces:
|
||||
@@ -1924,6 +1924,85 @@ free_interfaces:
|
||||
if (cp->string == NULL &&
|
||||
!(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
|
||||
cp->string = usb_cache_string(dev, cp->desc.iConfiguration);
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
|
||||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -763,8 +768,59 @@ static int smsc95xx_ioctl(struct net_dev
|
||||
@@ -766,8 +771,59 @@ static int smsc95xx_ioctl(struct net_dev
|
||||
return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to
|
||||
|
||||
--- a/kernel/cgroup.c
|
||||
+++ b/kernel/cgroup.c
|
||||
@@ -5311,7 +5311,7 @@ int __init cgroup_init_early(void)
|
||||
@@ -5315,7 +5315,7 @@ int __init cgroup_init_early(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to
|
||||
|
||||
/**
|
||||
* cgroup_init - cgroup initialization
|
||||
@@ -5807,6 +5807,27 @@ static int __init cgroup_disable(char *s
|
||||
@@ -5811,6 +5811,27 @@ static int __init cgroup_disable(char *s
|
||||
}
|
||||
__setup("cgroup_disable=", cgroup_disable);
|
||||
|
||||
|
@ -13,7 +13,7 @@ meaning they don't end up with the same MAC address as the built-in RPi adaptor.
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -817,10 +817,6 @@ static int smsc95xx_is_macaddr_param(str
|
||||
@@ -820,10 +820,6 @@ static int smsc95xx_is_macaddr_param(str
|
||||
|
||||
static void smsc95xx_init_mac_address(struct usbnet *dev)
|
||||
{
|
||||
@ -24,7 +24,7 @@ meaning they don't end up with the same MAC address as the built-in RPi adaptor.
|
||||
/* try reading mac address from EEPROM */
|
||||
if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
|
||||
dev->net->dev_addr) == 0) {
|
||||
@@ -831,7 +827,11 @@ static void smsc95xx_init_mac_address(st
|
||||
@@ -834,7 +830,11 @@ static void smsc95xx_init_mac_address(st
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ See issue 1248.
|
||||
static char *macaddr = ":";
|
||||
module_param(macaddr, charp, 0);
|
||||
MODULE_PARM_DESC(macaddr, "MAC address");
|
||||
@@ -1841,6 +1845,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1844,6 +1848,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(skb);
|
||||
skb_trim(skb, skb->len - 4); /* remove fcs */
|
||||
@ -33,7 +33,7 @@ See issue 1248.
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1858,6 +1864,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1861,6 +1867,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(ax_skb);
|
||||
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
||||
|
@ -21,7 +21,7 @@ Signed-off-by: Sam Nazarko <email@samnazarko.co.uk>
|
||||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -1006,13 +1010,13 @@ static int smsc95xx_reset(struct usbnet
|
||||
@@ -1009,13 +1013,13 @@ static int smsc95xx_reset(struct usbnet
|
||||
|
||||
if (!turbo_mode) {
|
||||
burst_cap = 0;
|
||||
|
@ -355,7 +355,7 @@
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -880,6 +892,8 @@ static void local_r4k_flush_cache_sigtra
|
||||
@@ -882,6 +894,8 @@ static void local_r4k_flush_cache_sigtra
|
||||
unsigned long addr = (unsigned long) arg;
|
||||
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
@ -364,7 +364,7 @@
|
||||
if (dc_lsize)
|
||||
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
|
||||
if (!cpu_icache_snoops_remote_store && scache_size)
|
||||
@@ -1704,6 +1718,17 @@ static void coherency_setup(void)
|
||||
@@ -1706,6 +1720,17 @@ static void coherency_setup(void)
|
||||
* silly idea of putting something else there ...
|
||||
*/
|
||||
switch (current_cpu_type()) {
|
||||
@ -382,7 +382,7 @@
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
@@ -1750,6 +1775,15 @@ void r4k_cache_init(void)
|
||||
@@ -1752,6 +1777,15 @@ void r4k_cache_init(void)
|
||||
extern void build_copy_page(void);
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
@ -398,7 +398,7 @@
|
||||
probe_pcache();
|
||||
setup_scache();
|
||||
|
||||
@@ -1819,7 +1853,15 @@ void r4k_cache_init(void)
|
||||
@@ -1821,7 +1855,15 @@ void r4k_cache_init(void)
|
||||
*/
|
||||
local_r4k___flush_cache_all(NULL);
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 27 Jul 2018 12:39:01 +0200
|
||||
Subject: [PATCH] Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe
|
||||
erratum"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 2a027b47dba6b77ab8c8e47b589ae9bbc5ac6175.
|
||||
|
||||
Enabling ExternalSync caused a regression for BCM4718A1 (used e.g. in
|
||||
Netgear E3000 and ASUS RT-N16): it simply hangs during PCIe
|
||||
initialization. It's likely that BCM4717A1 is also affected.
|
||||
|
||||
I didn't notice that earlier as the only BCM47XX devices with PCIe I
|
||||
own are:
|
||||
1) BCM4706 with 2 x 14e4:4331
|
||||
2) BCM4706 with 14e4:4360 and 14e4:4331
|
||||
it appears that BCM4706 is unaffected.
|
||||
|
||||
While BCM5300X-ES300-RDS.pdf seems to document that erratum and its
|
||||
workarounds (according to quotes provided by Tokunori) it seems not even
|
||||
Broadcom follows them.
|
||||
|
||||
According to the provided info Broadcom should define CONF7_ES in their
|
||||
SDK's mipsinc.h and implement workaround in the si_mips_init(). Checking
|
||||
both didn't reveal such code. It *could* mean Broadcom also had some
|
||||
problems with the given workaround.
|
||||
|
||||
Reported-by: Michael Marley <michael@michaelmarley.com>
|
||||
Cc: Tokunori Ikegami <ikegami@allied-telesis.co.jp>
|
||||
Cc: Paul Burton <paul.burton@mips.com>
|
||||
Cc: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
|
||||
Cc: stable@vger.kernel.org
|
||||
Cc: James Hogan <jhogan@kernel.org>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
arch/mips/bcm47xx/setup.c | 6 ------
|
||||
arch/mips/include/asm/mipsregs.h | 3 ---
|
||||
2 files changed, 9 deletions(-)
|
||||
|
||||
--- a/arch/mips/bcm47xx/setup.c
|
||||
+++ b/arch/mips/bcm47xx/setup.c
|
||||
@@ -249,12 +249,6 @@ static int __init bcm47xx_cpu_fixes(void
|
||||
*/
|
||||
if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
|
||||
cpu_wait = NULL;
|
||||
-
|
||||
- /*
|
||||
- * BCM47XX Erratum "R10: PCIe Transactions Periodically Fail"
|
||||
- * Enable ExternalSync for sync instruction to take effect
|
||||
- */
|
||||
- set_c0_config7(MIPS_CONF7_ES);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
--- a/arch/mips/include/asm/mipsregs.h
|
||||
+++ b/arch/mips/include/asm/mipsregs.h
|
||||
@@ -605,8 +605,6 @@
|
||||
#define MIPS_CONF7_WII (_ULCAST_(1) << 31)
|
||||
|
||||
#define MIPS_CONF7_RPS (_ULCAST_(1) << 2)
|
||||
-/* ExternalSync */
|
||||
-#define MIPS_CONF7_ES (_ULCAST_(1) << 8)
|
||||
|
||||
#define MIPS_CONF7_IAR (_ULCAST_(1) << 10)
|
||||
#define MIPS_CONF7_AR (_ULCAST_(1) << 16)
|
||||
@@ -2014,7 +2012,6 @@ __BUILD_SET_C0(status)
|
||||
__BUILD_SET_C0(cause)
|
||||
__BUILD_SET_C0(config)
|
||||
__BUILD_SET_C0(config5)
|
||||
-__BUILD_SET_C0(config7)
|
||||
__BUILD_SET_C0(intcontrol)
|
||||
__BUILD_SET_C0(intctl)
|
||||
__BUILD_SET_C0(srsmap)
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/pcmcia/yenta_socket.c
|
||||
+++ b/drivers/pcmcia/yenta_socket.c
|
||||
@@ -919,6 +919,8 @@ static unsigned int yenta_probe_irq(stru
|
||||
@@ -920,6 +920,8 @@ static unsigned int yenta_probe_irq(stru
|
||||
* Probe for usable interrupts using the force
|
||||
* register to generate bogus card status events.
|
||||
*/
|
||||
@ -9,7 +9,7 @@
|
||||
cb_writel(socket, CB_SOCKET_EVENT, -1);
|
||||
cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
|
||||
reg = exca_readb(socket, I365_CSCINT);
|
||||
@@ -934,6 +936,7 @@ static unsigned int yenta_probe_irq(stru
|
||||
@@ -935,6 +937,7 @@ static unsigned int yenta_probe_irq(stru
|
||||
}
|
||||
cb_writel(socket, CB_SOCKET_MASK, 0);
|
||||
exca_writeb(socket, I365_CSCINT, reg);
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
mask = probe_irq_mask(val) & 0xffff;
|
||||
|
||||
@@ -1018,6 +1021,10 @@ static void yenta_get_socket_capabilitie
|
||||
@@ -1019,6 +1022,10 @@ static void yenta_get_socket_capabilitie
|
||||
else
|
||||
socket->socket.irq_mask = 0;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
dev_info(&socket->dev->dev, "ISA IRQ mask 0x%04x, PCI irq %d\n",
|
||||
socket->socket.irq_mask, socket->cb_irq);
|
||||
}
|
||||
@@ -1250,6 +1257,15 @@ static int yenta_probe(struct pci_dev *d
|
||||
@@ -1251,6 +1258,15 @@ static int yenta_probe(struct pci_dev *d
|
||||
dev_info(&dev->dev, "Socket status: %08x\n",
|
||||
cb_readl(socket, CB_SOCKET_STATE));
|
||||
|
||||
|
@ -68,7 +68,7 @@ Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
spifi->nor.write = nxp_spifi_write;
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1120,7 +1120,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1126,7 +1126,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
const struct flash_info *info = NULL;
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -1835,13 +1835,13 @@ static struct sk_buff *smsc95xx_tx_fixup
|
||||
@@ -1838,13 +1838,13 @@ static struct sk_buff *smsc95xx_tx_fixup
|
||||
/* We do not advertise SG, so skbs should be already linearized */
|
||||
BUG_ON(skb_shinfo(skb)->nr_frags);
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -715,9 +715,9 @@ static const struct flash_info spi_nor_i
|
||||
@@ -721,9 +721,9 @@ static const struct flash_info spi_nor_i
|
||||
{ "mx25l4005a", INFO(0xc22013, 0, 64 * 1024, 8, SECT_4K) },
|
||||
{ "mx25l8005", INFO(0xc22014, 0, 64 * 1024, 16, 0) },
|
||||
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
|
||||
--- a/fs/ubifs/super.c
|
||||
+++ b/fs/ubifs/super.c
|
||||
@@ -2113,8 +2113,9 @@ static struct dentry *ubifs_mount(struct
|
||||
@@ -2116,8 +2116,9 @@ static struct dentry *ubifs_mount(struct
|
||||
*/
|
||||
ubi = open_ubi(name, UBI_READONLY);
|
||||
if (IS_ERR(ubi)) {
|
||||
|
@ -25,7 +25,7 @@ Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
||||
};
|
||||
|
||||
#define JEDEC_MFR(info) ((info)->id[0])
|
||||
@@ -1163,7 +1164,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1169,7 +1170,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
|
||||
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
|
||||
@ -35,7 +35,7 @@ Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
||||
write_enable(nor);
|
||||
write_sr(nor, 0);
|
||||
}
|
||||
@@ -1179,7 +1181,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1185,7 +1187,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
mtd->_read = spi_nor_read;
|
||||
|
||||
/* NOR protection support for STmicro/Micron chips and similar */
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 56656e960b555cb98bc414382566dcb59aae99a2 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@redhat.com>
|
||||
Date: Mon, 21 Mar 2016 17:31:46 +0100
|
||||
Subject: [PATCH] ovl: rename is_merge to is_lowest
|
||||
|
||||
The 'is_merge' is an historical naming from when only a single lower layer
|
||||
could exist. With the introduction of multiple lower layers the meaning of
|
||||
this flag was changed to mean only the "lowest layer" (while all lower
|
||||
layers were being merged).
|
||||
|
||||
So now 'is_merge' is inaccurate and hence renaming to 'is_lowest'
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
|
||||
---
|
||||
fs/overlayfs/readdir.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/fs/overlayfs/readdir.c
|
||||
+++ b/fs/overlayfs/readdir.c
|
||||
@@ -36,7 +36,7 @@ struct ovl_dir_cache {
|
||||
|
||||
struct ovl_readdir_data {
|
||||
struct dir_context ctx;
|
||||
- bool is_merge;
|
||||
+ bool is_lowest;
|
||||
struct rb_root root;
|
||||
struct list_head *list;
|
||||
struct list_head middle;
|
||||
@@ -140,9 +140,9 @@ static int ovl_cache_entry_add_rb(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int ovl_fill_lower(struct ovl_readdir_data *rdd,
|
||||
- const char *name, int namelen,
|
||||
- loff_t offset, u64 ino, unsigned int d_type)
|
||||
+static int ovl_fill_lowest(struct ovl_readdir_data *rdd,
|
||||
+ const char *name, int namelen,
|
||||
+ loff_t offset, u64 ino, unsigned int d_type)
|
||||
{
|
||||
struct ovl_cache_entry *p;
|
||||
|
||||
@@ -194,10 +194,10 @@ static int ovl_fill_merge(struct dir_con
|
||||
container_of(ctx, struct ovl_readdir_data, ctx);
|
||||
|
||||
rdd->count++;
|
||||
- if (!rdd->is_merge)
|
||||
+ if (!rdd->is_lowest)
|
||||
return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
|
||||
else
|
||||
- return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type);
|
||||
+ return ovl_fill_lowest(rdd, name, namelen, offset, ino, d_type);
|
||||
}
|
||||
|
||||
static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd)
|
||||
@@ -290,7 +290,7 @@ static int ovl_dir_read_merged(struct de
|
||||
.ctx.actor = ovl_fill_merge,
|
||||
.list = list,
|
||||
.root = RB_ROOT,
|
||||
- .is_merge = false,
|
||||
+ .is_lowest = false,
|
||||
};
|
||||
int idx, next;
|
||||
|
||||
@@ -307,7 +307,7 @@ static int ovl_dir_read_merged(struct de
|
||||
* allows offsets to be reasonably constant
|
||||
*/
|
||||
list_add(&rdd.middle, rdd.list);
|
||||
- rdd.is_merge = true;
|
||||
+ rdd.is_lowest = true;
|
||||
err = ovl_dir_read(&realpath, &rdd);
|
||||
list_del(&rdd.middle);
|
||||
}
|
@ -1,336 +0,0 @@
|
||||
From 3fe6e52f062643676eb4518d68cee3bc1272091b Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Murdaca <amurdaca@redhat.com>
|
||||
Date: Thu, 7 Apr 2016 15:48:25 +0200
|
||||
Subject: [PATCH] ovl: override creds with the ones from the superblock mounter
|
||||
|
||||
In user namespace the whiteout creation fails with -EPERM because the
|
||||
current process isn't capable(CAP_SYS_ADMIN) when setting xattr.
|
||||
|
||||
A simple reproducer:
|
||||
|
||||
$ mkdir upper lower work merged lower/dir
|
||||
$ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged
|
||||
$ unshare -m -p -f -U -r bash
|
||||
|
||||
Now as root in the user namespace:
|
||||
|
||||
\# touch merged/dir/{1,2,3} # this will force a copy up of lower/dir
|
||||
\# rm -fR merged/*
|
||||
|
||||
This ends up failing with -EPERM after the files in dir has been
|
||||
correctly deleted:
|
||||
|
||||
unlinkat(4, "2", 0) = 0
|
||||
unlinkat(4, "1", 0) = 0
|
||||
unlinkat(4, "3", 0) = 0
|
||||
close(4) = 0
|
||||
unlinkat(AT_FDCWD, "merged/dir", AT_REMOVEDIR) = -1 EPERM (Operation not
|
||||
permitted)
|
||||
|
||||
Interestingly, if you don't place files in merged/dir you can remove it,
|
||||
meaning if upper/dir does not exist, creating the char device file works
|
||||
properly in that same location.
|
||||
|
||||
This patch uses ovl_sb_creator_cred() to get the cred struct from the
|
||||
superblock mounter and override the old cred with these new ones so that
|
||||
the whiteout creation is possible because overlay is wrong in assuming that
|
||||
the creds it will get with prepare_creds will be in the initial user
|
||||
namespace. The old cap_raise game is removed in favor of just overriding
|
||||
the old cred struct.
|
||||
|
||||
This patch also drops from ovl_copy_up_one() the following two lines:
|
||||
|
||||
override_cred->fsuid = stat->uid;
|
||||
override_cred->fsgid = stat->gid;
|
||||
|
||||
This is because the correct uid and gid are taken directly with the stat
|
||||
struct and correctly set with ovl_set_attr().
|
||||
|
||||
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
|
||||
---
|
||||
fs/overlayfs/copy_up.c | 26 +------------------
|
||||
fs/overlayfs/dir.c | 67 ++++--------------------------------------------
|
||||
fs/overlayfs/overlayfs.h | 1 +
|
||||
fs/overlayfs/readdir.c | 14 +++-------
|
||||
fs/overlayfs/super.c | 18 ++++++++++++-
|
||||
5 files changed, 27 insertions(+), 99 deletions(-)
|
||||
|
||||
--- a/fs/overlayfs/copy_up.c
|
||||
+++ b/fs/overlayfs/copy_up.c
|
||||
@@ -317,7 +317,6 @@ int ovl_copy_up_one(struct dentry *paren
|
||||
struct dentry *upperdir;
|
||||
struct dentry *upperdentry;
|
||||
const struct cred *old_cred;
|
||||
- struct cred *override_cred;
|
||||
char *link = NULL;
|
||||
|
||||
if (WARN_ON(!workdir))
|
||||
@@ -336,28 +335,7 @@ int ovl_copy_up_one(struct dentry *paren
|
||||
return PTR_ERR(link);
|
||||
}
|
||||
|
||||
- err = -ENOMEM;
|
||||
- override_cred = prepare_creds();
|
||||
- if (!override_cred)
|
||||
- goto out_free_link;
|
||||
-
|
||||
- override_cred->fsuid = stat->uid;
|
||||
- override_cred->fsgid = stat->gid;
|
||||
- /*
|
||||
- * CAP_SYS_ADMIN for copying up extended attributes
|
||||
- * CAP_DAC_OVERRIDE for create
|
||||
- * CAP_FOWNER for chmod, timestamp update
|
||||
- * CAP_FSETID for chmod
|
||||
- * CAP_CHOWN for chown
|
||||
- * CAP_MKNOD for mknod
|
||||
- */
|
||||
- cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN);
|
||||
- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FOWNER);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FSETID);
|
||||
- cap_raise(override_cred->cap_effective, CAP_CHOWN);
|
||||
- cap_raise(override_cred->cap_effective, CAP_MKNOD);
|
||||
- old_cred = override_creds(override_cred);
|
||||
+ old_cred = ovl_override_creds(dentry->d_sb);
|
||||
|
||||
err = -EIO;
|
||||
if (lock_rename(workdir, upperdir) != NULL) {
|
||||
@@ -380,9 +358,7 @@ int ovl_copy_up_one(struct dentry *paren
|
||||
out_unlock:
|
||||
unlock_rename(workdir, upperdir);
|
||||
revert_creds(old_cred);
|
||||
- put_cred(override_cred);
|
||||
|
||||
-out_free_link:
|
||||
if (link)
|
||||
free_page((unsigned long) link);
|
||||
|
||||
--- a/fs/overlayfs/dir.c
|
||||
+++ b/fs/overlayfs/dir.c
|
||||
@@ -408,28 +408,13 @@ static int ovl_create_or_link(struct den
|
||||
err = ovl_create_upper(dentry, inode, &stat, link, hardlink);
|
||||
} else {
|
||||
const struct cred *old_cred;
|
||||
- struct cred *override_cred;
|
||||
|
||||
- err = -ENOMEM;
|
||||
- override_cred = prepare_creds();
|
||||
- if (!override_cred)
|
||||
- goto out_iput;
|
||||
-
|
||||
- /*
|
||||
- * CAP_SYS_ADMIN for setting opaque xattr
|
||||
- * CAP_DAC_OVERRIDE for create in workdir, rename
|
||||
- * CAP_FOWNER for removing whiteout from sticky dir
|
||||
- */
|
||||
- cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN);
|
||||
- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FOWNER);
|
||||
- old_cred = override_creds(override_cred);
|
||||
+ old_cred = ovl_override_creds(dentry->d_sb);
|
||||
|
||||
err = ovl_create_over_whiteout(dentry, inode, &stat, link,
|
||||
hardlink);
|
||||
|
||||
revert_creds(old_cred);
|
||||
- put_cred(override_cred);
|
||||
}
|
||||
|
||||
if (!err)
|
||||
@@ -659,32 +644,11 @@ static int ovl_do_remove(struct dentry *
|
||||
if (OVL_TYPE_PURE_UPPER(type)) {
|
||||
err = ovl_remove_upper(dentry, is_dir);
|
||||
} else {
|
||||
- const struct cred *old_cred;
|
||||
- struct cred *override_cred;
|
||||
-
|
||||
- err = -ENOMEM;
|
||||
- override_cred = prepare_creds();
|
||||
- if (!override_cred)
|
||||
- goto out_drop_write;
|
||||
-
|
||||
- /*
|
||||
- * CAP_SYS_ADMIN for setting xattr on whiteout, opaque dir
|
||||
- * CAP_DAC_OVERRIDE for create in workdir, rename
|
||||
- * CAP_FOWNER for removing whiteout from sticky dir
|
||||
- * CAP_FSETID for chmod of opaque dir
|
||||
- * CAP_CHOWN for chown of opaque dir
|
||||
- */
|
||||
- cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN);
|
||||
- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FOWNER);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FSETID);
|
||||
- cap_raise(override_cred->cap_effective, CAP_CHOWN);
|
||||
- old_cred = override_creds(override_cred);
|
||||
+ const struct cred *old_cred = ovl_override_creds(dentry->d_sb);
|
||||
|
||||
err = ovl_remove_and_whiteout(dentry, is_dir);
|
||||
|
||||
revert_creds(old_cred);
|
||||
- put_cred(override_cred);
|
||||
}
|
||||
out_drop_write:
|
||||
ovl_drop_write(dentry);
|
||||
@@ -723,7 +687,6 @@ static int ovl_rename2(struct inode *old
|
||||
bool new_is_dir = false;
|
||||
struct dentry *opaquedir = NULL;
|
||||
const struct cred *old_cred = NULL;
|
||||
- struct cred *override_cred = NULL;
|
||||
|
||||
err = -EINVAL;
|
||||
if (flags & ~(RENAME_EXCHANGE | RENAME_NOREPLACE))
|
||||
@@ -792,26 +755,8 @@ static int ovl_rename2(struct inode *old
|
||||
old_opaque = !OVL_TYPE_PURE_UPPER(old_type);
|
||||
new_opaque = !OVL_TYPE_PURE_UPPER(new_type);
|
||||
|
||||
- if (old_opaque || new_opaque) {
|
||||
- err = -ENOMEM;
|
||||
- override_cred = prepare_creds();
|
||||
- if (!override_cred)
|
||||
- goto out_drop_write;
|
||||
-
|
||||
- /*
|
||||
- * CAP_SYS_ADMIN for setting xattr on whiteout, opaque dir
|
||||
- * CAP_DAC_OVERRIDE for create in workdir
|
||||
- * CAP_FOWNER for removing whiteout from sticky dir
|
||||
- * CAP_FSETID for chmod of opaque dir
|
||||
- * CAP_CHOWN for chown of opaque dir
|
||||
- */
|
||||
- cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN);
|
||||
- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FOWNER);
|
||||
- cap_raise(override_cred->cap_effective, CAP_FSETID);
|
||||
- cap_raise(override_cred->cap_effective, CAP_CHOWN);
|
||||
- old_cred = override_creds(override_cred);
|
||||
- }
|
||||
+ if (old_opaque || new_opaque)
|
||||
+ old_cred = ovl_override_creds(old->d_sb);
|
||||
|
||||
if (overwrite && OVL_TYPE_MERGE_OR_LOWER(new_type) && new_is_dir) {
|
||||
opaquedir = ovl_check_empty_and_clear(new);
|
||||
@@ -942,10 +887,8 @@ out_dput_old:
|
||||
out_unlock:
|
||||
unlock_rename(new_upperdir, old_upperdir);
|
||||
out_revert_creds:
|
||||
- if (old_opaque || new_opaque) {
|
||||
+ if (old_opaque || new_opaque)
|
||||
revert_creds(old_cred);
|
||||
- put_cred(override_cred);
|
||||
- }
|
||||
out_drop_write:
|
||||
ovl_drop_write(old);
|
||||
out:
|
||||
--- a/fs/overlayfs/overlayfs.h
|
||||
+++ b/fs/overlayfs/overlayfs.h
|
||||
@@ -150,6 +150,7 @@ void ovl_drop_write(struct dentry *dentr
|
||||
bool ovl_dentry_is_opaque(struct dentry *dentry);
|
||||
void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque);
|
||||
bool ovl_is_whiteout(struct dentry *dentry);
|
||||
+const struct cred *ovl_override_creds(struct super_block *sb);
|
||||
void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry);
|
||||
struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
|
||||
unsigned int flags);
|
||||
--- a/fs/overlayfs/readdir.c
|
||||
+++ b/fs/overlayfs/readdir.c
|
||||
@@ -36,6 +36,7 @@ struct ovl_dir_cache {
|
||||
|
||||
struct ovl_readdir_data {
|
||||
struct dir_context ctx;
|
||||
+ struct dentry *dentry;
|
||||
bool is_lowest;
|
||||
struct rb_root root;
|
||||
struct list_head *list;
|
||||
@@ -206,17 +207,8 @@ static int ovl_check_whiteouts(struct de
|
||||
struct ovl_cache_entry *p;
|
||||
struct dentry *dentry;
|
||||
const struct cred *old_cred;
|
||||
- struct cred *override_cred;
|
||||
-
|
||||
- override_cred = prepare_creds();
|
||||
- if (!override_cred)
|
||||
- return -ENOMEM;
|
||||
|
||||
- /*
|
||||
- * CAP_DAC_OVERRIDE for lookup
|
||||
- */
|
||||
- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
|
||||
- old_cred = override_creds(override_cred);
|
||||
+ old_cred = ovl_override_creds(rdd->dentry->d_sb);
|
||||
|
||||
err = mutex_lock_killable(&dir->d_inode->i_mutex);
|
||||
if (!err) {
|
||||
@@ -232,7 +224,6 @@ static int ovl_check_whiteouts(struct de
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
}
|
||||
revert_creds(old_cred);
|
||||
- put_cred(override_cred);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -288,6 +279,7 @@ static int ovl_dir_read_merged(struct de
|
||||
struct path realpath;
|
||||
struct ovl_readdir_data rdd = {
|
||||
.ctx.actor = ovl_fill_merge,
|
||||
+ .dentry = dentry,
|
||||
.list = list,
|
||||
.root = RB_ROOT,
|
||||
.is_lowest = false,
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -42,6 +42,8 @@ struct ovl_fs {
|
||||
long lower_namelen;
|
||||
/* pathnames of lower and upper dirs, for show_options */
|
||||
struct ovl_config config;
|
||||
+ /* creds of process who forced instantiation of super block */
|
||||
+ const struct cred *creator_cred;
|
||||
};
|
||||
|
||||
struct ovl_dir_cache;
|
||||
@@ -246,6 +248,13 @@ bool ovl_is_whiteout(struct dentry *dent
|
||||
return inode && IS_WHITEOUT(inode);
|
||||
}
|
||||
|
||||
+const struct cred *ovl_override_creds(struct super_block *sb)
|
||||
+{
|
||||
+ struct ovl_fs *ofs = sb->s_fs_info;
|
||||
+
|
||||
+ return override_creds(ofs->creator_cred);
|
||||
+}
|
||||
+
|
||||
static bool ovl_is_opaquedir(struct dentry *dentry)
|
||||
{
|
||||
int res;
|
||||
@@ -587,6 +596,7 @@ static void ovl_put_super(struct super_b
|
||||
kfree(ufs->config.lowerdir);
|
||||
kfree(ufs->config.upperdir);
|
||||
kfree(ufs->config.workdir);
|
||||
+ put_cred(ufs->creator_cred);
|
||||
kfree(ufs);
|
||||
}
|
||||
|
||||
@@ -1107,10 +1117,14 @@ static int ovl_fill_super(struct super_b
|
||||
else
|
||||
sb->s_d_op = &ovl_dentry_operations;
|
||||
|
||||
+ ufs->creator_cred = prepare_creds();
|
||||
+ if (!ufs->creator_cred)
|
||||
+ goto out_put_lower_mnt;
|
||||
+
|
||||
err = -ENOMEM;
|
||||
oe = ovl_alloc_entry(numlower);
|
||||
if (!oe)
|
||||
- goto out_put_lower_mnt;
|
||||
+ goto out_put_cred;
|
||||
|
||||
root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, oe));
|
||||
if (!root_dentry)
|
||||
@@ -1143,6 +1157,8 @@ static int ovl_fill_super(struct super_b
|
||||
|
||||
out_free_oe:
|
||||
kfree(oe);
|
||||
+out_put_cred:
|
||||
+ put_cred(ufs->creator_cred);
|
||||
out_put_lower_mnt:
|
||||
for (i = 0; i < ufs->numlower; i++)
|
||||
mntput(ufs->lower_mnt[i]);
|
@ -1,131 +0,0 @@
|
||||
From eea2fb4851e9dcbab6b991aaf47e2e024f1f55a0 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Szeredi <mszeredi@redhat.com>
|
||||
Date: Thu, 1 Sep 2016 11:11:59 +0200
|
||||
Subject: [PATCH] ovl: proper cleanup of workdir
|
||||
|
||||
When mounting overlayfs it needs a clean "work" directory under the
|
||||
supplied workdir.
|
||||
|
||||
Previously the mount code removed this directory if it already existed and
|
||||
created a new one. If the removal failed (e.g. directory was not empty)
|
||||
then it fell back to a read-only mount not using the workdir.
|
||||
|
||||
While this has never been reported, it is possible to get a non-empty
|
||||
"work" dir from a previous mount of overlayfs in case of crash in the
|
||||
middle of an operation using the work directory.
|
||||
|
||||
In this case the left over state should be discarded and the overlay
|
||||
filesystem will be consistent, guaranteed by the atomicity of operations on
|
||||
moving to/from the workdir to the upper layer.
|
||||
|
||||
This patch implements cleaning out any files left in workdir. It is
|
||||
implemented using real recursion for simplicity, but the depth is limited
|
||||
to 2, because the worst case is that of a directory containing whiteouts
|
||||
under "work".
|
||||
|
||||
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
---
|
||||
fs/overlayfs/overlayfs.h | 2 ++
|
||||
fs/overlayfs/readdir.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
fs/overlayfs/super.c | 2 +-
|
||||
3 files changed, 65 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/fs/overlayfs/overlayfs.h
|
||||
+++ b/fs/overlayfs/overlayfs.h
|
||||
@@ -165,6 +165,8 @@ int ovl_check_empty_dir(struct dentry *d
|
||||
void ovl_cleanup_whiteouts(struct dentry *upper, struct list_head *list);
|
||||
void ovl_cache_free(struct list_head *list);
|
||||
int ovl_check_d_type_supported(struct path *realpath);
|
||||
+void ovl_workdir_cleanup(struct inode *dir, struct vfsmount *mnt,
|
||||
+ struct dentry *dentry, int level);
|
||||
|
||||
/* inode.c */
|
||||
int ovl_setattr(struct dentry *dentry, struct iattr *attr);
|
||||
--- a/fs/overlayfs/readdir.c
|
||||
+++ b/fs/overlayfs/readdir.c
|
||||
@@ -248,7 +248,7 @@ static inline int ovl_dir_read(struct pa
|
||||
err = rdd->err;
|
||||
} while (!err && rdd->count);
|
||||
|
||||
- if (!err && rdd->first_maybe_whiteout)
|
||||
+ if (!err && rdd->first_maybe_whiteout && rdd->dentry)
|
||||
err = ovl_check_whiteouts(realpath->dentry, rdd);
|
||||
|
||||
fput(realfile);
|
||||
@@ -610,3 +610,64 @@ int ovl_check_d_type_supported(struct pa
|
||||
|
||||
return rdd.d_type_supported;
|
||||
}
|
||||
+
|
||||
+static void ovl_workdir_cleanup_recurse(struct path *path, int level)
|
||||
+{
|
||||
+ int err;
|
||||
+ struct inode *dir = path->dentry->d_inode;
|
||||
+ LIST_HEAD(list);
|
||||
+ struct ovl_cache_entry *p;
|
||||
+ struct ovl_readdir_data rdd = {
|
||||
+ .ctx.actor = ovl_fill_merge,
|
||||
+ .dentry = NULL,
|
||||
+ .list = &list,
|
||||
+ .root = RB_ROOT,
|
||||
+ .is_lowest = false,
|
||||
+ };
|
||||
+
|
||||
+ err = ovl_dir_read(path, &rdd);
|
||||
+ if (err)
|
||||
+ goto out;
|
||||
+
|
||||
+ mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
||||
+ list_for_each_entry(p, &list, l_node) {
|
||||
+ struct dentry *dentry;
|
||||
+
|
||||
+ if (p->name[0] == '.') {
|
||||
+ if (p->len == 1)
|
||||
+ continue;
|
||||
+ if (p->len == 2 && p->name[1] == '.')
|
||||
+ continue;
|
||||
+ }
|
||||
+ dentry = lookup_one_len(p->name, path->dentry, p->len);
|
||||
+ if (IS_ERR(dentry))
|
||||
+ continue;
|
||||
+ if (dentry->d_inode)
|
||||
+ ovl_workdir_cleanup(dir, path->mnt, dentry, level);
|
||||
+ dput(dentry);
|
||||
+ }
|
||||
+ mutex_unlock(&dir->i_mutex);
|
||||
+out:
|
||||
+ ovl_cache_free(&list);
|
||||
+}
|
||||
+
|
||||
+void ovl_workdir_cleanup(struct inode *dir, struct vfsmount *mnt,
|
||||
+ struct dentry *dentry, int level)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ if (!d_is_dir(dentry) || level > 1) {
|
||||
+ ovl_cleanup(dir, dentry);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ err = ovl_do_rmdir(dir, dentry);
|
||||
+ if (err) {
|
||||
+ struct path path = { .mnt = mnt, .dentry = dentry };
|
||||
+
|
||||
+ mutex_unlock(&dir->i_mutex);
|
||||
+ ovl_workdir_cleanup_recurse(&path, level + 1);
|
||||
+ mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
|
||||
+ ovl_cleanup(dir, dentry);
|
||||
+ }
|
||||
+}
|
||||
--- a/fs/overlayfs/super.c
|
||||
+++ b/fs/overlayfs/super.c
|
||||
@@ -784,7 +784,7 @@ retry:
|
||||
goto out_dput;
|
||||
|
||||
retried = true;
|
||||
- ovl_cleanup(dir, work);
|
||||
+ ovl_workdir_cleanup(dir, mnt, work, 0);
|
||||
dput(work);
|
||||
goto retry;
|
||||
}
|
@ -244,7 +244,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
.setxattr = ubifs_setxattr,
|
||||
--- a/fs/ubifs/journal.c
|
||||
+++ b/fs/ubifs/journal.c
|
||||
@@ -917,14 +917,15 @@ int ubifs_jnl_delete_inode(struct ubifs_
|
||||
@@ -922,14 +922,15 @@ int ubifs_jnl_delete_inode(struct ubifs_
|
||||
* @sync: non-zero if the write-buffer has to be synchronized
|
||||
*
|
||||
* This function implements the re-name operation which may involve writing up
|
||||
@ -262,7 +262,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
{
|
||||
void *p;
|
||||
union ubifs_key key;
|
||||
@@ -980,13 +981,19 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
@@ -985,13 +986,19 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
zero_dent_node_unused(dent);
|
||||
ubifs_prep_grp_node(c, dent, dlen1, 0);
|
||||
|
||||
@ -285,7 +285,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
dent2->nlen = cpu_to_le16(old_dentry->d_name.len);
|
||||
memcpy(dent2->name, old_dentry->d_name.name, old_dentry->d_name.len);
|
||||
dent2->name[old_dentry->d_name.len] = '\0';
|
||||
@@ -1035,16 +1042,26 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
@@ -1040,16 +1047,26 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
if (err)
|
||||
goto out_ro;
|
||||
|
||||
|
@ -104,7 +104,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
.setxattr = ubifs_setxattr,
|
||||
--- a/fs/ubifs/journal.c
|
||||
+++ b/fs/ubifs/journal.c
|
||||
@@ -908,6 +908,147 @@ int ubifs_jnl_delete_inode(struct ubifs_
|
||||
@@ -913,6 +913,147 @@ int ubifs_jnl_delete_inode(struct ubifs_
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
|
||||
--- a/fs/ubifs/journal.c
|
||||
+++ b/fs/ubifs/journal.c
|
||||
@@ -1100,7 +1100,7 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
@@ -1105,7 +1105,7 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
aligned_dlen1 = ALIGN(dlen1, 8);
|
||||
aligned_dlen2 = ALIGN(dlen2, 8);
|
||||
len = aligned_dlen1 + aligned_dlen2 + ALIGN(ilen, 8) + ALIGN(plen, 8);
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
len += plen;
|
||||
dent = kmalloc(len, GFP_NOFS);
|
||||
if (!dent)
|
||||
@@ -1216,7 +1216,7 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
@@ -1221,7 +1221,7 @@ int ubifs_jnl_rename(struct ubifs_info *
|
||||
if (err)
|
||||
goto out_ro;
|
||||
|
||||
|
@ -131,7 +131,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <linux/scatterlist.h>
|
||||
@@ -469,6 +470,7 @@ struct usb_device *usb_alloc_dev(struct
|
||||
@@ -471,6 +472,7 @@ struct usb_device *usb_alloc_dev(struct
|
||||
dev->route = 0;
|
||||
|
||||
dev->dev.parent = bus->controller;
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
dev_set_name(&dev->dev, "usb%d", bus->busnum);
|
||||
root_hub = 1;
|
||||
} else {
|
||||
@@ -493,6 +495,14 @@ struct usb_device *usb_alloc_dev(struct
|
||||
@@ -495,6 +497,14 @@ struct usb_device *usb_alloc_dev(struct
|
||||
dev->dev.parent = &parent->dev;
|
||||
dev_set_name(&dev->dev, "%d-%s", bus->busnum, dev->devpath);
|
||||
|
||||
|
@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/usb/core/usb.c
|
||||
+++ b/drivers/usb/core/usb.c
|
||||
@@ -423,6 +423,7 @@ struct usb_device *usb_alloc_dev(struct
|
||||
@@ -425,6 +425,7 @@ struct usb_device *usb_alloc_dev(struct
|
||||
struct usb_device *dev;
|
||||
struct usb_hcd *usb_hcd = bus_to_hcd(bus);
|
||||
unsigned root_hub = 0;
|
||||
@ -92,7 +92,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
@@ -497,11 +498,11 @@ struct usb_device *usb_alloc_dev(struct
|
||||
@@ -499,11 +500,11 @@ struct usb_device *usb_alloc_dev(struct
|
||||
|
||||
if (!parent->parent) {
|
||||
/* device under root hub's port */
|
||||
|
@ -58,7 +58,7 @@ Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
|
||||
|
||||
/**
|
||||
* led_classdev_unregister - unregisters a object of led_properties class.
|
||||
@@ -269,12 +273,14 @@ static void devm_led_classdev_release(st
|
||||
@@ -270,12 +274,14 @@ static void devm_led_classdev_release(st
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
|
||||
{
|
||||
struct led_classdev **dr;
|
||||
int rc;
|
||||
@@ -283,7 +289,7 @@ int devm_led_classdev_register(struct de
|
||||
@@ -284,7 +290,7 @@ int devm_led_classdev_register(struct de
|
||||
if (!dr)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
|
||||
if (rc) {
|
||||
devres_free(dr);
|
||||
return rc;
|
||||
@@ -294,7 +300,7 @@ int devm_led_classdev_register(struct de
|
||||
@@ -295,7 +301,7 @@ int devm_led_classdev_register(struct de
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
|
||||
|
||||
--- a/drivers/thermal/of-thermal.c
|
||||
+++ b/drivers/thermal/of-thermal.c
|
||||
@@ -559,6 +559,87 @@ void thermal_zone_of_sensor_unregister(s
|
||||
@@ -562,6 +562,87 @@ void thermal_zone_of_sensor_unregister(s
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(thermal_zone_of_sensor_unregister);
|
||||
|
||||
|
@ -256,7 +256,7 @@ Cc: linux-mips@linux-mips.org
|
||||
instruction_hazard();
|
||||
}
|
||||
|
||||
@@ -823,7 +901,12 @@ static void local_r4k_flush_cache_sigtra
|
||||
@@ -825,7 +903,12 @@ static void local_r4k_flush_cache_sigtra
|
||||
|
||||
static void r4k_flush_cache_sigtramp(unsigned long addr)
|
||||
{
|
||||
@ -270,7 +270,7 @@ Cc: linux-mips@linux-mips.org
|
||||
}
|
||||
|
||||
static void r4k_flush_icache_all(void)
|
||||
@@ -837,6 +920,15 @@ struct flush_kernel_vmap_range_args {
|
||||
@@ -839,6 +922,15 @@ struct flush_kernel_vmap_range_args {
|
||||
int size;
|
||||
};
|
||||
|
||||
@ -286,7 +286,7 @@ Cc: linux-mips@linux-mips.org
|
||||
static inline void local_r4k_flush_kernel_vmap_range(void *args)
|
||||
{
|
||||
struct flush_kernel_vmap_range_args *vmra = args;
|
||||
@@ -847,12 +939,8 @@ static inline void local_r4k_flush_kerne
|
||||
@@ -849,12 +941,8 @@ static inline void local_r4k_flush_kerne
|
||||
* Aliases only affect the primary caches so don't bother with
|
||||
* S-caches or T-caches.
|
||||
*/
|
||||
@ -301,7 +301,7 @@ Cc: linux-mips@linux-mips.org
|
||||
}
|
||||
|
||||
static void r4k_flush_kernel_vmap_range(unsigned long vaddr, int size)
|
||||
@@ -862,7 +950,12 @@ static void r4k_flush_kernel_vmap_range(
|
||||
@@ -864,7 +952,12 @@ static void r4k_flush_kernel_vmap_range(
|
||||
args.vaddr = (unsigned long) vaddr;
|
||||
args.size = size;
|
||||
|
||||
|
@ -36,7 +36,7 @@ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
||||
|
||||
--- a/arch/mips/ath79/setup.c
|
||||
+++ b/arch/mips/ath79/setup.c
|
||||
@@ -207,6 +207,8 @@ void __init plat_mem_setup(void)
|
||||
@@ -208,6 +208,8 @@ void __init plat_mem_setup(void)
|
||||
fdt_start = fw_getenvl("fdt_start");
|
||||
if (fdt_start)
|
||||
__dt_setup_arch((void *)KSEG0ADDR(fdt_start));
|
||||
|
@ -112,7 +112,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
!list_empty(&ep->queue) && ep->td_dma)
|
||||
restart_dma(ep);
|
||||
ep->wedged = 0;
|
||||
@@ -2394,7 +2394,7 @@ static int net2280_start(struct usb_gadg
|
||||
@@ -2397,7 +2397,7 @@ static int net2280_start(struct usb_gadg
|
||||
*/
|
||||
net2280_led_active(dev, 1);
|
||||
|
||||
@ -121,7 +121,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
defect7374_enable_data_eps_zero(dev);
|
||||
|
||||
ep0_start(dev);
|
||||
@@ -3060,7 +3060,7 @@ static void handle_stat0_irqs(struct net
|
||||
@@ -3066,7 +3066,7 @@ static void handle_stat0_irqs(struct net
|
||||
}
|
||||
ep->stopped = 0;
|
||||
dev->protocol_stall = 0;
|
||||
@ -130,7 +130,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
if (ep->dev->quirks & PLX_2280)
|
||||
tmp = BIT(FIFO_OVERFLOW) |
|
||||
BIT(FIFO_UNDERFLOW);
|
||||
@@ -3087,7 +3087,7 @@ static void handle_stat0_irqs(struct net
|
||||
@@ -3093,7 +3093,7 @@ static void handle_stat0_irqs(struct net
|
||||
cpu_to_le32s(&u.raw[0]);
|
||||
cpu_to_le32s(&u.raw[1]);
|
||||
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
defect7374_workaround(dev, u.r);
|
||||
|
||||
tmp = 0;
|
||||
@@ -3170,7 +3170,7 @@ static void handle_stat0_irqs(struct net
|
||||
@@ -3176,7 +3176,7 @@ static void handle_stat0_irqs(struct net
|
||||
} else {
|
||||
ep_vdbg(dev, "%s clear halt\n", e->ep.name);
|
||||
clear_halt(e);
|
||||
@ -148,7 +148,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
!list_empty(&e->queue) && e->td_dma)
|
||||
restart_dma(e);
|
||||
}
|
||||
@@ -3192,7 +3192,7 @@ static void handle_stat0_irqs(struct net
|
||||
@@ -3198,7 +3198,7 @@ static void handle_stat0_irqs(struct net
|
||||
if (e->ep.name == ep0name)
|
||||
goto do_stall;
|
||||
set_halt(e);
|
||||
@ -157,7 +157,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
abort_dma(e);
|
||||
allow_status(ep);
|
||||
ep_vdbg(dev, "%s set halt\n", ep->ep.name);
|
||||
@@ -3231,7 +3231,7 @@ do_stall:
|
||||
@@ -3237,7 +3237,7 @@ do_stall:
|
||||
#undef w_length
|
||||
|
||||
next_endpoints:
|
||||
@ -166,7 +166,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
u32 mask = (BIT(ENDPOINT_0_INTERRUPT) |
|
||||
USB3380_IRQSTAT0_EP_INTR_MASK_IN |
|
||||
USB3380_IRQSTAT0_EP_INTR_MASK_OUT);
|
||||
@@ -3392,7 +3392,7 @@ static void handle_stat1_irqs(struct net
|
||||
@@ -3404,7 +3404,7 @@ __acquires(dev->lock)
|
||||
writel(tmp, &dma->dmastat);
|
||||
|
||||
/* dma sync*/
|
||||
@ -175,7 +175,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
u32 r_dmacount = readl(&dma->dmacount);
|
||||
if (!ep->is_in && (r_dmacount & 0x00FFFFFF) &&
|
||||
(tmp & BIT(DMA_TRANSACTION_DONE_INTERRUPT)))
|
||||
@@ -3461,7 +3461,7 @@ static irqreturn_t net2280_irq(int irq,
|
||||
@@ -3473,7 +3473,7 @@ static irqreturn_t net2280_irq(int irq,
|
||||
/* control requests and PIO */
|
||||
handle_stat0_irqs(dev, readl(&dev->regs->irqstat0));
|
||||
|
||||
@ -184,7 +184,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
/* re-enable interrupt to trigger any possible new interrupt */
|
||||
u32 pciirqenb1 = readl(&dev->regs->pciirqenb1);
|
||||
writel(pciirqenb1 & 0x7FFFFFFF, &dev->regs->pciirqenb1);
|
||||
@@ -3506,7 +3506,7 @@ static void net2280_remove(struct pci_de
|
||||
@@ -3518,7 +3518,7 @@ static void net2280_remove(struct pci_de
|
||||
}
|
||||
if (dev->got_irq)
|
||||
free_irq(pdev->irq, dev);
|
||||
@ -193,7 +193,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
pci_disable_msi(pdev);
|
||||
if (dev->regs)
|
||||
iounmap(dev->regs);
|
||||
@@ -3586,7 +3586,7 @@ static int net2280_probe(struct pci_dev
|
||||
@@ -3598,7 +3598,7 @@ static int net2280_probe(struct pci_dev
|
||||
dev->dep = (struct net2280_dep_regs __iomem *) (base + 0x0200);
|
||||
dev->epregs = (struct net2280_ep_regs __iomem *) (base + 0x0300);
|
||||
|
||||
@ -202,7 +202,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
u32 fsmvalue;
|
||||
u32 usbstat;
|
||||
dev->usb_ext = (struct usb338x_usb_ext_regs __iomem *)
|
||||
@@ -3630,7 +3630,7 @@ static int net2280_probe(struct pci_dev
|
||||
@@ -3642,7 +3642,7 @@ static int net2280_probe(struct pci_dev
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
if (pci_enable_msi(pdev))
|
||||
ep_err(dev, "Failed to enable MSI mode\n");
|
||||
|
||||
@@ -3748,10 +3748,19 @@ static const struct pci_device_id pci_id
|
||||
@@ -3760,10 +3760,19 @@ static const struct pci_device_id pci_id
|
||||
.class = ((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
|
||||
.class_mask = ~0,
|
||||
.vendor = PCI_VENDOR_ID_PLX,
|
||||
@ -232,7 +232,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
},
|
||||
{
|
||||
.class = ((PCI_CLASS_SERIAL_USB << 8) | 0xfe),
|
||||
@@ -3760,7 +3769,7 @@ static const struct pci_device_id pci_id
|
||||
@@ -3772,7 +3781,7 @@ static const struct pci_device_id pci_id
|
||||
.device = 0x3382,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -628,12 +628,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
|
||||
@@ -639,12 +639,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
-KBUILD_CFLAGS += -Os
|
||||
+KBUILD_CFLAGS += -Os $(EXTRA_OPTIMIZATION)
|
||||
-KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
|
||||
+KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) $(EXTRA_OPTIMIZATION)
|
||||
else
|
||||
ifdef CONFIG_PROFILE_ALL_BRANCHES
|
||||
-KBUILD_CFLAGS += -O2
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -405,7 +405,7 @@ KBUILD_CFLAGS_KERNEL :=
|
||||
@@ -400,7 +400,7 @@ KBUILD_CFLAGS_KERNEL :=
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE)
|
||||
KBUILD_AFLAGS_MODULE := -DMODULE
|
||||
KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
|
@ -54,7 +54,7 @@
|
||||
}
|
||||
--- a/scripts/Makefile.build
|
||||
+++ b/scripts/Makefile.build
|
||||
@@ -372,7 +372,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
|
||||
@@ -380,7 +380,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
|
||||
# Linker scripts preprocessor (.lds.S -> .lds)
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_cpp_lds_S = LDS $@
|
||||
|
@ -86,21 +86,21 @@ v2: incorporated changes suggested by Jonas Gorski
|
||||
extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
|
||||
struct mips_fpu_struct *ctx, int has_fpu,
|
||||
void *__user *fault_addr);
|
||||
+#else /* no CONFIG_MIPS_FPU_EMULATOR */
|
||||
+#else /* no CONFIG_MIPS_FPU_EMULATOR */
|
||||
+static inline int do_dsemulret(struct pt_regs *xcp)
|
||||
+{
|
||||
+ return 0; /* 0 means error, should never get here anyway */
|
||||
+ return 0; /* 0 means error, should never get here anyway */
|
||||
+}
|
||||
+
|
||||
+static inline int fpu_emulator_cop1Handler(struct pt_regs *xcp,
|
||||
+ struct mips_fpu_struct *ctx, int has_fpu,
|
||||
+ void *__user *fault_addr)
|
||||
+ struct mips_fpu_struct *ctx, int has_fpu,
|
||||
+ void *__user *fault_addr)
|
||||
+{
|
||||
+ *fault_addr = NULL;
|
||||
+ return SIGILL; /* we don't speak MIPS FPU */
|
||||
+ return SIGILL; /* we don't speak MIPS FPU */
|
||||
+}
|
||||
+#endif /* CONFIG_MIPS_FPU_EMULATOR */
|
||||
+#endif /* CONFIG_MIPS_FPU_EMULATOR */
|
||||
+
|
||||
void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
|
||||
struct task_struct *tsk);
|
||||
int process_fpemu_return(int sig, void __user *fault_addr,
|
||||
unsigned long fcr31);
|
||||
int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
|
||||
|
@ -210,7 +210,7 @@ Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
|
||||
/*
|
||||
* The generic kexec code builds a page list with physical
|
||||
@@ -98,15 +210,16 @@ machine_kexec(struct kimage *image)
|
||||
@@ -101,15 +213,16 @@ machine_kexec(struct kimage *image)
|
||||
/*
|
||||
* we do not want to be bothered.
|
||||
*/
|
||||
|
@ -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
|
||||
@@ -1166,6 +1166,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1172,6 +1172,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
if (JEDEC_MFR(info) == SNOR_MFR_ATMEL ||
|
||||
JEDEC_MFR(info) == SNOR_MFR_INTEL ||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -725,6 +725,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -731,6 +731,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -722,6 +722,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -728,6 +728,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
|
@ -206,7 +206,7 @@
|
||||
+}
|
||||
--- a/fs/jffs2/super.c
|
||||
+++ b/fs/jffs2/super.c
|
||||
@@ -375,14 +375,41 @@ static int __init init_jffs2_fs(void)
|
||||
@@ -373,14 +373,41 @@ static int __init init_jffs2_fs(void)
|
||||
BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68);
|
||||
BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32);
|
||||
|
||||
|
@ -172,7 +172,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
if (err)
|
||||
break;
|
||||
}
|
||||
@@ -1432,7 +1458,8 @@ br_multicast_leave_group(struct net_brid
|
||||
@@ -1439,7 +1465,8 @@ br_multicast_leave_group(struct net_brid
|
||||
struct net_bridge_port *port,
|
||||
struct br_ip *group,
|
||||
struct bridge_mcast_other_query *other_query,
|
||||
@ -182,7 +182,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
{
|
||||
struct net_bridge_mdb_htable *mdb;
|
||||
struct net_bridge_mdb_entry *mp;
|
||||
@@ -1456,7 +1483,7 @@ br_multicast_leave_group(struct net_brid
|
||||
@@ -1463,7 +1490,7 @@ br_multicast_leave_group(struct net_brid
|
||||
for (pp = &mp->ports;
|
||||
(p = mlock_dereference(*pp, br)) != NULL;
|
||||
pp = &p->next) {
|
||||
@ -191,7 +191,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
continue;
|
||||
|
||||
rcu_assign_pointer(*pp, p->next);
|
||||
@@ -1519,7 +1546,7 @@ br_multicast_leave_group(struct net_brid
|
||||
@@ -1526,7 +1553,7 @@ br_multicast_leave_group(struct net_brid
|
||||
for (p = mlock_dereference(mp->ports, br);
|
||||
p != NULL;
|
||||
p = mlock_dereference(p->next, br)) {
|
||||
@ -200,7 +200,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
continue;
|
||||
|
||||
if (!hlist_unhashed(&p->mglist) &&
|
||||
@@ -1537,8 +1564,8 @@ out:
|
||||
@@ -1544,8 +1571,8 @@ out:
|
||||
|
||||
static void br_ip4_multicast_leave_group(struct net_bridge *br,
|
||||
struct net_bridge_port *port,
|
||||
@ -211,7 +211,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
{
|
||||
struct br_ip br_group;
|
||||
struct bridge_mcast_own_query *own_query;
|
||||
@@ -1553,14 +1580,14 @@ static void br_ip4_multicast_leave_group
|
||||
@@ -1560,14 +1587,14 @@ static void br_ip4_multicast_leave_group
|
||||
br_group.vid = vid;
|
||||
|
||||
br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query,
|
||||
@ -228,7 +228,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
{
|
||||
struct br_ip br_group;
|
||||
struct bridge_mcast_own_query *own_query;
|
||||
@@ -1575,7 +1602,7 @@ static void br_ip6_multicast_leave_group
|
||||
@@ -1582,7 +1609,7 @@ static void br_ip6_multicast_leave_group
|
||||
br_group.vid = vid;
|
||||
|
||||
br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query,
|
||||
@ -237,7 +237,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1584,6 +1611,7 @@ static int br_multicast_ipv4_rcv(struct
|
||||
@@ -1591,6 +1618,7 @@ static int br_multicast_ipv4_rcv(struct
|
||||
struct sk_buff *skb,
|
||||
u16 vid)
|
||||
{
|
||||
@ -245,7 +245,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
struct sk_buff *skb_trimmed = NULL;
|
||||
struct igmphdr *ih;
|
||||
int err;
|
||||
@@ -1600,12 +1628,13 @@ static int br_multicast_ipv4_rcv(struct
|
||||
@@ -1607,12 +1635,13 @@ static int br_multicast_ipv4_rcv(struct
|
||||
|
||||
BR_INPUT_SKB_CB(skb)->igmp = 1;
|
||||
ih = igmp_hdr(skb);
|
||||
@ -260,7 +260,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
break;
|
||||
case IGMPV3_HOST_MEMBERSHIP_REPORT:
|
||||
err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid);
|
||||
@@ -1614,7 +1643,7 @@ static int br_multicast_ipv4_rcv(struct
|
||||
@@ -1621,7 +1650,7 @@ static int br_multicast_ipv4_rcv(struct
|
||||
err = br_ip4_multicast_query(br, port, skb_trimmed, vid);
|
||||
break;
|
||||
case IGMP_HOST_LEAVE_MESSAGE:
|
||||
@ -269,7 +269,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1630,6 +1659,7 @@ static int br_multicast_ipv6_rcv(struct
|
||||
@@ -1637,6 +1666,7 @@ static int br_multicast_ipv6_rcv(struct
|
||||
struct sk_buff *skb,
|
||||
u16 vid)
|
||||
{
|
||||
@ -277,7 +277,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
struct sk_buff *skb_trimmed = NULL;
|
||||
struct mld_msg *mld;
|
||||
int err;
|
||||
@@ -1649,8 +1679,9 @@ static int br_multicast_ipv6_rcv(struct
|
||||
@@ -1656,8 +1686,9 @@ static int br_multicast_ipv6_rcv(struct
|
||||
|
||||
switch (mld->mld_type) {
|
||||
case ICMPV6_MGM_REPORT:
|
||||
@ -288,7 +288,7 @@ Implement optinal multicast->unicast conversion for igmp snooping
|
||||
break;
|
||||
case ICMPV6_MLD2_REPORT:
|
||||
err = br_ip6_multicast_mld2_report(br, port, skb_trimmed, vid);
|
||||
@@ -1659,7 +1690,8 @@ static int br_multicast_ipv6_rcv(struct
|
||||
@@ -1666,7 +1697,8 @@ static int br_multicast_ipv6_rcv(struct
|
||||
err = br_ip6_multicast_query(br, port, skb_trimmed, vid);
|
||||
break;
|
||||
case ICMPV6_MGM_REDUCTION:
|
||||
|
@ -296,15 +296,15 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
|
||||
__skb_tunnel_rx(skb, t->dev, t->net);
|
||||
|
||||
@@ -1148,6 +1285,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
@@ -1153,6 +1290,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
__u32 mtu;
|
||||
u8 tproto;
|
||||
int err;
|
||||
+ struct __ip6_tnl_fmr *fmr;
|
||||
|
||||
tproto = ACCESS_ONCE(t->parms.proto);
|
||||
if ((tproto != IPPROTO_IPV6 && tproto != 0) ||
|
||||
@@ -1178,6 +1316,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
|
||||
return -1;
|
||||
@@ -1187,6 +1325,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
fl6.flowi6_mark = skb->mark;
|
||||
|
||||
@ -323,7 +323,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu);
|
||||
if (err != 0) {
|
||||
if (err == -EMSGSIZE)
|
||||
@@ -1292,6 +1442,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
|
||||
@@ -1301,6 +1451,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
|
||||
t->parms.flowinfo = p->flowinfo;
|
||||
t->parms.link = p->link;
|
||||
t->parms.proto = p->proto;
|
||||
@ -338,7 +338,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
dst_cache_reset(&t->dst_cache);
|
||||
ip6_tnl_link_config(t);
|
||||
return 0;
|
||||
@@ -1330,6 +1488,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
|
||||
@@ -1339,6 +1497,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
|
||||
p->flowinfo = u->flowinfo;
|
||||
p->link = u->link;
|
||||
p->proto = u->proto;
|
||||
@ -346,7 +346,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
memcpy(p->name, u->name, sizeof(u->name));
|
||||
}
|
||||
|
||||
@@ -1625,6 +1784,15 @@ static int ip6_tnl_validate(struct nlatt
|
||||
@@ -1634,6 +1793,15 @@ static int ip6_tnl_validate(struct nlatt
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
static void ip6_tnl_netlink_parms(struct nlattr *data[],
|
||||
struct __ip6_tnl_parm *parms)
|
||||
{
|
||||
@@ -1656,6 +1824,46 @@ static void ip6_tnl_netlink_parms(struct
|
||||
@@ -1665,6 +1833,46 @@ static void ip6_tnl_netlink_parms(struct
|
||||
|
||||
if (data[IFLA_IPTUN_PROTO])
|
||||
parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);
|
||||
@ -409,7 +409,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
}
|
||||
|
||||
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
|
||||
@@ -1708,6 +1916,12 @@ static void ip6_tnl_dellink(struct net_d
|
||||
@@ -1717,6 +1925,12 @@ static void ip6_tnl_dellink(struct net_d
|
||||
|
||||
static size_t ip6_tnl_get_size(const struct net_device *dev)
|
||||
{
|
||||
@ -422,7 +422,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
return
|
||||
/* IFLA_IPTUN_LINK */
|
||||
nla_total_size(4) +
|
||||
@@ -1725,6 +1939,24 @@ static size_t ip6_tnl_get_size(const str
|
||||
@@ -1734,6 +1948,24 @@ static size_t ip6_tnl_get_size(const str
|
||||
nla_total_size(4) +
|
||||
/* IFLA_IPTUN_PROTO */
|
||||
nla_total_size(1) +
|
||||
@ -447,7 +447,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
0;
|
||||
}
|
||||
|
||||
@@ -1732,6 +1964,9 @@ static int ip6_tnl_fill_info(struct sk_b
|
||||
@@ -1741,6 +1973,9 @@ static int ip6_tnl_fill_info(struct sk_b
|
||||
{
|
||||
struct ip6_tnl *tunnel = netdev_priv(dev);
|
||||
struct __ip6_tnl_parm *parm = &tunnel->parms;
|
||||
@ -457,7 +457,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) ||
|
||||
@@ -1740,8 +1975,27 @@ static int ip6_tnl_fill_info(struct sk_b
|
||||
@@ -1749,8 +1984,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) ||
|
||||
@ -486,7 +486,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
|
||||
return 0;
|
||||
|
||||
nla_put_failure:
|
||||
@@ -1765,6 +2019,7 @@ static const struct nla_policy ip6_tnl_p
|
||||
@@ -1774,6 +2028,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 },
|
||||
|
@ -143,7 +143,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
static const struct rt6_info ip6_blk_hole_entry_template = {
|
||||
.dst = {
|
||||
.__refcnt = ATOMIC_INIT(1),
|
||||
@@ -1902,6 +1919,11 @@ static struct rt6_info *ip6_route_info_c
|
||||
@@ -1906,6 +1923,11 @@ static struct rt6_info *ip6_route_info_c
|
||||
rt->dst.output = ip6_pkt_prohibit_out;
|
||||
rt->dst.input = ip6_pkt_prohibit;
|
||||
break;
|
||||
@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
case RTN_THROW:
|
||||
case RTN_UNREACHABLE:
|
||||
default:
|
||||
@@ -2505,6 +2527,17 @@ static int ip6_pkt_prohibit_out(struct n
|
||||
@@ -2509,6 +2531,17 @@ static int ip6_pkt_prohibit_out(struct n
|
||||
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.
|
||||
*/
|
||||
@@ -2749,7 +2782,8 @@ static int rtm_to_fib6_config(struct sk_
|
||||
@@ -2753,7 +2786,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)
|
||||
@@ -3102,6 +3136,9 @@ static int rt6_fill_node(struct net *net
|
||||
@@ -3106,6 +3140,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;
|
||||
@@ -3381,6 +3418,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3385,6 +3422,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
|
||||
@@ -3392,6 +3431,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3396,6 +3435,7 @@ static int ip6_route_dev_notify(struct n
|
||||
in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev);
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev);
|
||||
@ -210,7 +210,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
in6_dev_put(net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
||||
#endif
|
||||
}
|
||||
@@ -3607,6 +3647,17 @@ static int __net_init ip6_route_net_init
|
||||
@@ -3611,6 +3651,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);
|
||||
@ -228,7 +228,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
|
||||
net->ipv6.sysctl.flush_delay = 0;
|
||||
@@ -3625,6 +3676,8 @@ out:
|
||||
@@ -3629,6 +3680,8 @@ out:
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
out_ip6_prohibit_entry:
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
out_ip6_null_entry:
|
||||
@@ -3642,6 +3695,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -3646,6 +3699,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);
|
||||
@ -245,7 +245,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
||||
}
|
||||
@@ -3715,6 +3769,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -3719,6 +3773,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);
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -4278,6 +4278,9 @@ static enum gro_result dev_gro_receive(s
|
||||
@@ -4300,6 +4300,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;
|
||||
|
||||
@@ -5444,6 +5447,48 @@ static void __netdev_adjacent_dev_unlink
|
||||
@@ -5470,6 +5473,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 *private)
|
||||
@@ -5515,6 +5560,7 @@ static int __netdev_upper_dev_link(struc
|
||||
@@ -5541,6 +5586,7 @@ static int __netdev_upper_dev_link(struc
|
||||
goto rollback_lower_mesh;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
|
||||
&changeupper_info.info);
|
||||
return 0;
|
||||
@@ -5641,6 +5687,7 @@ void netdev_upper_dev_unlink(struct net_
|
||||
@@ -5667,6 +5713,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, i->ref_nr);
|
||||
|
||||
@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
|
||||
&changeupper_info.info);
|
||||
}
|
||||
@@ -6181,6 +6228,7 @@ int dev_set_mac_address(struct net_devic
|
||||
@@ -6209,6 +6256,7 @@ int dev_set_mac_address(struct net_devic
|
||||
if (err)
|
||||
return err;
|
||||
dev->addr_assign_type = NET_ADDR_SET;
|
||||
|
@ -52,7 +52,7 @@
|
||||
/**
|
||||
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
|
||||
* @skb: buffer to alter
|
||||
@@ -2312,16 +2316,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
@@ -2314,16 +2318,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
help
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -2754,10 +2754,20 @@ static int xmit_one(struct sk_buff *skb,
|
||||
@@ -2776,10 +2776,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);
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
/*
|
||||
* Some BIOS implementations leave the Intel GPU interrupts enabled,
|
||||
* even though no one is handling them (f.e. i915 driver is never loaded).
|
||||
@@ -3065,6 +3069,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
|
||||
@@ -3069,6 +3073,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
|
||||
|
||||
|
@ -133,7 +133,7 @@
|
||||
}
|
||||
--- a/mm/vmstat.c
|
||||
+++ b/mm/vmstat.c
|
||||
@@ -1558,10 +1558,12 @@ static int __init setup_vmstat(void)
|
||||
@@ -1560,10 +1560,12 @@ static int __init setup_vmstat(void)
|
||||
cpu_notifier_register_done();
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
|
||||
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
@@ -2165,7 +2165,7 @@ static s32 igb_read_phy_reg_82580(struct
|
||||
@@ -2154,7 +2154,7 @@ static s32 igb_read_phy_reg_82580(struct
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
|
||||
hw->phy.ops.release(hw);
|
||||
|
||||
@@ -2190,7 +2190,7 @@ static s32 igb_write_phy_reg_82580(struc
|
||||
@@ -2179,7 +2179,7 @@ static s32 igb_write_phy_reg_82580(struc
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
|
||||
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
@@ -624,13 +624,25 @@ static s32 igb_get_invariants_82575(stru
|
||||
@@ -613,13 +613,25 @@ static s32 igb_get_invariants_82575(stru
|
||||
switch (link_mode) {
|
||||
case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
|
||||
hw->phy.media_type = e1000_media_type_internal_serdes;
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
}
|
||||
/* fall through for I2C based SGMII */
|
||||
case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
|
||||
@@ -647,8 +659,11 @@ static s32 igb_get_invariants_82575(stru
|
||||
@@ -636,8 +648,11 @@ static s32 igb_get_invariants_82575(stru
|
||||
hw->phy.media_type = e1000_media_type_copper;
|
||||
dev_spec->sgmii_active = true;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1228,6 +1228,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1234,6 +1234,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
mtd->flags |= MTD_NO_ERASE;
|
||||
|
||||
mtd->dev.parent = dev;
|
||||
|
@ -69,7 +69,7 @@ Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
spifi->nor.write = nxp_spifi_write;
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1120,7 +1120,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1126,7 +1126,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
const struct flash_info *info = NULL;
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
|
@ -14,7 +14,7 @@ Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1228,7 +1228,6 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1234,7 +1234,6 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
mtd->flags |= MTD_NO_ERASE;
|
||||
|
||||
mtd->dev.parent = dev;
|
||||
|
@ -16,7 +16,7 @@ Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -862,7 +862,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -868,7 +868,7 @@ static const struct flash_info *spi_nor_
|
||||
|
||||
tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN);
|
||||
if (tmp < 0) {
|
||||
|
@ -69,7 +69,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
|
||||
addr += mtd->erasesize;
|
||||
len -= mtd->erasesize;
|
||||
@@ -1107,7 +1130,7 @@ static int set_quad_mode(struct spi_nor
|
||||
@@ -1113,7 +1136,7 @@ static int set_quad_mode(struct spi_nor
|
||||
static int spi_nor_check(struct spi_nor *nor)
|
||||
{
|
||||
if (!nor->dev || !nor->read || !nor->write ||
|
||||
@ -78,7 +78,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
pr_err("spi-nor: please fill all the necessary fields!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1310,6 +1333,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1316,6 +1339,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
nor->addr_width = 3;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -896,7 +896,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -902,7 +902,7 @@ static const struct flash_info *spi_nor_
|
||||
return &spi_nor_ids[tmp];
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
|
||||
/* Cannot unlock; would unlock larger region than requested */
|
||||
if (stm_is_locked_sr(nor, ofs - mtd->erasesize, mtd->erasesize,
|
||||
@@ -1038,6 +1042,8 @@ static int macronix_quad_enable(struct s
|
||||
@@ -1044,6 +1048,8 @@ static int macronix_quad_enable(struct s
|
||||
int ret, val;
|
||||
|
||||
val = read_sr(nor);
|
||||
|
@ -24,7 +24,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1148,6 +1148,26 @@ static int spi_nor_check(struct spi_nor
|
||||
@@ -1154,6 +1154,26 @@ static int spi_nor_check(struct spi_nor
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
|
||||
{
|
||||
const struct flash_info *info = NULL;
|
||||
@@ -1195,19 +1215,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1201,19 +1221,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
mutex_init(&nor->lock);
|
||||
|
||||
@ -74,7 +74,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
|
||||
if (!mtd->name)
|
||||
mtd->name = dev_name(dev);
|
||||
@@ -1374,6 +1384,45 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1380,6 +1390,45 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(spi_nor_scan);
|
||||
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -924,7 +924,10 @@ static int spi_nor_read(struct mtd_info
|
||||
@@ -930,7 +930,10 @@ static int spi_nor_read(struct mtd_info
|
||||
ret = nor->read(nor, from, len, retlen, buf);
|
||||
|
||||
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ);
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
}
|
||||
|
||||
static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
|
||||
@@ -950,10 +953,14 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -956,10 +959,14 @@ static int sst_write(struct mtd_info *mt
|
||||
nor->program_opcode = SPINOR_OP_BP;
|
||||
|
||||
/* write one byte. */
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
}
|
||||
to += actual;
|
||||
|
||||
@@ -962,10 +969,14 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -968,10 +975,14 @@ static int sst_write(struct mtd_info *mt
|
||||
nor->program_opcode = SPINOR_OP_AAI_WP;
|
||||
|
||||
/* write two bytes. */
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
to += 2;
|
||||
nor->sst_write_second = true;
|
||||
}
|
||||
@@ -974,21 +985,24 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -980,21 +991,24 @@ static int sst_write(struct mtd_info *mt
|
||||
write_disable(nor);
|
||||
ret = spi_nor_wait_till_ready(nor);
|
||||
if (ret)
|
||||
@ -90,7 +90,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
|
||||
return ret;
|
||||
}
|
||||
@@ -1017,14 +1031,18 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1023,14 +1037,18 @@ static int spi_nor_write(struct mtd_info
|
||||
|
||||
/* do all the bytes fit onto one page? */
|
||||
if (page_offset + len <= nor->page_size) {
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
page_size = len - i;
|
||||
if (page_size > nor->page_size)
|
||||
page_size = nor->page_size;
|
||||
@@ -1035,7 +1053,11 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1041,7 +1059,11 @@ static int spi_nor_write(struct mtd_info
|
||||
|
||||
write_enable(nor);
|
||||
|
||||
|
@ -113,7 +113,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
u8 cmd = nor->read_opcode;
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -921,12 +921,13 @@ static int spi_nor_read(struct mtd_info
|
||||
@@ -927,12 +927,13 @@ static int spi_nor_read(struct mtd_info
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -128,7 +128,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -953,7 +954,7 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -959,7 +960,7 @@ static int sst_write(struct mtd_info *mt
|
||||
nor->program_opcode = SPINOR_OP_BP;
|
||||
|
||||
/* write one byte. */
|
||||
@ -137,7 +137,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
if (ret < 0)
|
||||
goto sst_write_err;
|
||||
WARN(ret != 1, "While writing 1 byte written %i bytes\n",
|
||||
@@ -969,7 +970,7 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -975,7 +976,7 @@ static int sst_write(struct mtd_info *mt
|
||||
nor->program_opcode = SPINOR_OP_AAI_WP;
|
||||
|
||||
/* write two bytes. */
|
||||
@ -146,7 +146,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
if (ret < 0)
|
||||
goto sst_write_err;
|
||||
WARN(ret != 2, "While writing 2 bytes written %i bytes\n",
|
||||
@@ -992,7 +993,7 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -998,7 +999,7 @@ static int sst_write(struct mtd_info *mt
|
||||
write_enable(nor);
|
||||
|
||||
nor->program_opcode = SPINOR_OP_BP;
|
||||
@ -155,7 +155,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
if (ret < 0)
|
||||
goto sst_write_err;
|
||||
WARN(ret != 1, "While writing 1 byte written %i bytes\n",
|
||||
@@ -1001,8 +1002,10 @@ static int sst_write(struct mtd_info *mt
|
||||
@@ -1007,8 +1008,10 @@ static int sst_write(struct mtd_info *mt
|
||||
if (ret)
|
||||
goto sst_write_err;
|
||||
write_disable(nor);
|
||||
@ -166,7 +166,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
|
||||
return ret;
|
||||
}
|
||||
@@ -1031,15 +1034,17 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1037,15 +1040,17 @@ static int spi_nor_write(struct mtd_info
|
||||
|
||||
/* do all the bytes fit onto one page? */
|
||||
if (page_offset + len <= nor->page_size) {
|
||||
@ -186,7 +186,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
|
||||
/* write everything in nor->page_size chunks */
|
||||
for (i = ret; i < len; ) {
|
||||
@@ -1053,10 +1058,10 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1059,10 +1064,10 @@ static int spi_nor_write(struct mtd_info
|
||||
|
||||
write_enable(nor);
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1019,8 +1019,8 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1025,8 +1025,8 @@ static int spi_nor_write(struct mtd_info
|
||||
size_t *retlen, const u_char *buf)
|
||||
{
|
||||
struct spi_nor *nor = mtd_to_spi_nor(mtd);
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
|
||||
dev_dbg(nor->dev, "to 0x%08x, len %zd\n", (u32)to, len);
|
||||
|
||||
@@ -1028,45 +1028,37 @@ static int spi_nor_write(struct mtd_info
|
||||
@@ -1034,45 +1034,37 @@ static int spi_nor_write(struct mtd_info
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -921,14 +921,22 @@ static int spi_nor_read(struct mtd_info
|
||||
@@ -927,14 +927,22 @@ static int spi_nor_read(struct mtd_info
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: Yunhui Cui <B56489@freescale.com>
|
||||
|
||||
struct flash_info {
|
||||
char *name;
|
||||
@@ -1246,6 +1247,14 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1252,6 +1253,14 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -33,7 +33,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
|
||||
static const struct flash_info *spi_nor_match_id(const char *name);
|
||||
|
||||
@@ -786,6 +792,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -792,6 +798,7 @@ static const struct flash_info spi_nor_i
|
||||
*/
|
||||
{ "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
@ -41,7 +41,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
|
||||
{ "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
@@ -910,6 +917,53 @@ static const struct flash_info *spi_nor_
|
||||
@@ -916,6 +923,53 @@ static const struct flash_info *spi_nor_
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
|
||||
size_t *retlen, u_char *buf)
|
||||
{
|
||||
@@ -1255,6 +1309,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1261,6 +1315,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
write_sr(nor, ret);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
case SPI_NOR_NORMAL:
|
||||
return 0;
|
||||
}
|
||||
@@ -799,7 +804,8 @@ static const struct flash_info spi_nor_i
|
||||
@@ -805,7 +810,8 @@ static const struct flash_info spi_nor_i
|
||||
{ "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
|
||||
{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
|
||||
{ "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) },
|
||||
@ -63,7 +63,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
{ "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) },
|
||||
@@ -1195,6 +1201,23 @@ static int spansion_quad_enable(struct s
|
||||
@@ -1201,6 +1207,23 @@ static int spansion_quad_enable(struct s
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
static int set_quad_mode(struct spi_nor *nor, const struct flash_info *info)
|
||||
{
|
||||
int status;
|
||||
@@ -1385,8 +1408,15 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1391,8 +1414,15 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
if (info->flags & SPI_NOR_NO_FR)
|
||||
nor->flash_read = SPI_NOR_NORMAL;
|
||||
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
ret = set_quad_mode(nor, info);
|
||||
if (ret) {
|
||||
dev_err(dev, "quad mode not supported\n");
|
||||
@@ -1399,6 +1429,14 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1405,6 +1435,14 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
/* Default commands */
|
||||
switch (nor->flash_read) {
|
||||
@ -120,7 +120,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
case SPI_NOR_QUAD:
|
||||
nor->read_opcode = SPINOR_OP_READ_1_1_4;
|
||||
break;
|
||||
@@ -1426,6 +1464,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1432,6 +1470,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
if (JEDEC_MFR(info) == SNOR_MFR_SPANSION) {
|
||||
/* Dedicated 4-byte command set */
|
||||
switch (nor->flash_read) {
|
||||
@ -130,7 +130,7 @@ Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
|
||||
case SPI_NOR_QUAD:
|
||||
nor->read_opcode = SPINOR_OP_READ4_1_1_4;
|
||||
break;
|
||||
@@ -1455,7 +1496,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1461,7 +1502,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -798,6 +798,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -804,6 +804,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fs256s1", INFO6(0x010219, 0x4d0181, 64 * 1024, 512, 0)},
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
|
||||
{ "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
@@ -964,9 +965,11 @@ static int spansion_s25fs_disable_4kb_er
|
||||
@@ -970,9 +971,11 @@ static int spansion_s25fs_disable_4kb_er
|
||||
ret = nor->read_reg(nor, SPINOR_OP_SPANSION_RDAR, &cr3v, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -116,7 +116,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
* Used for Spansion S25FS-S family flash only.
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -798,7 +798,6 @@ static const struct flash_info spi_nor_i
|
||||
@@ -804,7 +804,6 @@ static const struct flash_info spi_nor_i
|
||||
{ "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fs256s1", INFO6(0x010219, 0x4d0181, 64 * 1024, 512, 0)},
|
||||
@ -124,7 +124,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
|
||||
{ "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
@@ -965,11 +964,9 @@ static int spansion_s25fs_disable_4kb_er
|
||||
@@ -971,11 +970,9 @@ static int spansion_s25fs_disable_4kb_er
|
||||
ret = nor->read_reg(nor, SPINOR_OP_SPANSION_RDAR, &cr3v, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -136,7 +136,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1343,6 +1340,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1349,6 +1346,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
if (!mtd->name)
|
||||
mtd->name = dev_name(dev);
|
||||
|
@ -16,7 +16,7 @@ Integrated-by: Yutang Jiang <yutang.jiang@nxp.com>
|
||||
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -804,7 +804,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -810,7 +810,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
|
||||
{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
|
||||
{ "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) },
|
||||
|
@ -180,7 +180,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
|
||||
+#endif /* _PCI_LAYERSCAPE_H */
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -3589,8 +3589,9 @@ int pci_dev_specific_reset(struct pci_de
|
||||
@@ -3593,8 +3593,9 @@ int pci_dev_specific_reset(struct pci_de
|
||||
static void quirk_dma_func0_alias(struct pci_dev *dev)
|
||||
{
|
||||
if (PCI_FUNC(dev->devfn) != 0) {
|
||||
@ -192,7 +192,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3605,8 +3606,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_R
|
||||
@@ -3609,8 +3610,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_R
|
||||
static void quirk_dma_func1_alias(struct pci_dev *dev)
|
||||
{
|
||||
if (PCI_FUNC(dev->devfn) != 1) {
|
||||
@ -204,7 +204,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3677,11 +3679,12 @@ static void quirk_fixed_dma_alias(struct
|
||||
@@ -3681,11 +3683,12 @@ static void quirk_fixed_dma_alias(struct
|
||||
|
||||
id = pci_match_id(fixed_dma_alias_tbl, dev);
|
||||
if (id) {
|
||||
|
@ -224,7 +224,7 @@ Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
|
||||
/*
|
||||
--- a/arch/arm64/mm/init.c
|
||||
+++ b/arch/arm64/mm/init.c
|
||||
@@ -171,6 +171,7 @@ void __init arm64_memblock_init(void)
|
||||
@@ -175,6 +175,7 @@ void __init arm64_memblock_init(void)
|
||||
memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
|
||||
#endif
|
||||
|
||||
|
@ -212,7 +212,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
kfree(mtd_list);
|
||||
--- a/drivers/mtd/mtdchar.c
|
||||
+++ b/drivers/mtd/mtdchar.c
|
||||
@@ -465,38 +465,111 @@ static int mtdchar_readoob(struct file *
|
||||
@@ -469,38 +469,111 @@ static int mtdchar_readoob(struct file *
|
||||
}
|
||||
|
||||
/*
|
||||
@ -341,7 +341,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
static int mtdchar_blkpg_ioctl(struct mtd_info *mtd,
|
||||
struct blkpg_ioctl_arg *arg)
|
||||
{
|
||||
@@ -815,16 +888,12 @@ static int mtdchar_ioctl(struct file *fi
|
||||
@@ -819,16 +892,12 @@ static int mtdchar_ioctl(struct file *fi
|
||||
{
|
||||
struct nand_oobinfo oi;
|
||||
|
||||
@ -362,7 +362,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
if (copy_to_user(argp, &oi, sizeof(struct nand_oobinfo)))
|
||||
return -EFAULT;
|
||||
@@ -913,14 +982,14 @@ static int mtdchar_ioctl(struct file *fi
|
||||
@@ -917,14 +986,14 @@ static int mtdchar_ioctl(struct file *fi
|
||||
{
|
||||
struct nand_ecclayout_user *usrlay;
|
||||
|
||||
@ -4297,7 +4297,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -737,8 +869,8 @@ static const struct flash_info spi_nor_i
|
||||
@@ -743,8 +875,8 @@ static const struct flash_info spi_nor_i
|
||||
{ "n25q032a", INFO(0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) },
|
||||
{ "n25q064", INFO(0x20ba17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q064a", INFO(0x20bb17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
@ -4308,7 +4308,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q512a", INFO(0x20bb20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q512ax3", INFO(0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
|
||||
@@ -772,6 +904,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -778,6 +910,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "s25fl008k", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
@ -4316,7 +4316,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "s25fl132k", INFO(0x014016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "s25fl164k", INFO(0x014017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
{ "s25fl204k", INFO(0x014013, 0, 64 * 1024, 8, SECT_4K | SPI_NOR_DUAL_READ) },
|
||||
@@ -835,11 +968,23 @@ static const struct flash_info spi_nor_i
|
||||
@@ -841,11 +974,23 @@ static const struct flash_info spi_nor_i
|
||||
{ "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) },
|
||||
{ "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
@ -4343,7 +4343,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
|
||||
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
|
||||
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
|
||||
@@ -862,7 +1007,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -868,7 +1013,7 @@ static const struct flash_info *spi_nor_
|
||||
|
||||
tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN);
|
||||
if (tmp < 0) {
|
||||
@ -4352,7 +4352,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
return ERR_PTR(tmp);
|
||||
}
|
||||
|
||||
@@ -873,7 +1018,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -879,7 +1024,7 @@ static const struct flash_info *spi_nor_
|
||||
return &spi_nor_ids[tmp];
|
||||
}
|
||||
}
|
||||
@ -4361,7 +4361,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
id[0], id[1], id[2]);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
@@ -1019,6 +1164,8 @@ static int macronix_quad_enable(struct s
|
||||
@@ -1025,6 +1170,8 @@ static int macronix_quad_enable(struct s
|
||||
int ret, val;
|
||||
|
||||
val = read_sr(nor);
|
||||
@ -4370,7 +4370,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
write_enable(nor);
|
||||
|
||||
write_sr(nor, val | SR_QUAD_EN_MX);
|
||||
@@ -1107,7 +1254,7 @@ static int set_quad_mode(struct spi_nor
|
||||
@@ -1113,7 +1260,7 @@ static int set_quad_mode(struct spi_nor
|
||||
static int spi_nor_check(struct spi_nor *nor)
|
||||
{
|
||||
if (!nor->dev || !nor->read || !nor->write ||
|
||||
@ -4379,7 +4379,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
pr_err("spi-nor: please fill all the necessary fields!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1120,7 +1267,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1126,7 +1273,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
const struct flash_info *info = NULL;
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
@ -4388,7 +4388,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -1174,6 +1321,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1180,6 +1327,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
info->flags & SPI_NOR_HAS_LOCK) {
|
||||
write_enable(nor);
|
||||
write_sr(nor, 0);
|
||||
@ -4396,7 +4396,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
}
|
||||
|
||||
if (!mtd->name)
|
||||
@@ -1208,6 +1356,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1214,6 +1362,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
if (info->flags & USE_FSR)
|
||||
nor->flags |= SNOR_F_USE_FSR;
|
||||
@ -4405,7 +4405,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
#ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
|
||||
/* prefer "small sector" erase if possible */
|
||||
@@ -1310,6 +1460,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1316,6 +1466,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
nor->addr_width = 3;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
mvneta_set_ucast_table(pp, -1);
|
||||
@@ -3233,9 +3246,6 @@ static int mvneta_port_power_up(struct m
|
||||
@@ -3232,9 +3245,6 @@ static int mvneta_port_power_up(struct m
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvneta_set_ucast_table(pp, -1);
|
||||
mvneta_set_special_mcast_table(pp, -1);
|
||||
mvneta_set_other_mcast_table(pp, -1);
|
||||
@@ -2959,10 +2965,43 @@ int mvneta_ethtool_get_settings(struct n
|
||||
@@ -2958,10 +2964,43 @@ int mvneta_ethtool_get_settings(struct n
|
||||
int mvneta_ethtool_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvneta_cleanup_rxqs(pp);
|
||||
return err;
|
||||
}
|
||||
@@ -2639,7 +2640,7 @@ static int mvneta_set_mac_addr(struct ne
|
||||
@@ -2638,7 +2639,7 @@ static int mvneta_set_mac_addr(struct ne
|
||||
mvneta_mac_addr_set(pp, dev->dev_addr, -1);
|
||||
|
||||
/* Set new addr in hw */
|
||||
@ -111,7 +111,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
eth_commit_mac_addr_change(dev, addr);
|
||||
return 0;
|
||||
@@ -2758,7 +2759,7 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2757,7 +2758,7 @@ static void mvneta_percpu_elect(struct m
|
||||
{
|
||||
int online_cpu_idx, cpu, i = 0;
|
||||
|
||||
@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
if (i == online_cpu_idx)
|
||||
@@ -3366,6 +3367,8 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3365,6 +3366,8 @@ static int mvneta_probe(struct platform_
|
||||
strcmp(managed, "in-band-status") == 0);
|
||||
pp->cpu_notifier.notifier_call = mvneta_percpu_notifier;
|
||||
|
||||
|
@ -181,7 +181,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
|
||||
MVNETA_CAUSE_PHY_STATUS_CHANGE |
|
||||
MVNETA_CAUSE_LINK_CHANGE |
|
||||
@@ -2757,22 +2809,35 @@ static void mvneta_percpu_disable(void *
|
||||
@@ -2756,22 +2808,35 @@ static void mvneta_percpu_disable(void *
|
||||
|
||||
static void mvneta_percpu_elect(struct mvneta_port *pp)
|
||||
{
|
||||
@ -227,7 +227,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2807,12 +2872,22 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2806,12 +2871,22 @@ static int mvneta_percpu_notifier(struct
|
||||
mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0);
|
||||
napi_enable(&port->napi);
|
||||
|
||||
@ -251,7 +251,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvreg_write(pp, MVNETA_INTR_NEW_MASK,
|
||||
MVNETA_RX_INTR_MASK(rxq_number) |
|
||||
MVNETA_TX_INTR_MASK(txq_number) |
|
||||
@@ -2863,7 +2938,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2862,7 +2937,7 @@ static int mvneta_percpu_notifier(struct
|
||||
static int mvneta_open(struct net_device *dev)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
@ -260,7 +260,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
pp->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu);
|
||||
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
|
||||
@@ -2893,8 +2968,13 @@ static int mvneta_open(struct net_device
|
||||
@@ -2892,8 +2967,13 @@ static int mvneta_open(struct net_device
|
||||
*/
|
||||
mvneta_percpu_disable(pp);
|
||||
|
||||
|
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void mvneta_start_dev(struct mvneta_port *pp)
|
||||
{
|
||||
unsigned int cpu;
|
||||
@@ -3234,6 +3253,106 @@ static int mvneta_ethtool_get_sset_count
|
||||
@@ -3233,6 +3252,106 @@ static int mvneta_ethtool_get_sset_count
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static const struct net_device_ops mvneta_netdev_ops = {
|
||||
.ndo_open = mvneta_open,
|
||||
.ndo_stop = mvneta_stop,
|
||||
@@ -3258,6 +3377,10 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
@@ -3257,6 +3376,10 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
.get_strings = mvneta_ethtool_get_strings,
|
||||
.get_ethtool_stats = mvneta_ethtool_get_stats,
|
||||
.get_sset_count = mvneta_ethtool_get_sset_count,
|
||||
@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
/* Initialize hw */
|
||||
@@ -3449,6 +3572,8 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3448,6 +3571,8 @@ static int mvneta_probe(struct platform_
|
||||
|
||||
pp->rxq_def = rxq_def;
|
||||
|
||||
|
@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2841,13 +2865,23 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2840,13 +2864,23 @@ static void mvneta_percpu_elect(struct m
|
||||
if ((rxq % max_cpu) == cpu)
|
||||
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq);
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3245,26 +3245,25 @@ static void mvneta_ethtool_update_stats(
|
||||
@@ -3244,26 +3244,25 @@ static void mvneta_ethtool_update_stats(
|
||||
const struct mvneta_statistic *s;
|
||||
void __iomem *base = pp->base;
|
||||
u32 high, low, val;
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -2852,9 +2852,14 @@ static void mvneta_percpu_disable(void *
|
||||
@@ -2851,9 +2851,14 @@ static void mvneta_percpu_disable(void *
|
||||
|
||||
static void mvneta_percpu_elect(struct mvneta_port *pp)
|
||||
{
|
||||
@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
max_cpu = num_present_cpus();
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
@@ -2865,7 +2870,7 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2864,7 +2869,7 @@ static void mvneta_percpu_elect(struct m
|
||||
if ((rxq % max_cpu) == cpu)
|
||||
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq);
|
||||
|
||||
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Map the default receive queue queue to the
|
||||
* elected CPU
|
||||
*/
|
||||
@@ -2876,7 +2881,7 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2875,7 +2880,7 @@ static void mvneta_percpu_elect(struct m
|
||||
* the CPU bound to the default RX queue
|
||||
*/
|
||||
if (txq_number == 1)
|
||||
|
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
|
||||
MVNETA_CAUSE_PHY_STATUS_CHANGE |
|
||||
MVNETA_CAUSE_LINK_CHANGE |
|
||||
@@ -2996,7 +2995,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2995,7 +2994,7 @@ static int mvneta_percpu_notifier(struct
|
||||
static int mvneta_open(struct net_device *dev)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
pp->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu);
|
||||
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
|
||||
@@ -3029,9 +3028,7 @@ static int mvneta_open(struct net_device
|
||||
@@ -3028,9 +3027,7 @@ static int mvneta_open(struct net_device
|
||||
/* Enable per-CPU interrupt on all the CPU to handle our RX
|
||||
* queue interrupts
|
||||
*/
|
||||
@ -55,7 +55,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
|
||||
/* Register a CPU notifier to handle the case where our CPU
|
||||
@@ -3318,9 +3315,7 @@ static int mvneta_config_rss(struct mvn
|
||||
@@ -3317,9 +3314,7 @@ static int mvneta_config_rss(struct mvn
|
||||
|
||||
netif_tx_stop_all_queues(pp->dev);
|
||||
|
||||
|
@ -126,7 +126,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
mvneta_tx_reset(pp);
|
||||
mvneta_rx_reset(pp);
|
||||
@@ -2924,9 +2929,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2923,9 +2928,7 @@ static int mvneta_percpu_notifier(struct
|
||||
}
|
||||
|
||||
/* Mask all ethernet port interrupts */
|
||||
@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
napi_enable(&port->napi);
|
||||
|
||||
|
||||
@@ -2941,14 +2944,8 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2940,14 +2943,8 @@ static int mvneta_percpu_notifier(struct
|
||||
*/
|
||||
mvneta_percpu_elect(pp);
|
||||
|
||||
@ -154,7 +154,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
|
||||
MVNETA_CAUSE_PHY_STATUS_CHANGE |
|
||||
MVNETA_CAUSE_LINK_CHANGE |
|
||||
@@ -2959,9 +2956,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2958,9 +2955,7 @@ static int mvneta_percpu_notifier(struct
|
||||
case CPU_DOWN_PREPARE_FROZEN:
|
||||
netif_tx_stop_all_queues(pp->dev);
|
||||
/* Mask all ethernet port interrupts */
|
||||
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
napi_synchronize(&port->napi);
|
||||
napi_disable(&port->napi);
|
||||
@@ -2977,10 +2972,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2976,10 +2971,7 @@ static int mvneta_percpu_notifier(struct
|
||||
/* Check if a new CPU must be elected now this on is down */
|
||||
mvneta_percpu_elect(pp);
|
||||
/* Unmask all ethernet port interrupts */
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Core clock */
|
||||
struct clk *clk;
|
||||
@@ -2858,6 +2862,12 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2857,6 +2861,12 @@ static void mvneta_percpu_elect(struct m
|
||||
{
|
||||
int elected_cpu = 0, max_cpu, cpu, i = 0;
|
||||
|
||||
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Use the cpu associated to the rxq when it is online, in all
|
||||
* the other cases, use the cpu 0 which can't be offline.
|
||||
*/
|
||||
@@ -2901,6 +2911,7 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2900,6 +2910,7 @@ static void mvneta_percpu_elect(struct m
|
||||
i++;
|
||||
|
||||
}
|
||||
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static int mvneta_percpu_notifier(struct notifier_block *nfb,
|
||||
@@ -2955,8 +2966,13 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2954,8 +2965,13 @@ static int mvneta_percpu_notifier(struct
|
||||
case CPU_DOWN_PREPARE:
|
||||
case CPU_DOWN_PREPARE_FROZEN:
|
||||
netif_tx_stop_all_queues(pp->dev);
|
||||
|
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
/* Core clock */
|
||||
struct clk *clk;
|
||||
@@ -2858,16 +2859,14 @@ static void mvneta_percpu_disable(void *
|
||||
@@ -2857,16 +2858,14 @@ static void mvneta_percpu_disable(void *
|
||||
disable_percpu_irq(pp->dev->irq);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Use the cpu associated to the rxq when it is online, in all
|
||||
* the other cases, use the cpu 0 which can't be offline.
|
||||
*/
|
||||
@@ -2911,7 +2910,6 @@ static void mvneta_percpu_elect(struct m
|
||||
@@ -2910,7 +2909,6 @@ static void mvneta_percpu_elect(struct m
|
||||
i++;
|
||||
|
||||
}
|
||||
@ -55,7 +55,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
static int mvneta_percpu_notifier(struct notifier_block *nfb,
|
||||
@@ -2925,6 +2923,14 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2924,6 +2922,14 @@ static int mvneta_percpu_notifier(struct
|
||||
switch (action) {
|
||||
case CPU_ONLINE:
|
||||
case CPU_ONLINE_FROZEN:
|
||||
@ -70,7 +70,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
netif_tx_stop_all_queues(pp->dev);
|
||||
|
||||
/* We have to synchronise on tha napi of each CPU
|
||||
@@ -2962,6 +2968,7 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2961,6 +2967,7 @@ static int mvneta_percpu_notifier(struct
|
||||
MVNETA_CAUSE_LINK_CHANGE |
|
||||
MVNETA_CAUSE_PSC_SYNC_CHANGE);
|
||||
netif_tx_start_all_queues(pp->dev);
|
||||
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
break;
|
||||
case CPU_DOWN_PREPARE:
|
||||
case CPU_DOWN_PREPARE_FROZEN:
|
||||
@@ -2986,7 +2993,9 @@ static int mvneta_percpu_notifier(struct
|
||||
@@ -2985,7 +2992,9 @@ static int mvneta_percpu_notifier(struct
|
||||
case CPU_DEAD:
|
||||
case CPU_DEAD_FROZEN:
|
||||
/* Check if a new CPU must be elected now this on is down */
|
||||
@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Unmask all ethernet port interrupts */
|
||||
on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
|
||||
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
|
||||
@@ -3038,7 +3047,7 @@ static int mvneta_open(struct net_device
|
||||
@@ -3037,7 +3046,7 @@ static int mvneta_open(struct net_device
|
||||
*/
|
||||
on_each_cpu(mvneta_percpu_enable, pp, true);
|
||||
|
||||
@ -97,7 +97,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Register a CPU notifier to handle the case where our CPU
|
||||
* might be taken offline.
|
||||
*/
|
||||
@@ -3071,9 +3080,18 @@ static int mvneta_stop(struct net_device
|
||||
@@ -3070,9 +3079,18 @@ static int mvneta_stop(struct net_device
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
on_each_cpu(mvneta_percpu_disable, pp, true);
|
||||
free_percpu_irq(dev->irq, pp->ports);
|
||||
mvneta_cleanup_rxqs(pp);
|
||||
@@ -3344,7 +3362,9 @@ static int mvneta_config_rss(struct mvn
|
||||
@@ -3343,7 +3361,9 @@ static int mvneta_config_rss(struct mvn
|
||||
mvreg_write(pp, MVNETA_PORT_CONFIG, val);
|
||||
|
||||
/* Update the elected CPU matching the new rxq_def */
|
||||
|
@ -860,7 +860,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pp->pkt_size = MVNETA_RX_PKT_SIZE(dev->mtu);
|
||||
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
@@ -3568,6 +3974,7 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3567,6 +3973,7 @@ static int mvneta_probe(struct platform_
|
||||
struct resource *res;
|
||||
struct device_node *dn = pdev->dev.of_node;
|
||||
struct device_node *phy_node;
|
||||
@ -868,7 +868,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
struct mvneta_port *pp;
|
||||
struct net_device *dev;
|
||||
const char *dt_mac_addr;
|
||||
@@ -3695,26 +4102,39 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3694,26 +4101,39 @@ static int mvneta_probe(struct platform_
|
||||
|
||||
pp->tx_csum_limit = tx_csum_limit;
|
||||
|
||||
@ -914,7 +914,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
for_each_present_cpu(cpu) {
|
||||
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
|
||||
|
||||
@@ -3749,6 +4169,13 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3748,6 +4168,13 @@ static int mvneta_probe(struct platform_
|
||||
|
||||
return 0;
|
||||
|
||||
@ -928,7 +928,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
err_free_stats:
|
||||
free_percpu(pp->stats);
|
||||
err_free_ports:
|
||||
@@ -3778,6 +4205,12 @@ static int mvneta_remove(struct platform
|
||||
@@ -3777,6 +4204,12 @@ static int mvneta_remove(struct platform
|
||||
of_node_put(pp->phy_node);
|
||||
free_netdev(dev);
|
||||
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3489,17 +3489,17 @@ static int mvneta_stop(struct net_device
|
||||
@@ -3488,17 +3488,17 @@ static int mvneta_stop(struct net_device
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
/* Inform that we are stopping so we don't want to setup the
|
||||
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
on_each_cpu(mvneta_percpu_disable, pp, true);
|
||||
free_percpu_irq(dev->irq, pp->ports);
|
||||
mvneta_cleanup_rxqs(pp);
|
||||
@@ -4032,6 +4032,7 @@ static int mvneta_probe(struct platform_
|
||||
@@ -4031,6 +4031,7 @@ static int mvneta_probe(struct platform_
|
||||
dev->ethtool_ops = &mvneta_eth_tool_ops;
|
||||
|
||||
pp = netdev_priv(dev);
|
||||
|
@ -50,9 +50,9 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
+ on_each_cpu(mvneta_percpu_enable, pp, true);
|
||||
mvneta_start_dev(pp);
|
||||
mvneta_port_up(pp);
|
||||
|
||||
@@ -3245,20 +3261,6 @@ static void mvneta_mdio_remove(struct mv
|
||||
netdev_update_features(dev);
|
||||
@@ -3244,20 +3260,6 @@ static void mvneta_mdio_remove(struct mv
|
||||
pp->phy_dev = NULL;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
|
||||
@@ -3166,99 +3109,219 @@ static int mvneta_set_mac_addr(struct ne
|
||||
@@ -3165,99 +3108,219 @@ static int mvneta_set_mac_addr(struct ne
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -449,6 +449,13 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
- struct phy_device *phy_dev;
|
||||
+ struct mvneta_port *pp = netdev_priv(ndev);
|
||||
+ u32 val;
|
||||
+
|
||||
+ if (mode == MLO_AN_PHY || mode == MLO_AN_FIXED) {
|
||||
+ val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG);
|
||||
+ val &= ~MVNETA_GMAC_FORCE_LINK_DOWN;
|
||||
+ val |= MVNETA_GMAC_FORCE_LINK_PASS;
|
||||
+ mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
|
||||
+ }
|
||||
|
||||
- phy_dev = of_phy_connect(pp->dev, pp->phy_node, mvneta_adjust_link, 0,
|
||||
- pp->phy_interface);
|
||||
@ -464,17 +471,10 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
- pp->link = 0;
|
||||
- pp->duplex = 0;
|
||||
- pp->speed = 0;
|
||||
+ if (mode == MLO_AN_PHY || mode == MLO_AN_FIXED) {
|
||||
+ val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG);
|
||||
+ val &= ~MVNETA_GMAC_FORCE_LINK_DOWN;
|
||||
+ val |= MVNETA_GMAC_FORCE_LINK_PASS;
|
||||
+ mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
|
||||
+ }
|
||||
|
||||
- return 0;
|
||||
+ mvneta_port_up(pp);
|
||||
+}
|
||||
+
|
||||
|
||||
- return 0;
|
||||
+static const struct phylink_mac_ops mvneta_phylink_ops = {
|
||||
+ .mac_get_support = mvneta_mac_support,
|
||||
+ .mac_link_state = mvneta_mac_link_state,
|
||||
@ -501,7 +501,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
/* Electing a CPU must be done in an atomic way: it should be done
|
||||
@@ -3506,10 +3569,7 @@ static int mvneta_ioctl(struct net_devic
|
||||
@@ -3505,10 +3568,7 @@ static int mvneta_ioctl(struct net_devic
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
@ -513,7 +513,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
/* Ethtool methods */
|
||||
@@ -3519,54 +3579,15 @@ int mvneta_ethtool_get_settings(struct n
|
||||
@@ -3518,54 +3578,15 @@ int mvneta_ethtool_get_settings(struct n
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
@ -570,7 +570,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
/* Set interrupt coalescing for ethtools */
|
||||
@@ -3674,7 +3695,8 @@ static void mvneta_ethtool_update_stats(
|
||||
@@ -3673,7 +3694,8 @@ static void mvneta_ethtool_update_stats(
|
||||
{
|
||||
const struct mvneta_statistic *s;
|
||||
void __iomem *base = pp->base;
|
||||
@ -580,7 +580,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
u64 val64;
|
||||
int i;
|
||||
|
||||
@@ -3969,14 +3991,13 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3968,14 +3990,13 @@ static int mvneta_probe(struct platform_
|
||||
const struct mbus_dram_target_info *dram_target_info;
|
||||
struct resource *res;
|
||||
struct device_node *dn = pdev->dev.of_node;
|
||||
@ -596,7 +596,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
int tx_csum_limit;
|
||||
int phy_mode;
|
||||
int err;
|
||||
@@ -3992,31 +4013,11 @@ static int mvneta_probe(struct platform_
|
||||
@@ -3991,31 +4012,11 @@ static int mvneta_probe(struct platform_
|
||||
goto err_free_netdev;
|
||||
}
|
||||
|
||||
@ -629,7 +629,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
dev->tx_queue_len = MVNETA_MAX_TXD;
|
||||
@@ -4027,12 +4028,7 @@ static int mvneta_probe(struct platform_
|
||||
@@ -4026,12 +4027,7 @@ static int mvneta_probe(struct platform_
|
||||
|
||||
pp = netdev_priv(dev);
|
||||
spin_lock_init(&pp->lock);
|
||||
@ -643,7 +643,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
pp->cpu_notifier.notifier_call = mvneta_percpu_notifier;
|
||||
|
||||
pp->rxq_def = rxq_def;
|
||||
@@ -4042,7 +4038,7 @@ static int mvneta_probe(struct platform_
|
||||
@@ -4041,7 +4037,7 @@ static int mvneta_probe(struct platform_
|
||||
pp->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(pp->clk)) {
|
||||
err = PTR_ERR(pp->clk);
|
||||
@ -652,7 +652,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
clk_prepare_enable(pp->clk);
|
||||
@@ -4145,6 +4141,14 @@ static int mvneta_probe(struct platform_
|
||||
@@ -4144,6 +4140,14 @@ static int mvneta_probe(struct platform_
|
||||
dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE;
|
||||
dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
|
||||
|
||||
@ -667,7 +667,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
err = register_netdev(dev);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "failed to register\n");
|
||||
@@ -4156,13 +4160,6 @@ static int mvneta_probe(struct platform_
|
||||
@@ -4155,13 +4159,6 @@ static int mvneta_probe(struct platform_
|
||||
|
||||
platform_set_drvdata(pdev, pp->dev);
|
||||
|
||||
@ -681,7 +681,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -4174,13 +4171,13 @@ err_netdev:
|
||||
@@ -4173,13 +4170,13 @@ err_netdev:
|
||||
1 << pp->id);
|
||||
}
|
||||
err_free_stats:
|
||||
@ -697,7 +697,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
err_free_irq:
|
||||
irq_dispose_mapping(dev->irq);
|
||||
err_free_netdev:
|
||||
@@ -4199,7 +4196,7 @@ static int mvneta_remove(struct platform
|
||||
@@ -4198,7 +4195,7 @@ static int mvneta_remove(struct platform
|
||||
free_percpu(pp->ports);
|
||||
free_percpu(pp->stats);
|
||||
irq_dispose_mapping(dev->irq);
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3590,6 +3590,13 @@ int mvneta_ethtool_set_settings(struct n
|
||||
@@ -3589,6 +3589,13 @@ int mvneta_ethtool_set_settings(struct n
|
||||
return phylink_ethtool_set_settings(pp->phylink, cmd);
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
/* Set interrupt coalescing for ethtools */
|
||||
static int mvneta_ethtool_set_coalesce(struct net_device *dev,
|
||||
struct ethtool_coalesce *c)
|
||||
@@ -3854,6 +3861,7 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
@@ -3853,6 +3860,7 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_settings = mvneta_ethtool_get_settings,
|
||||
.set_settings = mvneta_ethtool_set_settings,
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3209,6 +3209,8 @@ static void mvneta_mac_config(struct net
|
||||
@@ -3208,6 +3208,8 @@ static void mvneta_mac_config(struct net
|
||||
|
||||
if (state->advertising & ADVERTISED_Pause)
|
||||
new_an |= MVNETA_GMAC_ADVERT_SYM_FLOW_CTRL;
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
switch (mode) {
|
||||
case MLO_AN_SGMII:
|
||||
@@ -3233,7 +3235,7 @@ static void mvneta_mac_config(struct net
|
||||
@@ -3232,7 +3234,7 @@ static void mvneta_mac_config(struct net
|
||||
/* The MAC only supports FD mode */
|
||||
MVNETA_GMAC_CONFIG_FULL_DUPLEX;
|
||||
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
new_an |= MVNETA_GMAC_AN_FLOW_CTRL_EN;
|
||||
break;
|
||||
|
||||
@@ -3686,6 +3688,22 @@ static int mvneta_ethtool_set_ringparam(
|
||||
@@ -3685,6 +3687,22 @@ static int mvneta_ethtool_set_ringparam(
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
|
||||
u8 *data)
|
||||
{
|
||||
@@ -3867,6 +3885,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
@@ -3866,6 +3884,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
.get_drvinfo = mvneta_ethtool_get_drvinfo,
|
||||
.get_ringparam = mvneta_ethtool_get_ringparam,
|
||||
.set_ringparam = mvneta_ethtool_set_ringparam,
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3128,12 +3128,14 @@ static int mvneta_mac_support(struct net
|
||||
@@ -3127,12 +3127,14 @@ static int mvneta_mac_support(struct net
|
||||
state->supported = PHY_10BT_FEATURES |
|
||||
PHY_100BT_FEATURES |
|
||||
SUPPORTED_1000baseT_Full |
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3115,9 +3115,9 @@ static int mvneta_mac_support(struct net
|
||||
@@ -3114,9 +3114,9 @@ static int mvneta_mac_support(struct net
|
||||
switch (mode) {
|
||||
case MLO_AN_8023Z:
|
||||
state->supported = SUPPORTED_1000baseT_Full |
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
state->an_enabled = 1;
|
||||
break;
|
||||
|
||||
@@ -3128,18 +3128,21 @@ static int mvneta_mac_support(struct net
|
||||
@@ -3127,18 +3127,21 @@ static int mvneta_mac_support(struct net
|
||||
state->supported = PHY_10BT_FEATURES |
|
||||
PHY_100BT_FEATURES |
|
||||
SUPPORTED_1000baseT_Full |
|
||||
|
@ -68,7 +68,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
|
||||
|
||||
u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
|
||||
@@ -3277,6 +3294,18 @@ static void mvneta_mac_config(struct net
|
||||
@@ -3276,6 +3293,18 @@ static void mvneta_mac_config(struct net
|
||||
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, new_an);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
static void mvneta_mac_link_down(struct net_device *ndev, unsigned int mode)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(ndev);
|
||||
@@ -3290,6 +3319,9 @@ static void mvneta_mac_link_down(struct
|
||||
@@ -3289,6 +3318,9 @@ static void mvneta_mac_link_down(struct
|
||||
val |= MVNETA_GMAC_FORCE_LINK_DOWN;
|
||||
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
|
||||
}
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
static void mvneta_mac_link_up(struct net_device *ndev, unsigned int mode,
|
||||
@@ -3306,6 +3338,11 @@ static void mvneta_mac_link_up(struct ne
|
||||
@@ -3305,6 +3337,11 @@ static void mvneta_mac_link_up(struct ne
|
||||
}
|
||||
|
||||
mvneta_port_up(pp);
|
||||
@ -109,7 +109,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
|
||||
static const struct phylink_mac_ops mvneta_phylink_ops = {
|
||||
@@ -3745,6 +3782,13 @@ static void mvneta_ethtool_update_stats(
|
||||
@@ -3744,6 +3781,13 @@ static void mvneta_ethtool_update_stats(
|
||||
val64 = (u64)high << 32 | low;
|
||||
pp->ethtool_stats[i] += val64;
|
||||
break;
|
||||
@ -123,7 +123,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3868,6 +3912,47 @@ static int mvneta_ethtool_get_rxfh(struc
|
||||
@@ -3867,6 +3911,47 @@ static int mvneta_ethtool_get_rxfh(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
static const struct net_device_ops mvneta_netdev_ops = {
|
||||
.ndo_open = mvneta_open,
|
||||
.ndo_stop = mvneta_stop,
|
||||
@@ -3899,6 +3984,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
@@ -3898,6 +3983,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
.get_rxnfc = mvneta_ethtool_get_rxnfc,
|
||||
.get_rxfh = mvneta_ethtool_get_rxfh,
|
||||
.set_rxfh = mvneta_ethtool_set_rxfh,
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3912,6 +3912,22 @@ static int mvneta_ethtool_get_rxfh(struc
|
||||
@@ -3911,6 +3911,22 @@ static int mvneta_ethtool_get_rxfh(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
static int mvneta_ethtool_get_eee(struct net_device *dev,
|
||||
struct ethtool_eee *eee)
|
||||
{
|
||||
@@ -3984,6 +4000,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
@@ -3983,6 +3999,8 @@ const struct ethtool_ops mvneta_eth_tool
|
||||
.get_rxnfc = mvneta_ethtool_get_rxnfc,
|
||||
.get_rxfh = mvneta_ethtool_get_rxfh,
|
||||
.set_rxfh = mvneta_ethtool_set_rxfh,
|
||||
|
@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3985,6 +3985,16 @@ static int mvneta_ethtool_set_eee(struct
|
||||
@@ -3984,6 +3984,16 @@ static int mvneta_ethtool_set_eee(struct
|
||||
return phylink_ethtool_set_eee(pp->phylink, eee);
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops mvneta_netdev_ops = {
|
||||
.ndo_open = mvneta_open,
|
||||
.ndo_stop = mvneta_stop,
|
||||
@@ -3995,6 +4005,7 @@ static const struct net_device_ops mvnet
|
||||
@@ -3994,6 +4004,7 @@ static const struct net_device_ops mvnet
|
||||
.ndo_fix_features = mvneta_fix_features,
|
||||
.ndo_get_stats64 = mvneta_get_stats64,
|
||||
.ndo_do_ioctl = mvneta_ioctl,
|
||||
|
@ -23,7 +23,7 @@ Changes since v2:
|
||||
|
||||
--- a/drivers/crypto/mxs-dcp.c
|
||||
+++ b/drivers/crypto/mxs-dcp.c
|
||||
@@ -775,6 +775,24 @@ static void dcp_sha_cra_exit(struct cryp
|
||||
@@ -782,6 +782,24 @@ static void dcp_sha_cra_exit(struct cryp
|
||||
{
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ Changes since v2:
|
||||
/* AES 128 ECB and AES 128 CBC */
|
||||
static struct crypto_alg dcp_aes_algs[] = {
|
||||
{
|
||||
@@ -834,8 +852,11 @@ static struct ahash_alg dcp_sha1_alg = {
|
||||
@@ -841,8 +859,11 @@ static struct ahash_alg dcp_sha1_alg = {
|
||||
.final = dcp_sha_final,
|
||||
.finup = dcp_sha_finup,
|
||||
.digest = dcp_sha_digest,
|
||||
@ -60,7 +60,7 @@ Changes since v2:
|
||||
.base = {
|
||||
.cra_name = "sha1",
|
||||
.cra_driver_name = "sha1-dcp",
|
||||
@@ -858,8 +879,11 @@ static struct ahash_alg dcp_sha256_alg =
|
||||
@@ -865,8 +886,11 @@ static struct ahash_alg dcp_sha256_alg =
|
||||
.final = dcp_sha_final,
|
||||
.finup = dcp_sha_finup,
|
||||
.digest = dcp_sha_digest,
|
||||
|
@ -212,7 +212,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
kfree(mtd_list);
|
||||
--- a/drivers/mtd/mtdchar.c
|
||||
+++ b/drivers/mtd/mtdchar.c
|
||||
@@ -465,38 +465,111 @@ static int mtdchar_readoob(struct file *
|
||||
@@ -469,38 +469,111 @@ static int mtdchar_readoob(struct file *
|
||||
}
|
||||
|
||||
/*
|
||||
@ -341,7 +341,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
static int mtdchar_blkpg_ioctl(struct mtd_info *mtd,
|
||||
struct blkpg_ioctl_arg *arg)
|
||||
{
|
||||
@@ -815,16 +888,12 @@ static int mtdchar_ioctl(struct file *fi
|
||||
@@ -819,16 +892,12 @@ static int mtdchar_ioctl(struct file *fi
|
||||
{
|
||||
struct nand_oobinfo oi;
|
||||
|
||||
@ -362,7 +362,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
if (copy_to_user(argp, &oi, sizeof(struct nand_oobinfo)))
|
||||
return -EFAULT;
|
||||
@@ -913,14 +982,14 @@ static int mtdchar_ioctl(struct file *fi
|
||||
@@ -917,14 +986,14 @@ static int mtdchar_ioctl(struct file *fi
|
||||
{
|
||||
struct nand_ecclayout_user *usrlay;
|
||||
|
||||
@ -4297,7 +4297,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -737,8 +869,8 @@ static const struct flash_info spi_nor_i
|
||||
@@ -743,8 +875,8 @@ static const struct flash_info spi_nor_i
|
||||
{ "n25q032a", INFO(0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) },
|
||||
{ "n25q064", INFO(0x20ba17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q064a", INFO(0x20bb17, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
@ -4308,7 +4308,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q512a", INFO(0x20bb20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
|
||||
{ "n25q512ax3", INFO(0x20ba20, 0, 64 * 1024, 1024, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) },
|
||||
@@ -772,6 +904,7 @@ static const struct flash_info spi_nor_i
|
||||
@@ -778,6 +910,7 @@ static const struct flash_info spi_nor_i
|
||||
{ "s25fl008k", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
@ -4316,7 +4316,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "s25fl132k", INFO(0x014016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "s25fl164k", INFO(0x014017, 0, 64 * 1024, 128, SECT_4K) },
|
||||
{ "s25fl204k", INFO(0x014013, 0, 64 * 1024, 8, SECT_4K | SPI_NOR_DUAL_READ) },
|
||||
@@ -835,11 +968,23 @@ static const struct flash_info spi_nor_i
|
||||
@@ -841,11 +974,23 @@ static const struct flash_info spi_nor_i
|
||||
{ "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) },
|
||||
{ "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) },
|
||||
@ -4343,7 +4343,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
|
||||
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
|
||||
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
|
||||
@@ -862,7 +1007,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -868,7 +1013,7 @@ static const struct flash_info *spi_nor_
|
||||
|
||||
tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN);
|
||||
if (tmp < 0) {
|
||||
@ -4352,7 +4352,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
return ERR_PTR(tmp);
|
||||
}
|
||||
|
||||
@@ -873,7 +1018,7 @@ static const struct flash_info *spi_nor_
|
||||
@@ -879,7 +1024,7 @@ static const struct flash_info *spi_nor_
|
||||
return &spi_nor_ids[tmp];
|
||||
}
|
||||
}
|
||||
@ -4361,7 +4361,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
id[0], id[1], id[2]);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
@@ -1019,6 +1164,8 @@ static int macronix_quad_enable(struct s
|
||||
@@ -1025,6 +1170,8 @@ static int macronix_quad_enable(struct s
|
||||
int ret, val;
|
||||
|
||||
val = read_sr(nor);
|
||||
@ -4370,7 +4370,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
write_enable(nor);
|
||||
|
||||
write_sr(nor, val | SR_QUAD_EN_MX);
|
||||
@@ -1107,7 +1254,7 @@ static int set_quad_mode(struct spi_nor
|
||||
@@ -1113,7 +1260,7 @@ static int set_quad_mode(struct spi_nor
|
||||
static int spi_nor_check(struct spi_nor *nor)
|
||||
{
|
||||
if (!nor->dev || !nor->read || !nor->write ||
|
||||
@ -4379,7 +4379,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
pr_err("spi-nor: please fill all the necessary fields!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1120,7 +1267,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1126,7 +1273,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
const struct flash_info *info = NULL;
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
@ -4388,7 +4388,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -1174,6 +1321,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1180,6 +1327,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
info->flags & SPI_NOR_HAS_LOCK) {
|
||||
write_enable(nor);
|
||||
write_sr(nor, 0);
|
||||
@ -4396,7 +4396,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
}
|
||||
|
||||
if (!mtd->name)
|
||||
@@ -1208,6 +1356,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1214,6 +1362,8 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
|
||||
if (info->flags & USE_FSR)
|
||||
nor->flags |= SNOR_F_USE_FSR;
|
||||
@ -4405,7 +4405,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
#ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
|
||||
/* prefer "small sector" erase if possible */
|
||||
@@ -1310,6 +1460,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1316,6 +1466,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
nor->addr_width = 3;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
#include <media/v4l2-common.h>
|
||||
|
||||
@@ -1092,9 +1097,149 @@ static void uvc_video_decode_data(struct
|
||||
@@ -1104,9 +1109,149 @@ static void uvc_video_decode_data(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
/* Mark the buffer as done if the EOF marker is set. */
|
||||
if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
|
||||
uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
|
||||
@@ -1507,6 +1652,8 @@ static int uvc_init_video_isoc(struct uv
|
||||
@@ -1519,6 +1664,8 @@ static int uvc_init_video_isoc(struct uv
|
||||
if (npackets == 0)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1014,6 +1014,66 @@ write_err:
|
||||
@@ -1020,6 +1020,66 @@ write_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
static int macronix_quad_enable(struct spi_nor *nor)
|
||||
{
|
||||
int ret, val;
|
||||
@@ -1201,10 +1261,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1207,10 +1267,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;
|
||||
@@ -1232,11 +1294,20 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
@@ -1238,11 +1300,20 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
mtd->writebufsize = nor->page_size;
|
||||
|
||||
if (np) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user