kernel: update kernel 4.4 to version 4.4.110

This fixes:  CVE-2017-5754

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2018-01-06 02:08:42 +01:00
parent ddedcb19e5
commit 7f5a040359
37 changed files with 149 additions and 148 deletions

View File

@ -3,10 +3,10 @@
LINUX_RELEASE?=1 LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .43 LINUX_VERSION-3.18 = .43
LINUX_VERSION-4.4 = .108 LINUX_VERSION-4.4 = .110
LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
LINUX_KERNEL_HASH-4.4.108 = 5a001198625ce9f7b0ef1e4b43e033aea859e1ef3509532412cce8f0375ba51a LINUX_KERNEL_HASH-4.4.110 = d099175aac5678e6cad2f23cd56ed22a2857143c0c18489390c95ba8c441db58
ifdef KERNEL_PATCHVER ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

View File

@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
#include "xhci.h" #include "xhci.h"
#include "xhci-trace.h" #include "xhci-trace.h"
@@ -224,6 +226,458 @@ static void xhci_pme_acpi_rtd3_enable(st @@ -227,6 +229,458 @@ static void xhci_pme_acpi_rtd3_enable(st
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */ #endif /* CONFIG_ACPI */
@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
/* called during probe() after chip reset completes */ /* called during probe() after chip reset completes */
static int xhci_pci_setup(struct usb_hcd *hcd) static int xhci_pci_setup(struct usb_hcd *hcd)
{ {
@@ -263,6 +717,22 @@ static int xhci_pci_probe(struct pci_dev @@ -266,6 +720,22 @@ static int xhci_pci_probe(struct pci_dev
struct hc_driver *driver; struct hc_driver *driver;
struct usb_hcd *hcd; struct usb_hcd *hcd;
@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
driver = (struct hc_driver *)id->driver_data; driver = (struct hc_driver *)id->driver_data;
/* Prevent runtime suspending between USB-2 and USB-3 initialization */ /* Prevent runtime suspending between USB-2 and USB-3 initialization */
@@ -320,6 +790,16 @@ static void xhci_pci_remove(struct pci_d @@ -323,6 +793,16 @@ static void xhci_pci_remove(struct pci_d
{ {
struct xhci_hcd *xhci; struct xhci_hcd *xhci;

View File

@ -13,8 +13,8 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c --- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c
@@ -188,7 +188,7 @@ static void xhci_pci_quirks(struct devic @@ -191,7 +191,7 @@ static void xhci_pci_quirks(struct devic
} xhci->quirks |= XHCI_TRUST_TX_LENGTH;
if (pdev->vendor == PCI_VENDOR_ID_RENESAS && if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
pdev->device == 0x0015) pdev->device == 0x0015)
- xhci->quirks |= XHCI_RESET_ON_RESUME; - xhci->quirks |= XHCI_RESET_ON_RESUME;

View File

@ -491,7 +491,7 @@
memcpy(p, foc->val, foc->len); memcpy(p, foc->val, foc->len);
--- a/net/ipv4/igmp.c --- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c
@@ -505,7 +505,7 @@ static struct sk_buff *add_grec(struct s @@ -529,7 +529,7 @@ static struct sk_buff *add_grec(struct s
if (!skb) if (!skb)
return NULL; return NULL;
psrc = (__be32 *)skb_put(skb, sizeof(__be32)); psrc = (__be32 *)skb_put(skb, sizeof(__be32));

View File

@ -1,6 +1,6 @@
--- a/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c
@@ -1228,24 +1228,7 @@ void netlink_detachskb(struct sock *sk, @@ -1231,24 +1231,7 @@ void netlink_detachskb(struct sock *sk,
static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation) static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
{ {

View File

@ -133,7 +133,7 @@
} }
--- a/mm/vmstat.c --- a/mm/vmstat.c
+++ b/mm/vmstat.c +++ b/mm/vmstat.c
@@ -1555,10 +1555,12 @@ static int __init setup_vmstat(void) @@ -1556,10 +1556,12 @@ static int __init setup_vmstat(void)
cpu_notifier_register_done(); cpu_notifier_register_done();
#endif #endif
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS

View File

@ -1,6 +1,6 @@
--- a/init/main.c --- a/init/main.c
+++ b/init/main.c +++ b/init/main.c
@@ -964,7 +964,8 @@ static int __ref kernel_init(void *unuse @@ -966,7 +966,8 @@ static int __ref kernel_init(void *unuse
panic("Requested init %s failed (error %d).", panic("Requested init %s failed (error %d).",
execute_command, ret); execute_command, ret);
} }

View File

@ -1,6 +1,6 @@
--- a/init/main.c --- a/init/main.c
+++ b/init/main.c +++ b/init/main.c
@@ -355,6 +355,29 @@ static inline void setup_nr_cpu_ids(void @@ -356,6 +356,29 @@ static inline void setup_nr_cpu_ids(void
static inline void smp_prepare_cpus(unsigned int maxcpus) { } static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#endif #endif
@ -30,7 +30,7 @@
/* /*
* We need to store the untouched command line for future reference. * We need to store the untouched command line for future reference.
* We also need to store the touched command line since the parameter * We also need to store the touched command line since the parameter
@@ -527,6 +550,7 @@ asmlinkage __visible void __init start_k @@ -529,6 +552,7 @@ asmlinkage __visible void __init start_k
pr_notice("%s", linux_banner); pr_notice("%s", linux_banner);
setup_arch(&command_line); setup_arch(&command_line);
mm_init_cpumask(&init_mm); mm_init_cpumask(&init_mm);

View File

@ -153,7 +153,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
} }
--- a/init/main.c --- a/init/main.c
+++ b/init/main.c +++ b/init/main.c
@@ -88,6 +88,10 @@ @@ -89,6 +89,10 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
@ -164,7 +164,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
static int kernel_init(void *); static int kernel_init(void *);
extern void init_IRQ(void); extern void init_IRQ(void);
@@ -560,6 +564,18 @@ asmlinkage __visible void __init start_k @@ -562,6 +566,18 @@ asmlinkage __visible void __init start_k
page_alloc_init(); page_alloc_init();
pr_notice("Kernel command line: %s\n", boot_command_line); pr_notice("Kernel command line: %s\n", boot_command_line);

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1067,15 +1067,28 @@ static void mvneta_defaults_set(struct m @@ -1071,15 +1071,28 @@ static void mvneta_defaults_set(struct m
MVNETA_GMAC_AN_SPEED_EN | MVNETA_GMAC_AN_SPEED_EN |
MVNETA_GMAC_AN_DUPLEX_EN; MVNETA_GMAC_AN_DUPLEX_EN;
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
mvneta_set_ucast_table(pp, -1); mvneta_set_ucast_table(pp, -1);
@@ -3228,9 +3241,6 @@ static int mvneta_port_power_up(struct m @@ -3232,9 +3245,6 @@ static int mvneta_port_power_up(struct m
return -EINVAL; return -EINVAL;
} }

View File

@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)]; u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
}; };
@@ -973,6 +973,44 @@ static void mvneta_set_other_mcast_table @@ -977,6 +977,44 @@ static void mvneta_set_other_mcast_table
mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val);
} }
@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* This method sets defaults to the NETA port: /* This method sets defaults to the NETA port:
* Clears interrupt Cause and Mask registers. * Clears interrupt Cause and Mask registers.
* Clears all MAC tables. * Clears all MAC tables.
@@ -1058,39 +1096,7 @@ static void mvneta_defaults_set(struct m @@ -1062,39 +1100,7 @@ static void mvneta_defaults_set(struct m
val &= ~MVNETA_PHY_POLLING_ENABLE; val &= ~MVNETA_PHY_POLLING_ENABLE;
mvreg_write(pp, MVNETA_UNIT_CONTROL, val); mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
@ -118,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_set_ucast_table(pp, -1); mvneta_set_ucast_table(pp, -1);
mvneta_set_special_mcast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1);
mvneta_set_other_mcast_table(pp, -1); mvneta_set_other_mcast_table(pp, -1);
@@ -2954,10 +2960,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) int mvneta_ethtool_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{ {
struct mvneta_port *pp = netdev_priv(dev); struct mvneta_port *pp = netdev_priv(dev);

View File

@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
/* Stop the Ethernet port activity */ /* Stop the Ethernet port activity */
@@ -1067,7 +1068,7 @@ static void mvneta_defaults_set(struct m @@ -1071,7 +1072,7 @@ static void mvneta_defaults_set(struct m
mvreg_write(pp, MVNETA_ACC_MODE, val); mvreg_write(pp, MVNETA_ACC_MODE, val);
/* Update val of portCfg register accordingly with all RxQueue types */ /* Update val of portCfg register accordingly with all RxQueue types */
@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_PORT_CONFIG, val); mvreg_write(pp, MVNETA_PORT_CONFIG, val);
val = 0; val = 0;
@@ -2101,19 +2102,19 @@ static void mvneta_set_rx_mode(struct ne @@ -2105,19 +2106,19 @@ static void mvneta_set_rx_mode(struct ne
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
/* Accept all: Multicast + Unicast */ /* Accept all: Multicast + Unicast */
mvneta_rx_unicast_promisc_set(pp, 1); mvneta_rx_unicast_promisc_set(pp, 1);
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} else { } else {
/* Accept only initialized multicast */ /* Accept only initialized multicast */
mvneta_set_special_mcast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1);
@@ -2122,7 +2123,7 @@ static void mvneta_set_rx_mode(struct ne @@ -2126,7 +2127,7 @@ static void mvneta_set_rx_mode(struct ne
if (!netdev_mc_empty(dev)) { if (!netdev_mc_empty(dev)) {
netdev_for_each_mc_addr(ha, dev) { netdev_for_each_mc_addr(ha, dev) {
mvneta_mcast_addr_set(pp, ha->addr, mvneta_mcast_addr_set(pp, ha->addr,
@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
} }
} }
@@ -2205,7 +2206,7 @@ static int mvneta_poll(struct napi_struc @@ -2209,7 +2210,7 @@ static int mvneta_poll(struct napi_struc
* RX packets * RX packets
*/ */
cause_rx_tx |= port->cause_rx_tx; cause_rx_tx |= port->cause_rx_tx;
@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
budget -= rx_done; budget -= rx_done;
if (budget > 0) { if (budget > 0) {
@@ -2418,17 +2419,17 @@ static void mvneta_cleanup_txqs(struct m @@ -2422,17 +2423,17 @@ static void mvneta_cleanup_txqs(struct m
/* Cleanup all Rx queues */ /* Cleanup all Rx queues */
static void mvneta_cleanup_rxqs(struct mvneta_port *pp) static void mvneta_cleanup_rxqs(struct mvneta_port *pp)
{ {
@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_cleanup_rxqs(pp); mvneta_cleanup_rxqs(pp);
return err; return err;
} }
@@ -2634,7 +2635,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); mvneta_mac_addr_set(pp, dev->dev_addr, -1);
/* Set new addr in hw */ /* 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); eth_commit_mac_addr_change(dev, addr);
return 0; return 0;
@@ -2753,7 +2754,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; 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) { for_each_online_cpu(cpu) {
if (i == online_cpu_idx) if (i == online_cpu_idx)
@@ -3361,6 +3362,8 @@ static int mvneta_probe(struct platform_ @@ -3365,6 +3366,8 @@ static int mvneta_probe(struct platform_
strcmp(managed, "in-band-status") == 0); strcmp(managed, "in-band-status") == 0);
pp->cpu_notifier.notifier_call = mvneta_percpu_notifier; pp->cpu_notifier.notifier_call = mvneta_percpu_notifier;

View File

@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
/* Stop the Ethernet port activity */ /* Stop the Ethernet port activity */
@@ -1026,6 +1039,7 @@ static void mvneta_defaults_set(struct m @@ -1030,6 +1043,7 @@ static void mvneta_defaults_set(struct m
int cpu; int cpu;
int queue; int queue;
u32 val; u32 val;
@ -55,7 +55,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Clear all Cause registers */ /* Clear all Cause registers */
mvreg_write(pp, MVNETA_INTR_NEW_CAUSE, 0); mvreg_write(pp, MVNETA_INTR_NEW_CAUSE, 0);
@@ -1041,13 +1055,23 @@ static void mvneta_defaults_set(struct m @@ -1045,13 +1059,23 @@ static void mvneta_defaults_set(struct m
/* Enable MBUS Retry bit16 */ /* Enable MBUS Retry bit16 */
mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20); mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20);
@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Reset RX and TX DMAs */ /* Reset RX and TX DMAs */
mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET);
@@ -2174,6 +2198,7 @@ static int mvneta_poll(struct napi_struc @@ -2178,6 +2202,7 @@ static int mvneta_poll(struct napi_struc
{ {
int rx_done = 0; int rx_done = 0;
u32 cause_rx_tx; u32 cause_rx_tx;
@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_port *pp = netdev_priv(napi->dev); struct mvneta_port *pp = netdev_priv(napi->dev);
struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports);
@@ -2205,8 +2230,15 @@ static int mvneta_poll(struct napi_struc @@ -2209,8 +2234,15 @@ static int mvneta_poll(struct napi_struc
/* For the case where the last mvneta_poll did not process all /* For the case where the last mvneta_poll did not process all
* RX packets * RX packets
*/ */
@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
budget -= rx_done; budget -= rx_done;
if (budget > 0) { if (budget > 0) {
@@ -2419,19 +2451,27 @@ static void mvneta_cleanup_txqs(struct m @@ -2423,19 +2455,27 @@ static void mvneta_cleanup_txqs(struct m
/* Cleanup all Rx queues */ /* Cleanup all Rx queues */
static void mvneta_cleanup_rxqs(struct mvneta_port *pp) static void mvneta_cleanup_rxqs(struct mvneta_port *pp)
{ {
@ -145,7 +145,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
return 0; return 0;
@@ -2455,6 +2495,19 @@ static int mvneta_setup_txqs(struct mvne @@ -2459,6 +2499,19 @@ static int mvneta_setup_txqs(struct mvne
return 0; return 0;
} }
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mvneta_start_dev(struct mvneta_port *pp) static void mvneta_start_dev(struct mvneta_port *pp)
{ {
unsigned int cpu; unsigned int cpu;
@@ -2472,11 +2525,10 @@ static void mvneta_start_dev(struct mvne @@ -2476,11 +2529,10 @@ static void mvneta_start_dev(struct mvne
napi_enable(&port->napi); napi_enable(&port->napi);
} }
@ -181,7 +181,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_INTR_MISC_MASK, mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE | MVNETA_CAUSE_PHY_STATUS_CHANGE |
MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_LINK_CHANGE |
@@ -2752,22 +2804,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) static void mvneta_percpu_elect(struct mvneta_port *pp)
{ {
@ -227,7 +227,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
}; };
@@ -2802,12 +2867,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); mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0);
napi_enable(&port->napi); napi_enable(&port->napi);
@ -251,7 +251,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_INTR_NEW_MASK, mvreg_write(pp, MVNETA_INTR_NEW_MASK,
MVNETA_RX_INTR_MASK(rxq_number) | MVNETA_RX_INTR_MASK(rxq_number) |
MVNETA_TX_INTR_MASK(txq_number) | MVNETA_TX_INTR_MASK(txq_number) |
@@ -2858,7 +2933,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) static int mvneta_open(struct net_device *dev)
{ {
struct mvneta_port *pp = netdev_priv(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->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu);
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
@@ -2888,8 +2963,13 @@ static int mvneta_open(struct net_device @@ -2892,8 +2967,13 @@ static int mvneta_open(struct net_device
*/ */
mvneta_percpu_disable(pp); mvneta_percpu_disable(pp);

View File

@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
/* The mvneta_tx_desc and mvneta_rx_desc structures describe the /* The mvneta_tx_desc and mvneta_rx_desc structures describe the
@@ -1067,7 +1074,7 @@ static void mvneta_defaults_set(struct m @@ -1071,7 +1078,7 @@ static void mvneta_defaults_set(struct m
if ((rxq % max_cpu) == cpu) if ((rxq % max_cpu) == cpu)
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq); rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq);
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
txq_map = MVNETA_CPU_TXQ_ACCESS_ALL_MASK; txq_map = MVNETA_CPU_TXQ_ACCESS_ALL_MASK;
mvreg_write(pp, MVNETA_CPU_MAP(cpu), rxq_map | txq_map); mvreg_write(pp, MVNETA_CPU_MAP(cpu), rxq_map | txq_map);
@@ -2508,6 +2515,18 @@ static void mvneta_percpu_unmask_interru @@ -2512,6 +2519,18 @@ static void mvneta_percpu_unmask_interru
MVNETA_MISCINTR_INTR_MASK); MVNETA_MISCINTR_INTR_MASK);
} }
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mvneta_start_dev(struct mvneta_port *pp) static void mvneta_start_dev(struct mvneta_port *pp)
{ {
unsigned int cpu; unsigned int cpu;
@@ -3229,6 +3248,106 @@ static int mvneta_ethtool_get_sset_count @@ -3233,6 +3252,106 @@ static int mvneta_ethtool_get_sset_count
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct net_device_ops mvneta_netdev_ops = { static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open, .ndo_open = mvneta_open,
.ndo_stop = mvneta_stop, .ndo_stop = mvneta_stop,
@@ -3253,6 +3372,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_strings = mvneta_ethtool_get_strings,
.get_ethtool_stats = mvneta_ethtool_get_stats, .get_ethtool_stats = mvneta_ethtool_get_stats,
.get_sset_count = mvneta_ethtool_get_sset_count, .get_sset_count = mvneta_ethtool_get_sset_count,
@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
/* Initialize hw */ /* Initialize hw */
@@ -3444,6 +3567,8 @@ static int mvneta_probe(struct platform_ @@ -3448,6 +3571,8 @@ static int mvneta_probe(struct platform_
pp->rxq_def = rxq_def; pp->rxq_def = rxq_def;

View File

@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
struct mvneta_rx_queue { struct mvneta_rx_queue {
@@ -1062,20 +1066,30 @@ static void mvneta_defaults_set(struct m @@ -1066,20 +1070,30 @@ static void mvneta_defaults_set(struct m
/* Enable MBUS Retry bit16 */ /* Enable MBUS Retry bit16 */
mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20); mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20);
@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_CPU_MAP(cpu), rxq_map | txq_map); mvreg_write(pp, MVNETA_CPU_MAP(cpu), rxq_map | txq_map);
} }
@@ -2362,6 +2376,8 @@ static void mvneta_rxq_deinit(struct mvn @@ -2366,6 +2380,8 @@ static void mvneta_rxq_deinit(struct mvn
static int mvneta_txq_init(struct mvneta_port *pp, static int mvneta_txq_init(struct mvneta_port *pp,
struct mvneta_tx_queue *txq) struct mvneta_tx_queue *txq)
{ {
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
txq->size = pp->tx_ring_size; txq->size = pp->tx_ring_size;
/* A queue must always have room for at least one skb. /* A queue must always have room for at least one skb.
@@ -2414,6 +2430,14 @@ static int mvneta_txq_init(struct mvneta @@ -2418,6 +2434,14 @@ static int mvneta_txq_init(struct mvneta
} }
mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal); mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal);
@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
} }
@@ -2836,13 +2860,23 @@ static void mvneta_percpu_elect(struct m @@ -2840,13 +2864,23 @@ static void mvneta_percpu_elect(struct m
if ((rxq % max_cpu) == cpu) if ((rxq % max_cpu) == cpu)
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq); rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq);

View File

@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3240,26 +3240,25 @@ static void mvneta_ethtool_update_stats( @@ -3244,26 +3244,25 @@ static void mvneta_ethtool_update_stats(
const struct mvneta_statistic *s; const struct mvneta_statistic *s;
void __iomem *base = pp->base; void __iomem *base = pp->base;
u32 high, low, val; u32 high, low, val;

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2847,9 +2847,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) 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(); max_cpu = num_present_cpus();
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
@@ -2860,7 +2865,7 @@ static void mvneta_percpu_elect(struct m @@ -2864,7 +2869,7 @@ static void mvneta_percpu_elect(struct m
if ((rxq % max_cpu) == cpu) if ((rxq % max_cpu) == cpu)
rxq_map |= MVNETA_CPU_RXQ_ACCESS(rxq); 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 /* Map the default receive queue queue to the
* elected CPU * elected CPU
*/ */
@@ -2871,7 +2876,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 * the CPU bound to the default RX queue
*/ */
if (txq_number == 1) if (txq_number == 1)

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2553,7 +2553,7 @@ static void mvneta_percpu_mask_interrupt @@ -2557,7 +2557,7 @@ static void mvneta_percpu_mask_interrupt
static void mvneta_start_dev(struct mvneta_port *pp) static void mvneta_start_dev(struct mvneta_port *pp)
{ {
@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_max_rx_size_set(pp, pp->pkt_size);
mvneta_txq_max_tx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size);
@@ -2569,9 +2569,8 @@ static void mvneta_start_dev(struct mvne @@ -2573,9 +2573,8 @@ static void mvneta_start_dev(struct mvne
} }
/* Unmask interrupts. It has to be done from each CPU */ /* Unmask interrupts. It has to be done from each CPU */
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_INTR_MISC_MASK, mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE | MVNETA_CAUSE_PHY_STATUS_CHANGE |
MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_LINK_CHANGE |
@@ -2991,7 +2990,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) static int mvneta_open(struct net_device *dev)
{ {
struct mvneta_port *pp = netdev_priv(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->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu);
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
@@ -3024,9 +3023,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 /* Enable per-CPU interrupt on all the CPU to handle our RX
* queue interrupts * 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 /* Register a CPU notifier to handle the case where our CPU
@@ -3313,9 +3310,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); netif_tx_stop_all_queues(pp->dev);

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1036,6 +1036,43 @@ static void mvneta_set_autoneg(struct mv @@ -1040,6 +1040,43 @@ static void mvneta_set_autoneg(struct mv
} }
} }
@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* This method sets defaults to the NETA port: /* This method sets defaults to the NETA port:
* Clears interrupt Cause and Mask registers. * Clears interrupt Cause and Mask registers.
* Clears all MAC tables. * Clears all MAC tables.
@@ -1053,14 +1090,10 @@ static void mvneta_defaults_set(struct m @@ -1057,14 +1094,10 @@ static void mvneta_defaults_set(struct m
int max_cpu = num_present_cpus(); int max_cpu = num_present_cpus();
/* Clear all Cause registers */ /* Clear all Cause registers */
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_INTR_ENABLE, 0); mvreg_write(pp, MVNETA_INTR_ENABLE, 0);
/* Enable MBUS Retry bit16 */ /* Enable MBUS Retry bit16 */
@@ -2526,31 +2559,6 @@ static int mvneta_setup_txqs(struct mvne @@ -2530,31 +2563,6 @@ static int mvneta_setup_txqs(struct mvne
return 0; return 0;
} }
@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mvneta_start_dev(struct mvneta_port *pp) static void mvneta_start_dev(struct mvneta_port *pp)
{ {
int cpu; int cpu;
@@ -2601,13 +2609,10 @@ static void mvneta_stop_dev(struct mvnet @@ -2605,13 +2613,10 @@ static void mvneta_stop_dev(struct mvnet
mvneta_port_disable(pp); mvneta_port_disable(pp);
/* Clear all ethernet port interrupts */ /* Clear all ethernet port interrupts */
@ -126,7 +126,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_tx_reset(pp); mvneta_tx_reset(pp);
mvneta_rx_reset(pp); mvneta_rx_reset(pp);
@@ -2919,9 +2924,7 @@ static int mvneta_percpu_notifier(struct @@ -2923,9 +2928,7 @@ static int mvneta_percpu_notifier(struct
} }
/* Mask all ethernet port interrupts */ /* Mask all ethernet port interrupts */
@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_enable(&port->napi); napi_enable(&port->napi);
@@ -2936,14 +2939,8 @@ static int mvneta_percpu_notifier(struct @@ -2940,14 +2943,8 @@ static int mvneta_percpu_notifier(struct
*/ */
mvneta_percpu_elect(pp); mvneta_percpu_elect(pp);
@ -154,7 +154,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_INTR_MISC_MASK, mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE | MVNETA_CAUSE_PHY_STATUS_CHANGE |
MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_LINK_CHANGE |
@@ -2954,9 +2951,7 @@ static int mvneta_percpu_notifier(struct @@ -2958,9 +2955,7 @@ static int mvneta_percpu_notifier(struct
case CPU_DOWN_PREPARE_FROZEN: case CPU_DOWN_PREPARE_FROZEN:
netif_tx_stop_all_queues(pp->dev); netif_tx_stop_all_queues(pp->dev);
/* Mask all ethernet port interrupts */ /* Mask all ethernet port interrupts */
@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_synchronize(&port->napi); napi_synchronize(&port->napi);
napi_disable(&port->napi); napi_disable(&port->napi);
@@ -2972,10 +2967,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 */ /* Check if a new CPU must be elected now this on is down */
mvneta_percpu_elect(pp); mvneta_percpu_elect(pp);
/* Unmask all ethernet port interrupts */ /* Unmask all ethernet port interrupts */

View File

@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Core clock */ /* Core clock */
struct clk *clk; struct clk *clk;
@@ -2853,6 +2857,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; 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 /* 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. * the other cases, use the cpu 0 which can't be offline.
*/ */
@@ -2896,6 +2906,7 @@ static void mvneta_percpu_elect(struct m @@ -2900,6 +2910,7 @@ static void mvneta_percpu_elect(struct m
i++; i++;
} }
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static int mvneta_percpu_notifier(struct notifier_block *nfb, static int mvneta_percpu_notifier(struct notifier_block *nfb,
@@ -2950,8 +2961,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:
case CPU_DOWN_PREPARE_FROZEN: case CPU_DOWN_PREPARE_FROZEN:
netif_tx_stop_all_queues(pp->dev); netif_tx_stop_all_queues(pp->dev);

View File

@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Core clock */ /* Core clock */
struct clk *clk; struct clk *clk;
@@ -2853,16 +2854,14 @@ static void mvneta_percpu_disable(void * @@ -2857,16 +2858,14 @@ static void mvneta_percpu_disable(void *
disable_percpu_irq(pp->dev->irq); 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 /* 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. * the other cases, use the cpu 0 which can't be offline.
*/ */
@@ -2906,7 +2905,6 @@ static void mvneta_percpu_elect(struct m @@ -2910,7 +2909,6 @@ static void mvneta_percpu_elect(struct m
i++; i++;
} }
@ -55,7 +55,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static int mvneta_percpu_notifier(struct notifier_block *nfb, static int mvneta_percpu_notifier(struct notifier_block *nfb,
@@ -2920,6 +2918,14 @@ static int mvneta_percpu_notifier(struct @@ -2924,6 +2922,14 @@ static int mvneta_percpu_notifier(struct
switch (action) { switch (action) {
case CPU_ONLINE: case CPU_ONLINE:
case CPU_ONLINE_FROZEN: case CPU_ONLINE_FROZEN:
@ -70,7 +70,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
netif_tx_stop_all_queues(pp->dev); netif_tx_stop_all_queues(pp->dev);
/* We have to synchronise on tha napi of each CPU /* We have to synchronise on tha napi of each CPU
@@ -2957,6 +2963,7 @@ static int mvneta_percpu_notifier(struct @@ -2961,6 +2967,7 @@ static int mvneta_percpu_notifier(struct
MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_LINK_CHANGE |
MVNETA_CAUSE_PSC_SYNC_CHANGE); MVNETA_CAUSE_PSC_SYNC_CHANGE);
netif_tx_start_all_queues(pp->dev); netif_tx_start_all_queues(pp->dev);
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN: case CPU_DOWN_PREPARE_FROZEN:
@@ -2981,7 +2988,9 @@ static int mvneta_percpu_notifier(struct @@ -2985,7 +2992,9 @@ static int mvneta_percpu_notifier(struct
case CPU_DEAD: case CPU_DEAD:
case CPU_DEAD_FROZEN: case CPU_DEAD_FROZEN:
/* Check if a new CPU must be elected now this on is down */ /* 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 */ /* Unmask all ethernet port interrupts */
on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
mvreg_write(pp, MVNETA_INTR_MISC_MASK, mvreg_write(pp, MVNETA_INTR_MISC_MASK,
@@ -3033,7 +3042,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); 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 /* Register a CPU notifier to handle the case where our CPU
* might be taken offline. * might be taken offline.
*/ */
@@ -3066,9 +3075,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); 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); on_each_cpu(mvneta_percpu_disable, pp, true);
free_percpu_irq(dev->irq, pp->ports); free_percpu_irq(dev->irq, pp->ports);
mvneta_cleanup_rxqs(pp); mvneta_cleanup_rxqs(pp);
@@ -3339,7 +3357,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); mvreg_write(pp, MVNETA_PORT_CONFIG, val);
/* Update the elected CPU matching the new rxq_def */ /* Update the elected CPU matching the new rxq_def */

View File

@ -495,7 +495,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Start the Ethernet port RX and TX activity */ /* Start the Ethernet port RX and TX activity */
static void mvneta_port_up(struct mvneta_port *pp) static void mvneta_port_up(struct mvneta_port *pp)
{ {
@@ -1147,9 +1379,17 @@ static void mvneta_defaults_set(struct m @@ -1151,9 +1383,17 @@ static void mvneta_defaults_set(struct m
mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); mvreg_write(pp, MVNETA_PORT_RX_RESET, 0);
/* Set Port Acceleration Mode */ /* Set Port Acceleration Mode */
@ -514,7 +514,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Update val of portCfg register accordingly with all RxQueue types */ /* Update val of portCfg register accordingly with all RxQueue types */
val = MVNETA_PORT_CONFIG_DEFL_VALUE(pp->rxq_def); val = MVNETA_PORT_CONFIG_DEFL_VALUE(pp->rxq_def);
mvreg_write(pp, MVNETA_PORT_CONFIG, val); mvreg_write(pp, MVNETA_PORT_CONFIG, val);
@@ -1516,23 +1756,25 @@ static void mvneta_txq_done(struct mvnet @@ -1520,23 +1760,25 @@ static void mvneta_txq_done(struct mvnet
} }
} }
@ -547,7 +547,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int mvneta_rx_refill(struct mvneta_port *pp, static int mvneta_rx_refill(struct mvneta_port *pp,
struct mvneta_rx_desc *rx_desc) struct mvneta_rx_desc *rx_desc)
@@ -1540,7 +1782,7 @@ static int mvneta_rx_refill(struct mvnet @@ -1544,7 +1786,7 @@ static int mvneta_rx_refill(struct mvnet
dma_addr_t phys_addr; dma_addr_t phys_addr;
void *data; void *data;
@ -556,7 +556,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!data) if (!data)
return -ENOMEM; return -ENOMEM;
@@ -1548,7 +1790,7 @@ static int mvneta_rx_refill(struct mvnet @@ -1552,7 +1794,7 @@ static int mvneta_rx_refill(struct mvnet
MVNETA_RX_BUF_SIZE(pp->pkt_size), MVNETA_RX_BUF_SIZE(pp->pkt_size),
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(pp->dev->dev.parent, phys_addr))) { if (unlikely(dma_mapping_error(pp->dev->dev.parent, phys_addr))) {
@ -565,7 +565,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return -ENOMEM; return -ENOMEM;
} }
@@ -1594,22 +1836,156 @@ static void mvneta_rxq_drop_pkts(struct @@ -1598,22 +1840,156 @@ static void mvneta_rxq_drop_pkts(struct
int rx_done, i; int rx_done, i;
rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq);
@ -728,7 +728,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports);
struct net_device *dev = pp->dev; struct net_device *dev = pp->dev;
@@ -1628,21 +2004,29 @@ static int mvneta_rx(struct mvneta_port @@ -1632,21 +2008,29 @@ static int mvneta_rx(struct mvneta_port
/* Fairness NAPI loop */ /* Fairness NAPI loop */
while (rx_done < rx_todo) { while (rx_done < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq); struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
@ -760,7 +760,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev->stats.rx_errors++; dev->stats.rx_errors++;
mvneta_rx_error(pp, rx_desc); mvneta_rx_error(pp, rx_desc);
/* leave the descriptor untouched */ /* leave the descriptor untouched */
@@ -1653,7 +2037,7 @@ static int mvneta_rx(struct mvneta_port @@ -1657,7 +2041,7 @@ static int mvneta_rx(struct mvneta_port
/* better copy a small frame and not unmap the DMA region */ /* better copy a small frame and not unmap the DMA region */
skb = netdev_alloc_skb_ip_align(dev, rx_bytes); skb = netdev_alloc_skb_ip_align(dev, rx_bytes);
if (unlikely(!skb)) if (unlikely(!skb))
@ -769,7 +769,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_sync_single_range_for_cpu(dev->dev.parent, dma_sync_single_range_for_cpu(dev->dev.parent,
rx_desc->buf_phys_addr, rx_desc->buf_phys_addr,
@@ -1671,26 +2055,31 @@ static int mvneta_rx(struct mvneta_port @@ -1675,26 +2059,31 @@ static int mvneta_rx(struct mvneta_port
rcvd_pkts++; rcvd_pkts++;
rcvd_bytes += rx_bytes; rcvd_bytes += rx_bytes;
@ -807,7 +807,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!skb) if (!skb)
goto err_drop_frame; goto err_drop_frame;
@@ -2295,7 +2684,10 @@ static int mvneta_poll(struct napi_struc @@ -2299,7 +2688,10 @@ static int mvneta_poll(struct napi_struc
if (rx_queue) { if (rx_queue) {
rx_queue = rx_queue - 1; rx_queue = rx_queue - 1;
@ -819,7 +819,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
budget -= rx_done; budget -= rx_done;
@@ -2384,9 +2776,17 @@ static int mvneta_rxq_init(struct mvneta @@ -2388,9 +2780,17 @@ static int mvneta_rxq_init(struct mvneta
mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal);
mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal);
@ -840,7 +840,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_rxq_fill(pp, rxq, rxq->size); mvneta_rxq_fill(pp, rxq, rxq->size);
return 0; return 0;
@@ -2659,6 +3059,9 @@ static int mvneta_change_mtu(struct net_ @@ -2663,6 +3063,9 @@ static int mvneta_change_mtu(struct net_
dev->mtu = mtu; dev->mtu = mtu;
if (!netif_running(dev)) { if (!netif_running(dev)) {
@ -850,7 +850,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
netdev_update_features(dev); netdev_update_features(dev);
return 0; return 0;
} }
@@ -2671,6 +3074,9 @@ static int mvneta_change_mtu(struct net_ @@ -2675,6 +3078,9 @@ static int mvneta_change_mtu(struct net_
mvneta_cleanup_txqs(pp); mvneta_cleanup_txqs(pp);
mvneta_cleanup_rxqs(pp); mvneta_cleanup_rxqs(pp);
@ -860,7 +860,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
pp->pkt_size = MVNETA_RX_PKT_SIZE(dev->mtu); pp->pkt_size = MVNETA_RX_PKT_SIZE(dev->mtu);
pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) +
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
@@ -3563,6 +3969,7 @@ static int mvneta_probe(struct platform_ @@ -3567,6 +3973,7 @@ static int mvneta_probe(struct platform_
struct resource *res; struct resource *res;
struct device_node *dn = pdev->dev.of_node; struct device_node *dn = pdev->dev.of_node;
struct device_node *phy_node; struct device_node *phy_node;
@ -868,7 +868,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_port *pp; struct mvneta_port *pp;
struct net_device *dev; struct net_device *dev;
const char *dt_mac_addr; const char *dt_mac_addr;
@@ -3690,26 +4097,39 @@ static int mvneta_probe(struct platform_ @@ -3694,26 +4101,39 @@ static int mvneta_probe(struct platform_
pp->tx_csum_limit = tx_csum_limit; 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) { for_each_present_cpu(cpu) {
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
@@ -3744,6 +4164,13 @@ static int mvneta_probe(struct platform_ @@ -3748,6 +4168,13 @@ static int mvneta_probe(struct platform_
return 0; return 0;
@ -928,7 +928,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err_free_stats: err_free_stats:
free_percpu(pp->stats); free_percpu(pp->stats);
err_free_ports: err_free_ports:
@@ -3773,6 +4200,12 @@ static int mvneta_remove(struct platform @@ -3777,6 +4204,12 @@ static int mvneta_remove(struct platform
of_node_put(pp->phy_node); of_node_put(pp->phy_node);
free_netdev(dev); free_netdev(dev);

View File

@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto bm_mtu_err; goto bm_mtu_err;
} }
mvneta_bm_pool_bufsize_set(pp, bm_pool->buf_size, bm_pool->id); mvneta_bm_pool_bufsize_set(pp, bm_pool->buf_size, bm_pool->id);
@@ -2064,14 +2066,14 @@ err_drop_frame: @@ -2068,14 +2070,14 @@ err_drop_frame:
} }
/* Refill processing */ /* Refill processing */

View File

@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3484,17 +3484,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); struct mvneta_port *pp = netdev_priv(dev);
/* Inform that we are stopping so we don't want to setup the /* 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); on_each_cpu(mvneta_percpu_disable, pp, true);
free_percpu_irq(dev->irq, pp->ports); free_percpu_irq(dev->irq, pp->ports);
mvneta_cleanup_rxqs(pp); mvneta_cleanup_rxqs(pp);
@@ -4027,6 +4027,7 @@ static int mvneta_probe(struct platform_ @@ -4031,6 +4031,7 @@ static int mvneta_probe(struct platform_
dev->ethtool_ops = &mvneta_eth_tool_ops; dev->ethtool_ops = &mvneta_eth_tool_ops;
pp = netdev_priv(dev); pp = netdev_priv(dev);

View File

@ -33,7 +33,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define IS_TSO_HEADER(txq, addr) \ #define IS_TSO_HEADER(txq, addr) \
((addr >= txq->tso_hdrs_phys) && \ ((addr >= txq->tso_hdrs_phys) && \
@@ -2762,9 +2761,6 @@ static int mvneta_rxq_init(struct mvneta @@ -2766,9 +2765,6 @@ static int mvneta_rxq_init(struct mvneta
if (rxq->descs == NULL) if (rxq->descs == NULL)
return -ENOMEM; return -ENOMEM;
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq->last_desc = rxq->size - 1; rxq->last_desc = rxq->size - 1;
/* Set Rx descriptors queue starting address */ /* Set Rx descriptors queue starting address */
@@ -2835,10 +2831,6 @@ static int mvneta_txq_init(struct mvneta @@ -2839,10 +2835,6 @@ static int mvneta_txq_init(struct mvneta
if (txq->descs == NULL) if (txq->descs == NULL)
return -ENOMEM; return -ENOMEM;

View File

@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3040,6 +3040,20 @@ static int mvneta_check_mtu_valid(struct @@ -3044,6 +3044,20 @@ static int mvneta_check_mtu_valid(struct
return mtu; return mtu;
} }
@ -36,7 +36,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Change the device mtu */ /* Change the device mtu */
static int mvneta_change_mtu(struct net_device *dev, int mtu) static int mvneta_change_mtu(struct net_device *dev, int mtu)
{ {
@@ -3064,6 +3078,7 @@ static int mvneta_change_mtu(struct net_ @@ -3068,6 +3082,7 @@ static int mvneta_change_mtu(struct net_
* reallocation of the queues * reallocation of the queues
*/ */
mvneta_stop_dev(pp); mvneta_stop_dev(pp);
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_cleanup_txqs(pp); mvneta_cleanup_txqs(pp);
mvneta_cleanup_rxqs(pp); mvneta_cleanup_rxqs(pp);
@@ -3087,6 +3102,7 @@ static int mvneta_change_mtu(struct net_ @@ -3091,6 +3106,7 @@ static int mvneta_change_mtu(struct net_
return ret; return ret;
} }
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_start_dev(pp); mvneta_start_dev(pp);
mvneta_port_up(pp); mvneta_port_up(pp);
@@ -3240,20 +3256,6 @@ static void mvneta_mdio_remove(struct mv @@ -3244,20 +3260,6 @@ static void mvneta_mdio_remove(struct mv
pp->phy_dev = NULL; pp->phy_dev = NULL;
} }

View File

@ -79,7 +79,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
struct mvneta_bm *bm_priv; struct mvneta_bm *bm_priv;
struct mvneta_bm_pool *pool_long; struct mvneta_bm_pool *pool_long;
@@ -1236,44 +1238,6 @@ static void mvneta_set_other_mcast_table @@ -1240,44 +1242,6 @@ static void mvneta_set_other_mcast_table
mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val);
} }
@ -124,7 +124,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
static void mvneta_percpu_unmask_interrupt(void *arg) static void mvneta_percpu_unmask_interrupt(void *arg)
{ {
struct mvneta_port *pp = arg; struct mvneta_port *pp = arg;
@@ -1421,7 +1385,6 @@ static void mvneta_defaults_set(struct m @@ -1425,7 +1389,6 @@ static void mvneta_defaults_set(struct m
val &= ~MVNETA_PHY_POLLING_ENABLE; val &= ~MVNETA_PHY_POLLING_ENABLE;
mvreg_write(pp, MVNETA_UNIT_CONTROL, val); mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
@ -132,7 +132,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
mvneta_set_ucast_table(pp, -1); mvneta_set_ucast_table(pp, -1);
mvneta_set_special_mcast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1);
mvneta_set_other_mcast_table(pp, -1); mvneta_set_other_mcast_table(pp, -1);
@@ -2614,26 +2577,11 @@ static irqreturn_t mvneta_isr(int irq, v @@ -2618,26 +2581,11 @@ static irqreturn_t mvneta_isr(int irq, v
return IRQ_HANDLED; return IRQ_HANDLED;
} }
@ -161,7 +161,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
/* NAPI handler /* NAPI handler
@@ -2662,12 +2610,11 @@ static int mvneta_poll(struct napi_struc @@ -2666,12 +2614,11 @@ static int mvneta_poll(struct napi_struc
u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE); u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE);
mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
@ -179,7 +179,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
/* Release Tx descriptors */ /* Release Tx descriptors */
@@ -2983,7 +2930,7 @@ static void mvneta_start_dev(struct mvne @@ -2987,7 +2934,7 @@ static void mvneta_start_dev(struct mvne
MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_LINK_CHANGE |
MVNETA_CAUSE_PSC_SYNC_CHANGE); MVNETA_CAUSE_PSC_SYNC_CHANGE);
@ -188,7 +188,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
netif_tx_start_all_queues(pp->dev); netif_tx_start_all_queues(pp->dev);
} }
@@ -2991,7 +2938,7 @@ static void mvneta_stop_dev(struct mvnet @@ -2995,7 +2942,7 @@ static void mvneta_stop_dev(struct mvnet
{ {
unsigned int cpu; unsigned int cpu;
@ -197,7 +197,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
@@ -3161,99 +3108,219 @@ static int mvneta_set_mac_addr(struct ne @@ -3165,99 +3112,219 @@ static int mvneta_set_mac_addr(struct ne
return 0; return 0;
} }
@ -490,7 +490,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 /* Electing a CPU must be done in an atomic way: it should be done
@@ -3501,10 +3568,7 @@ static int mvneta_ioctl(struct net_devic @@ -3505,10 +3572,7 @@ static int mvneta_ioctl(struct net_devic
{ {
struct mvneta_port *pp = netdev_priv(dev); struct mvneta_port *pp = netdev_priv(dev);
@ -502,7 +502,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
/* Ethtool methods */ /* Ethtool methods */
@@ -3514,54 +3578,15 @@ int mvneta_ethtool_get_settings(struct n @@ -3518,54 +3582,15 @@ int mvneta_ethtool_get_settings(struct n
{ {
struct mvneta_port *pp = netdev_priv(dev); struct mvneta_port *pp = netdev_priv(dev);
@ -559,7 +559,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
/* Set interrupt coalescing for ethtools */ /* Set interrupt coalescing for ethtools */
@@ -3669,7 +3694,8 @@ static void mvneta_ethtool_update_stats( @@ -3673,7 +3698,8 @@ static void mvneta_ethtool_update_stats(
{ {
const struct mvneta_statistic *s; const struct mvneta_statistic *s;
void __iomem *base = pp->base; void __iomem *base = pp->base;
@ -569,7 +569,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
u64 val64; u64 val64;
int i; int i;
@@ -3964,14 +3990,13 @@ static int mvneta_probe(struct platform_ @@ -3968,14 +3994,13 @@ static int mvneta_probe(struct platform_
const struct mbus_dram_target_info *dram_target_info; const struct mbus_dram_target_info *dram_target_info;
struct resource *res; struct resource *res;
struct device_node *dn = pdev->dev.of_node; struct device_node *dn = pdev->dev.of_node;
@ -585,7 +585,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
int tx_csum_limit; int tx_csum_limit;
int phy_mode; int phy_mode;
int err; int err;
@@ -3987,31 +4012,11 @@ static int mvneta_probe(struct platform_ @@ -3991,31 +4016,11 @@ static int mvneta_probe(struct platform_
goto err_free_netdev; goto err_free_netdev;
} }
@ -618,7 +618,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
dev->tx_queue_len = MVNETA_MAX_TXD; dev->tx_queue_len = MVNETA_MAX_TXD;
@@ -4022,12 +4027,7 @@ static int mvneta_probe(struct platform_ @@ -4026,12 +4031,7 @@ static int mvneta_probe(struct platform_
pp = netdev_priv(dev); pp = netdev_priv(dev);
spin_lock_init(&pp->lock); spin_lock_init(&pp->lock);
@ -632,7 +632,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
pp->cpu_notifier.notifier_call = mvneta_percpu_notifier; pp->cpu_notifier.notifier_call = mvneta_percpu_notifier;
pp->rxq_def = rxq_def; pp->rxq_def = rxq_def;
@@ -4037,7 +4037,7 @@ static int mvneta_probe(struct platform_ @@ -4041,7 +4041,7 @@ static int mvneta_probe(struct platform_
pp->clk = devm_clk_get(&pdev->dev, NULL); pp->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pp->clk)) { if (IS_ERR(pp->clk)) {
err = PTR_ERR(pp->clk); err = PTR_ERR(pp->clk);
@ -641,7 +641,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
clk_prepare_enable(pp->clk); clk_prepare_enable(pp->clk);
@@ -4140,6 +4140,14 @@ static int mvneta_probe(struct platform_ @@ -4144,6 +4144,14 @@ static int mvneta_probe(struct platform_
dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE; dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE;
dev->gso_max_segs = MVNETA_MAX_TSO_SEGS; dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
@ -656,7 +656,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
err = register_netdev(dev); err = register_netdev(dev);
if (err < 0) { if (err < 0) {
dev_err(&pdev->dev, "failed to register\n"); dev_err(&pdev->dev, "failed to register\n");
@@ -4151,13 +4159,6 @@ static int mvneta_probe(struct platform_ @@ -4155,13 +4163,6 @@ static int mvneta_probe(struct platform_
platform_set_drvdata(pdev, pp->dev); platform_set_drvdata(pdev, pp->dev);
@ -670,7 +670,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
return 0; return 0;
@@ -4169,13 +4170,13 @@ err_netdev: @@ -4173,13 +4174,13 @@ err_netdev:
1 << pp->id); 1 << pp->id);
} }
err_free_stats: err_free_stats:
@ -686,7 +686,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
err_free_irq: err_free_irq:
irq_dispose_mapping(dev->irq); irq_dispose_mapping(dev->irq);
err_free_netdev: err_free_netdev:
@@ -4194,7 +4195,7 @@ static int mvneta_remove(struct platform @@ -4198,7 +4199,7 @@ static int mvneta_remove(struct platform
free_percpu(pp->ports); free_percpu(pp->ports);
free_percpu(pp->stats); free_percpu(pp->stats);
irq_dispose_mapping(dev->irq); irq_dispose_mapping(dev->irq);

View File

@ -14,7 +14,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3589,6 +3589,13 @@ int mvneta_ethtool_set_settings(struct n @@ -3593,6 +3593,13 @@ int mvneta_ethtool_set_settings(struct n
return phylink_ethtool_set_settings(pp->phylink, cmd); 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 */ /* Set interrupt coalescing for ethtools */
static int mvneta_ethtool_set_coalesce(struct net_device *dev, static int mvneta_ethtool_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *c) struct ethtool_coalesce *c)
@@ -3853,6 +3860,7 @@ const struct ethtool_ops mvneta_eth_tool @@ -3857,6 +3864,7 @@ const struct ethtool_ops mvneta_eth_tool
.get_link = ethtool_op_get_link, .get_link = ethtool_op_get_link,
.get_settings = mvneta_ethtool_get_settings, .get_settings = mvneta_ethtool_get_settings,
.set_settings = mvneta_ethtool_set_settings, .set_settings = mvneta_ethtool_set_settings,

View File

@ -14,7 +14,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3208,6 +3208,8 @@ static void mvneta_mac_config(struct net @@ -3212,6 +3212,8 @@ static void mvneta_mac_config(struct net
if (state->advertising & ADVERTISED_Pause) if (state->advertising & ADVERTISED_Pause)
new_an |= MVNETA_GMAC_ADVERT_SYM_FLOW_CTRL; 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) { switch (mode) {
case MLO_AN_SGMII: case MLO_AN_SGMII:
@@ -3232,7 +3234,7 @@ static void mvneta_mac_config(struct net @@ -3236,7 +3238,7 @@ static void mvneta_mac_config(struct net
/* The MAC only supports FD mode */ /* The MAC only supports FD mode */
MVNETA_GMAC_CONFIG_FULL_DUPLEX; 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; new_an |= MVNETA_GMAC_AN_FLOW_CTRL_EN;
break; break;
@@ -3685,6 +3687,22 @@ static int mvneta_ethtool_set_ringparam( @@ -3689,6 +3691,22 @@ static int mvneta_ethtool_set_ringparam(
return 0; 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, static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
u8 *data) u8 *data)
{ {
@@ -3866,6 +3884,8 @@ const struct ethtool_ops mvneta_eth_tool @@ -3870,6 +3888,8 @@ const struct ethtool_ops mvneta_eth_tool
.get_drvinfo = mvneta_ethtool_get_drvinfo, .get_drvinfo = mvneta_ethtool_get_drvinfo,
.get_ringparam = mvneta_ethtool_get_ringparam, .get_ringparam = mvneta_ethtool_get_ringparam,
.set_ringparam = mvneta_ethtool_set_ringparam, .set_ringparam = mvneta_ethtool_set_ringparam,

View File

@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3127,12 +3127,14 @@ static int mvneta_mac_support(struct net @@ -3131,12 +3131,14 @@ static int mvneta_mac_support(struct net
state->supported = PHY_10BT_FEATURES | state->supported = PHY_10BT_FEATURES |
PHY_100BT_FEATURES | PHY_100BT_FEATURES |
SUPPORTED_1000baseT_Full | SUPPORTED_1000baseT_Full |

View File

@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3114,9 +3114,9 @@ static int mvneta_mac_support(struct net @@ -3118,9 +3118,9 @@ static int mvneta_mac_support(struct net
switch (mode) { switch (mode) {
case MLO_AN_8023Z: case MLO_AN_8023Z:
state->supported = SUPPORTED_1000baseT_Full | state->supported = SUPPORTED_1000baseT_Full |
@ -27,7 +27,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
state->an_enabled = 1; state->an_enabled = 1;
break; break;
@@ -3127,18 +3127,21 @@ static int mvneta_mac_support(struct net @@ -3131,18 +3131,21 @@ static int mvneta_mac_support(struct net
state->supported = PHY_10BT_FEATURES | state->supported = PHY_10BT_FEATURES |
PHY_100BT_FEATURES | PHY_100BT_FEATURES |
SUPPORTED_1000baseT_Full | SUPPORTED_1000baseT_Full |

View File

@ -68,7 +68,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)]; u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
u32 indir[MVNETA_RSS_LU_TABLE_SIZE]; u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
@@ -3276,6 +3293,18 @@ static void mvneta_mac_config(struct net @@ -3280,6 +3297,18 @@ static void mvneta_mac_config(struct net
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, new_an); 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) static void mvneta_mac_link_down(struct net_device *ndev, unsigned int mode)
{ {
struct mvneta_port *pp = netdev_priv(ndev); struct mvneta_port *pp = netdev_priv(ndev);
@@ -3289,6 +3318,9 @@ static void mvneta_mac_link_down(struct @@ -3293,6 +3322,9 @@ static void mvneta_mac_link_down(struct
val |= MVNETA_GMAC_FORCE_LINK_DOWN; val |= MVNETA_GMAC_FORCE_LINK_DOWN;
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); 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, static void mvneta_mac_link_up(struct net_device *ndev, unsigned int mode,
@@ -3305,6 +3337,11 @@ static void mvneta_mac_link_up(struct ne @@ -3309,6 +3341,11 @@ static void mvneta_mac_link_up(struct ne
} }
mvneta_port_up(pp); 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 = { static const struct phylink_mac_ops mvneta_phylink_ops = {
@@ -3744,6 +3781,13 @@ static void mvneta_ethtool_update_stats( @@ -3748,6 +3785,13 @@ static void mvneta_ethtool_update_stats(
val64 = (u64)high << 32 | low; val64 = (u64)high << 32 | low;
pp->ethtool_stats[i] += val64; pp->ethtool_stats[i] += val64;
break; break;
@ -123,7 +123,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
} }
} }
} }
@@ -3867,6 +3911,47 @@ static int mvneta_ethtool_get_rxfh(struc @@ -3871,6 +3915,47 @@ static int mvneta_ethtool_get_rxfh(struc
return 0; 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 = { static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open, .ndo_open = mvneta_open,
.ndo_stop = mvneta_stop, .ndo_stop = mvneta_stop,
@@ -3898,6 +3983,8 @@ const struct ethtool_ops mvneta_eth_tool @@ -3902,6 +3987,8 @@ const struct ethtool_ops mvneta_eth_tool
.get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxnfc = mvneta_ethtool_get_rxnfc,
.get_rxfh = mvneta_ethtool_get_rxfh, .get_rxfh = mvneta_ethtool_get_rxfh,
.set_rxfh = mvneta_ethtool_set_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh,

View File

@ -10,7 +10,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3911,6 +3911,22 @@ static int mvneta_ethtool_get_rxfh(struc @@ -3915,6 +3915,22 @@ static int mvneta_ethtool_get_rxfh(struc
return 0; 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, static int mvneta_ethtool_get_eee(struct net_device *dev,
struct ethtool_eee *eee) struct ethtool_eee *eee)
{ {
@@ -3983,6 +3999,8 @@ const struct ethtool_ops mvneta_eth_tool @@ -3987,6 +4003,8 @@ const struct ethtool_ops mvneta_eth_tool
.get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxnfc = mvneta_ethtool_get_rxnfc,
.get_rxfh = mvneta_ethtool_get_rxfh, .get_rxfh = mvneta_ethtool_get_rxfh,
.set_rxfh = mvneta_ethtool_set_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh,

View File

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1695,8 +1695,10 @@ static struct mvneta_tx_queue *mvneta_tx @@ -1699,8 +1699,10 @@ static struct mvneta_tx_queue *mvneta_tx
/* Free tx queue skbuffs */ /* Free tx queue skbuffs */
static void mvneta_txq_bufs_free(struct mvneta_port *pp, static void mvneta_txq_bufs_free(struct mvneta_port *pp,
@ -12,7 +12,7 @@
int i; int i;
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
@@ -1704,6 +1706,11 @@ static void mvneta_txq_bufs_free(struct @@ -1708,6 +1710,11 @@ static void mvneta_txq_bufs_free(struct
txq->txq_get_index; txq->txq_get_index;
struct sk_buff *skb = txq->tx_skb[txq->txq_get_index]; struct sk_buff *skb = txq->tx_skb[txq->txq_get_index];
@ -24,7 +24,7 @@
mvneta_txq_inc_get(txq); mvneta_txq_inc_get(txq);
if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr)) if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
@@ -1714,6 +1721,8 @@ static void mvneta_txq_bufs_free(struct @@ -1718,6 +1725,8 @@ static void mvneta_txq_bufs_free(struct
continue; continue;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
@ -33,7 +33,7 @@
} }
/* Handle end of transmission */ /* Handle end of transmission */
@@ -1727,7 +1736,7 @@ static void mvneta_txq_done(struct mvnet @@ -1731,7 +1740,7 @@ static void mvneta_txq_done(struct mvnet
if (!tx_done) if (!tx_done)
return; return;
@ -42,7 +42,7 @@
txq->count -= tx_done; txq->count -= tx_done;
@@ -2334,6 +2343,8 @@ out: @@ -2338,6 +2347,8 @@ out:
struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats);
struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id); struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id);
@ -51,7 +51,7 @@
txq->count += frags; txq->count += frags;
mvneta_txq_pend_desc_add(pp, txq, frags); mvneta_txq_pend_desc_add(pp, txq, frags);
@@ -2358,9 +2369,10 @@ static void mvneta_txq_done_force(struct @@ -2362,9 +2373,10 @@ static void mvneta_txq_done_force(struct
struct mvneta_tx_queue *txq) struct mvneta_tx_queue *txq)
{ {
@ -63,7 +63,7 @@
/* reset txq */ /* reset txq */
txq->count = 0; txq->count = 0;
@@ -2841,6 +2853,8 @@ static int mvneta_txq_init(struct mvneta @@ -2845,6 +2857,8 @@ static int mvneta_txq_init(struct mvneta
static void mvneta_txq_deinit(struct mvneta_port *pp, static void mvneta_txq_deinit(struct mvneta_port *pp,
struct mvneta_tx_queue *txq) struct mvneta_tx_queue *txq)
{ {
@ -72,7 +72,7 @@
kfree(txq->tx_skb); kfree(txq->tx_skb);
if (txq->tso_hdrs) if (txq->tso_hdrs)
@@ -2852,6 +2866,8 @@ static void mvneta_txq_deinit(struct mvn @@ -2856,6 +2870,8 @@ static void mvneta_txq_deinit(struct mvn
txq->size * MVNETA_DESC_ALIGNED_SIZE, txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys); txq->descs, txq->descs_phys);

View File

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- ---
--- a/drivers/net/ethernet/marvell/mvneta.c --- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3984,6 +3984,16 @@ static int mvneta_ethtool_set_eee(struct @@ -3988,6 +3988,16 @@ static int mvneta_ethtool_set_eee(struct
return phylink_ethtool_set_eee(pp->phylink, eee); 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 = { static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open, .ndo_open = mvneta_open,
.ndo_stop = mvneta_stop, .ndo_stop = mvneta_stop,
@@ -3994,6 +4004,7 @@ static const struct net_device_ops mvnet @@ -3998,6 +4008,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features, .ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64, .ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl, .ndo_do_ioctl = mvneta_ioctl,

View File

@ -153,7 +153,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
} }
--- a/init/main.c --- a/init/main.c
+++ b/init/main.c +++ b/init/main.c
@@ -88,6 +88,10 @@ @@ -89,6 +89,10 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
@ -164,7 +164,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
static int kernel_init(void *); static int kernel_init(void *);
extern void init_IRQ(void); extern void init_IRQ(void);
@@ -560,6 +564,18 @@ asmlinkage __visible void __init start_k @@ -562,6 +566,18 @@ asmlinkage __visible void __init start_k
page_alloc_init(); page_alloc_init();
pr_notice("Kernel command line: %s\n", boot_command_line); pr_notice("Kernel command line: %s\n", boot_command_line);

View File

@ -226,6 +226,7 @@ CONFIG_NR_CPUS=8
# CONFIG_NUMA is not set # CONFIG_NUMA is not set
CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_PADATA=y CONFIG_PADATA=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_PARAVIRT=y CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_CLOCK=y CONFIG_PARAVIRT_CLOCK=y
# CONFIG_PARAVIRT_DEBUG is not set # CONFIG_PARAVIRT_DEBUG is not set