-LINUX_VERSION-5.15 = .167
-LINUX_KERNEL_HASH-5.15.167 = b1751f18ece3df08d502dd87a9ab1a317dc0f9486355bf8ee62ba6af0b35da30
+LINUX_VERSION-5.15 = .168
+LINUX_KERNEL_HASH-5.15.168 = cfbebbd57456827013b97689aa3cad1fbfbe864dd80b0ecf16bb29990b38e17a
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
-@@ -4201,14 +4201,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -4228,14 +4228,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
-@@ -698,7 +698,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
+@@ -699,7 +699,7 @@ MODULE_DEVICE_TABLE(spi, spidev_spi_ids)
*/
static int spidev_of_check(struct device *dev)
{
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
-@@ -106,8 +106,10 @@ static int bcm2835_rng_init(struct hwrng
+@@ -108,8 +108,10 @@ static int bcm2835_rng_init(struct hwrng
}
/* set warm-up count & enable */
- ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0),
+ ret = devm_request_irq(dev, platform_get_irq(pdev, 0),
- bcm2835_mbox_irq, 0, dev_name(dev), mbox);
+ bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev),
+ mbox);
if (ret) {
- dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n",
-@@ -194,7 +197,18 @@ static struct platform_driver bcm2835_mb
+@@ -195,7 +198,18 @@ static struct platform_driver bcm2835_mb
},
.probe = bcm2835_mbox_probe,
};
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -1633,6 +1633,109 @@ command_cleanup:
+@@ -1642,6 +1642,109 @@ command_cleanup:
}
/*
* non-error returns are a promise to giveback() the urb later
* we drop ownership so next owner (or urb unlink) can get it
*/
-@@ -5474,6 +5577,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5488,6 +5591,7 @@ static const struct hc_driver xhci_hc_dr
.endpoint_reset = xhci_endpoint_reset,
.check_bandwidth = xhci_check_bandwidth,
.reset_bandwidth = xhci_reset_bandwidth,
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
-@@ -1332,6 +1335,9 @@
+@@ -1337,6 +1340,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220
-From 271d837c58918de2cac5715798ebf71df43b39f7 Mon Sep 17 00:00:00 2001
-From: Jonathan Bell <jonathan@raspberrypi.org>
-Date: Tue, 13 Aug 2019 15:53:29 +0100
-Subject: [PATCH] xhci: Use more event ring segment table entries
+From d631e7354399aa2fb6079b72f515acd6d080c203 Mon Sep 17 00:00:00 2001
+From: Jonathan Bell <jonathan@raspberrypi.com>
+Date: Thu, 13 Jul 2023 14:43:21 +0100
+Subject: [PATCH 0481/1085] xhci: Use more event ring segment table entries
Users have reported log spam created by "Event Ring Full" xHC event
TRBs. These are caused by interrupt latency in conjunction with a very
entries they can process, so make the actual number in use
min(ERST_MAX_SEGS, hw_max).
-Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
+Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
- drivers/usb/host/xhci-mem.c | 8 +++++---
- drivers/usb/host/xhci.h | 4 ++--
- 2 files changed, 7 insertions(+), 5 deletions(-)
+ drivers/usb/host/xhci-mem.c | 9 +++++++--
+ drivers/usb/host/xhci.h | 5 +++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
-@@ -2544,9 +2544,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
- * Event ring setup: Allocate a normal ring, but also setup
- * the event ring segment table (ERST). Section 4.9.3.
- */
-+ val2 = 1 << HCS_ERST_MAX(xhci->hcs_params2);
-+ val2 = min_t(unsigned int, ERST_MAX_SEGS, val2);
- xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Allocating event ring");
-- xhci->event_ring = xhci_ring_alloc(xhci, ERST_NUM_SEGS, 1, TYPE_EVENT,
-- 0, flags);
-+ xhci->event_ring = xhci_ring_alloc(xhci, val2, 1, TYPE_EVENT,
-+ 0, flags);
- if (!xhci->event_ring)
- goto fail;
- if (xhci_check_trb_in_td_math(xhci) < 0)
-@@ -2559,7 +2561,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2276,6 +2276,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
+ {
+ struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
+ struct xhci_interrupter *ir;
++ unsigned int nr_event_segs;
+ u64 erst_base;
+ u32 erst_size;
+ int ret;
+@@ -2296,7 +2297,11 @@ xhci_alloc_interrupter(struct xhci_hcd *
+ return NULL;
+
+ ir->ir_set = &xhci->run_regs->ir_set[intr_num];
+- ir->event_ring = xhci_ring_alloc(xhci, ERST_NUM_SEGS, 1, TYPE_EVENT,
++ nr_event_segs = min_t(unsigned int,
++ 1 << HCS_ERST_MAX(xhci->hcs_params2),
++ ERST_MAX_SEGS);
++
++ ir->event_ring = xhci_ring_alloc(xhci, nr_event_segs, 1, TYPE_EVENT,
+ 0, flags);
+ if (!ir->event_ring) {
+ xhci_warn(xhci, "Failed to allocate interrupter %d event ring\n", intr_num);
+@@ -2312,7 +2317,7 @@ xhci_alloc_interrupter(struct xhci_hcd *
/* set ERST count with the number of entries in the segment table */
- val = readl(&xhci->ir_set->erst_size);
- val &= ERST_SIZE_MASK;
-- val |= ERST_NUM_SEGS;
-+ val |= val2;
- xhci_dbg_trace(xhci, trace_xhci_dbg_init,
- "// Write ERST size = %i to ir_set 0 (some bits preserved)",
- val);
+ erst_size = readl(&ir->ir_set->erst_size);
+ erst_size &= ERST_SIZE_MASK;
+- erst_size |= ERST_NUM_SEGS;
++ erst_size |= ir->event_ring->num_segs;
+ writel(erst_size, &ir->ir_set->erst_size);
+
+ erst_base = xhci_read_64(xhci, &ir->ir_set->erst_base);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1675,8 +1675,8 @@ struct urb_priv {
+@@ -1679,8 +1679,9 @@ struct urb_priv {
* Each segment table entry is 4*32bits long. 1K seems like an ok size:
* (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
* meaning 64 ring segments.
- * Initial allocated size of the ERST, in number of entries */
-#define ERST_NUM_SEGS 1
-+ * Maximum number of segments in the ERST */
++ */
++/* Maximum number of segments in the ERST */
+#define ERST_MAX_SEGS 8
/* Poll every 60 seconds */
#define POLL_TIMEOUT 60
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
-@@ -52,6 +52,8 @@
+@@ -53,6 +53,8 @@
#define extra_checks 0
#endif
/* Device and char device-related information */
static DEFINE_IDA(gpio_ida);
static dev_t gpio_devt;
-@@ -2408,8 +2410,8 @@ int gpiod_direction_output(struct gpio_d
+@@ -2409,8 +2411,8 @@ int gpiod_direction_output(struct gpio_d
value = !!value;
/* GPIOs used for enabled IRQs shall not be set as output */
gpiod_err(desc,
"%s: tried to set a GPIO tied to an IRQ as output\n",
__func__);
-@@ -3226,8 +3228,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
+@@ -3227,8 +3229,8 @@ int gpiochip_lock_as_irq(struct gpio_chi
}
/* To be valid for IRQ the line needs to be input or open drain */
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
-@@ -856,8 +856,14 @@ static int usb_audio_probe(struct usb_in
+@@ -862,8 +862,14 @@ static int usb_audio_probe(struct usb_in
if (ignore_ctl_error)
chip->quirk_flags |= QUIRK_FLAG_IGNORE_CTL_ERROR;
+ { .name = "spidev" },
{ .name = "bh2228fv" },
{ .name = "dh2228fv" },
- { .name = "ltc2488" },
+ { .name = "jg10309-01" },
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -301,8 +301,10 @@ static void xhci_pci_quirks(struct devic
+@@ -305,8 +305,10 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3432)
xhci->quirks |= XHCI_BROKEN_STREAMS;
addr = xhci_trb_virt_to_dma(new_seg, new_deq);
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1909,6 +1909,7 @@ struct xhci_hcd {
- #define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
- #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
+@@ -1920,6 +1920,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
-+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
+ #define XHCI_WRITE_64_HI_LO BIT_ULL(47)
+ #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
++#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
unsigned int num_active_eps;
unsigned int limit_active_eps;
xhci_err(xhci, "Tried to move enqueue past ring segment\n");
return;
}
-@@ -3246,7 +3249,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
+@@ -3266,7 +3269,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
* that clears the EHB.
*/
- while (xhci_handle_event(xhci) > 0) {
+ while (xhci_handle_event(xhci, ir) > 0) {
- if (event_loop++ < TRBS_PER_SEGMENT / 2)
+ if (event_loop++ < xhci->event_ring->trbs_per_seg / 2)
continue;
- xhci_update_erst_dequeue(xhci, event_ring_deq);
- event_ring_deq = xhci->event_ring->dequeue;
-@@ -3388,7 +3391,8 @@ static int prepare_ring(struct xhci_hcd
+ xhci_update_erst_dequeue(xhci, ir, event_ring_deq);
+ event_ring_deq = ir->event_ring->dequeue;
+@@ -3408,7 +3411,8 @@ static int prepare_ring(struct xhci_hcd
}
}
}
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -889,8 +889,8 @@ static void xhci_clear_command_ring(stru
+@@ -898,8 +898,8 @@ static void xhci_clear_command_ring(stru
seg = ring->deq_seg;
do {
memset(seg->trbs, 0,
cpu_to_le32(~TRB_CYCLE);
seg = seg->next;
} while (seg != ring->deq_seg);
-@@ -901,7 +901,7 @@ static void xhci_clear_command_ring(stru
+@@ -910,7 +910,7 @@ static void xhci_clear_command_ring(stru
ring->enq_seg = ring->deq_seg;
ring->enqueue = ring->dequeue;
* when the cycle bit is set to 1.
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1637,6 +1637,7 @@ struct xhci_ring {
+@@ -1641,6 +1641,7 @@ struct xhci_ring {
unsigned int num_trbs_free;
unsigned int num_trbs_free_temp;
unsigned int bounce_buf_len;
cycle_state, type, max_packet, flags);
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -304,6 +304,7 @@ static void xhci_pci_quirks(struct devic
+@@ -308,6 +308,7 @@ static void xhci_pci_quirks(struct devic
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1911,6 +1911,7 @@ struct xhci_hcd {
- #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
- #define XHCI_ZHAOXIN_HOST BIT_ULL(46)
- #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
-+#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
+@@ -1922,6 +1922,7 @@ struct xhci_hcd {
+ #define XHCI_WRITE_64_HI_LO BIT_ULL(47)
+ #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
+ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
++#define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(50)
unsigned int num_active_eps;
unsigned int limit_active_eps;
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -305,6 +305,7 @@ static void xhci_pci_quirks(struct devic
+@@ -309,6 +309,7 @@ static void xhci_pci_quirks(struct devic
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
xhci->quirks |= XHCI_VLI_TRB_CACHE_BUG;
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -3701,14 +3701,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3721,14 +3721,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
unsigned int num_trbs;
unsigned int start_cycle, num_sgs = 0;
unsigned int enqd_len, block_len, trb_buff_len, full_len;
full_len = urb->transfer_buffer_length;
/* If we have scatter/gather list, we use it. */
if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) {
-@@ -3745,6 +3746,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3765,6 +3766,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
start_cycle = ring->cycle_state;
send_addr = addr;
/* Queue the TRBs, even if they are zero-length */
for (enqd_len = 0; first_trb || enqd_len < full_len;
enqd_len += trb_buff_len) {
-@@ -3757,6 +3769,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3777,6 +3789,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
if (enqd_len + trb_buff_len > full_len)
trb_buff_len = full_len - enqd_len;
first_trb = false;
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1912,6 +1912,7 @@ struct xhci_hcd {
- #define XHCI_ZHAOXIN_HOST BIT_ULL(46)
- #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47)
- #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
-+#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(49)
+@@ -1923,6 +1923,7 @@ struct xhci_hcd {
+ #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
+ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(49)
+ #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(50)
++#define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(51)
unsigned int num_active_eps;
unsigned int limit_active_eps;
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
-@@ -3701,7 +3701,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3721,7 +3721,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
unsigned int num_trbs;
unsigned int start_cycle, num_sgs = 0;
unsigned int enqd_len, block_len, trb_buff_len, full_len;
u32 field, length_field, remainder, maxpacket;
u64 addr, send_addr;
-@@ -3747,14 +3747,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3767,14 +3767,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
send_addr = addr;
if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
}
/* Queue the TRBs, even if they are zero-length */
-@@ -3769,7 +3764,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3789,7 +3784,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
if (enqd_len + trb_buff_len > full_len)
trb_buff_len = full_len - enqd_len;
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
-@@ -1685,6 +1685,19 @@ config SENSORS_EMC2103
+@@ -1687,6 +1687,19 @@ config SENSORS_EMC2103
This driver can also be built as a module. If so, the module
will be called emc2103.
/*
* Reset a halted HC.
*
-@@ -634,6 +677,16 @@ static int xhci_run_finished(struct xhci
+@@ -635,6 +678,16 @@ static int xhci_run_finished(struct xhci
spin_unlock_irqrestore(&xhci->lock, flags);
return -ENODEV;
}
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1909,6 +1909,7 @@ struct xhci_hcd {
- #define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
- #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
+@@ -1919,6 +1919,7 @@ struct xhci_hcd {
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
-+#define XHCI_FAKE_DOORBELL BIT_ULL(47)
+ #define XHCI_WRITE_64_HI_LO BIT_ULL(47)
+ #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
++#define XHCI_FAKE_DOORBELL BIT_ULL(49)
unsigned int num_active_eps;
unsigned int limit_active_eps;
}
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
-@@ -1815,7 +1815,8 @@ int gpiochip_add_pingroup_range(struct g
+@@ -1816,7 +1816,8 @@ int gpiochip_add_pingroup_range(struct g
list_add_tail(&pin_range->node, &gdev->pin_ranges);
}
EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range);
-@@ -1872,7 +1873,7 @@ int gpiochip_add_pin_range(struct gpio_c
+@@ -1873,7 +1874,7 @@ int gpiochip_add_pin_range(struct gpio_c
list_add_tail(&pin_range->node, &gdev->pin_ranges);
#ifndef arch_wants_old_prefaulted_pte
static inline bool arch_wants_old_prefaulted_pte(void)
{
-@@ -2791,7 +2779,7 @@ static inline int cow_user_page(struct p
+@@ -2808,7 +2796,7 @@ static inline int cow_user_page(struct p
* On architectures with software "accessed" bits, we would
* take a double page fault, so mark it accessed here.
*/
mem_cgroup_id_remove(memcg);
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -4804,6 +4804,27 @@ static inline void mm_account_fault(stru
+@@ -4821,6 +4821,27 @@ static inline void mm_account_fault(stru
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
}
/*
* By the time we get here, we already hold the mm semaphore
*
-@@ -4835,11 +4856,15 @@ vm_fault_t handle_mm_fault(struct vm_are
+@@ -4852,11 +4873,15 @@ vm_fault_t handle_mm_fault(struct vm_are
if (flags & FAULT_FLAG_USER)
mem_cgroup_enter_user_fault();
--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -1014,6 +1014,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1015,6 +1015,7 @@ static int exec_mmap(struct mm_struct *m
active_mm = tsk->active_mm;
tsk->active_mm = mm;
tsk->mm = mm;
/*
* This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for
-@@ -1029,6 +1030,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1030,6 +1031,7 @@ static int exec_mmap(struct mm_struct *m
tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk);
task_unlock(tsk);
mmdrop(mm);
}
-@@ -2625,6 +2627,13 @@ pid_t kernel_clone(struct kernel_clone_a
+@@ -2622,6 +2624,13 @@ pid_t kernel_clone(struct kernel_clone_a
get_task_struct(p);
}
--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -1014,7 +1014,6 @@ static int exec_mmap(struct mm_struct *m
+@@ -1015,7 +1015,6 @@ static int exec_mmap(struct mm_struct *m
active_mm = tsk->active_mm;
tsk->active_mm = mm;
tsk->mm = mm;
/*
* This prevents preemption while active_mm is being loaded and
* it and mm are being updated, which could cause problems for
-@@ -1029,6 +1028,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1030,6 +1029,7 @@ static int exec_mmap(struct mm_struct *m
local_irq_enable();
tsk->mm->vmacache_seqnum = 0;
vmacache_flush(tsk);
mark_page_accessed(page);
}
rss[mm_counter(page)]--;
-@@ -4807,8 +4807,8 @@ static inline void mm_account_fault(stru
+@@ -4824,8 +4824,8 @@ static inline void mm_account_fault(stru
#ifdef CONFIG_LRU_GEN
static void lru_gen_enter_fault(struct vm_area_struct *vma)
{
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1349,10 +1349,8 @@ void b53_phylink_validate(struct dsa_swi
+@@ -1353,10 +1353,8 @@ void b53_phylink_validate(struct dsa_swi
phylink_set(mask, 100baseT_Full);
}
ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
-@@ -1566,7 +1566,7 @@ static void axienet_validate(struct phyl
+@@ -1659,7 +1659,7 @@ static void axienet_validate(struct phyl
netdev_warn(ndev, "Cannot use PHY mode %s, supported: %s\n",
phy_modes(state->interface),
phy_modes(lp->phy_mode));
return;
}
}
-@@ -1599,10 +1599,8 @@ static void axienet_validate(struct phyl
+@@ -1692,10 +1692,8 @@ static void axienet_validate(struct phyl
break;
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2303,7 +2303,7 @@ static const struct b53_chip_data b53_sw
+@@ -2312,7 +2312,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5325_DEVICE_ID,
.dev_name = "BCM5325",
.vlans = 16,
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
-@@ -2314,7 +2314,7 @@ static const struct b53_chip_data b53_sw
+@@ -2323,7 +2323,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5365_DEVICE_ID,
.dev_name = "BCM5365",
.vlans = 256,
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
-@@ -2325,7 +2325,7 @@ static const struct b53_chip_data b53_sw
+@@ -2334,7 +2334,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5389_DEVICE_ID,
.dev_name = "BCM5389",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2339,7 +2339,7 @@ static const struct b53_chip_data b53_sw
+@@ -2348,7 +2348,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5395_DEVICE_ID,
.dev_name = "BCM5395",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2353,7 +2353,7 @@ static const struct b53_chip_data b53_sw
+@@ -2362,7 +2362,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5397_DEVICE_ID,
.dev_name = "BCM5397",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2367,7 +2367,7 @@ static const struct b53_chip_data b53_sw
+@@ -2376,7 +2376,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5398_DEVICE_ID,
.dev_name = "BCM5398",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2381,7 +2381,7 @@ static const struct b53_chip_data b53_sw
+@@ -2390,7 +2390,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53115_DEVICE_ID,
.dev_name = "BCM53115",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
-@@ -2395,7 +2395,7 @@ static const struct b53_chip_data b53_sw
+@@ -2404,7 +2404,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53125_DEVICE_ID,
.dev_name = "BCM53125",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2437,7 +2437,7 @@ static const struct b53_chip_data b53_sw
+@@ -2446,7 +2446,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53010_DEVICE_ID,
.dev_name = "BCM53010",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2479,7 +2479,7 @@ static const struct b53_chip_data b53_sw
+@@ -2488,7 +2488,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53018_DEVICE_ID,
.dev_name = "BCM53018",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2493,7 +2493,7 @@ static const struct b53_chip_data b53_sw
+@@ -2502,7 +2502,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53019_DEVICE_ID,
.dev_name = "BCM53019",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2635,7 +2635,6 @@ static int b53_switch_init(struct b53_de
+@@ -2644,7 +2644,6 @@ static int b53_switch_init(struct b53_de
dev->cpu_port = 5;
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1291,12 +1291,6 @@ static void b53_adjust_link(struct dsa_s
+@@ -1295,12 +1295,6 @@ static void b53_adjust_link(struct dsa_s
return;
}
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_s
+@@ -1226,7 +1226,7 @@ static void b53_adjust_link(struct dsa_s
return;
/* Enable flow control on BCM5301x's CPU port */
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2301,7 +2301,6 @@ static const struct b53_chip_data b53_sw
+@@ -2310,7 +2310,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
-@@ -2312,7 +2311,6 @@ static const struct b53_chip_data b53_sw
+@@ -2321,7 +2320,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
-@@ -2323,7 +2321,6 @@ static const struct b53_chip_data b53_sw
+@@ -2332,7 +2330,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2337,7 +2334,6 @@ static const struct b53_chip_data b53_sw
+@@ -2346,7 +2343,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2351,7 +2347,6 @@ static const struct b53_chip_data b53_sw
+@@ -2360,7 +2356,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2365,7 +2360,6 @@ static const struct b53_chip_data b53_sw
+@@ -2374,7 +2369,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2380,7 +2374,6 @@ static const struct b53_chip_data b53_sw
+@@ -2389,7 +2383,6 @@ static const struct b53_chip_data b53_sw
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
.imp_port = 8,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
-@@ -2393,7 +2386,6 @@ static const struct b53_chip_data b53_sw
+@@ -2402,7 +2395,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2407,7 +2399,6 @@ static const struct b53_chip_data b53_sw
+@@ -2416,7 +2408,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2421,7 +2412,6 @@ static const struct b53_chip_data b53_sw
+@@ -2430,7 +2421,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_63XX,
.duplex_reg = B53_DUPLEX_STAT_63XX,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
-@@ -2435,7 +2425,6 @@ static const struct b53_chip_data b53_sw
+@@ -2444,7 +2434,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2449,7 +2438,6 @@ static const struct b53_chip_data b53_sw
+@@ -2458,7 +2447,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2463,7 +2451,6 @@ static const struct b53_chip_data b53_sw
+@@ -2472,7 +2460,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2477,7 +2464,6 @@ static const struct b53_chip_data b53_sw
+@@ -2486,7 +2473,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2491,7 +2477,6 @@ static const struct b53_chip_data b53_sw
+@@ -2500,7 +2486,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2505,7 +2490,6 @@ static const struct b53_chip_data b53_sw
+@@ -2514,7 +2499,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2519,7 +2503,6 @@ static const struct b53_chip_data b53_sw
+@@ -2528,7 +2512,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2548,7 +2531,6 @@ static const struct b53_chip_data b53_sw
+@@ -2557,7 +2540,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2562,7 +2544,6 @@ static const struct b53_chip_data b53_sw
+@@ -2571,7 +2553,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 256,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2588,7 +2569,6 @@ static int b53_switch_init(struct b53_de
+@@ -2597,7 +2578,6 @@ static int b53_switch_init(struct b53_de
dev->vta_regs[2] = chip->vta_regs[2];
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
dev->imp_port = chip->imp_port;
dev->num_vlans = chip->vlans;
dev->num_arl_bins = chip->arl_bins;
dev->num_arl_buckets = chip->arl_buckets;
-@@ -2620,13 +2600,6 @@ static int b53_switch_init(struct b53_de
+@@ -2629,13 +2609,6 @@ static int b53_switch_init(struct b53_de
break;
#endif
}
ret = stmmac_hw_setup(dev, true);
if (ret < 0) {
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
-@@ -6414,6 +6407,7 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6399,6 +6392,7 @@ void stmmac_enable_rx_queue(struct stmma
return;
}
stmmac_clear_rx_descriptors(priv, queue);
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
-@@ -6475,6 +6469,7 @@ void stmmac_enable_tx_queue(struct stmma
+@@ -6460,6 +6454,7 @@ void stmmac_enable_tx_queue(struct stmma
return;
}
stmmac_clear_tx_descriptors(priv, queue);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
-@@ -7402,6 +7397,25 @@ int stmmac_suspend(struct device *dev)
+@@ -7387,6 +7382,25 @@ int stmmac_suspend(struct device *dev)
}
EXPORT_SYMBOL_GPL(stmmac_suspend);
/**
* stmmac_reset_queues_param - reset queue parameters
* @priv: device pointer
-@@ -7412,22 +7426,11 @@ static void stmmac_reset_queues_param(st
+@@ -7397,22 +7411,11 @@ static void stmmac_reset_queues_param(st
u32 tx_cnt = priv->plat->tx_queues_to_use;
u32 queue;
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
-@@ -5112,7 +5112,7 @@ read_again:
+@@ -5104,7 +5104,7 @@ read_again:
*/
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
int status = 0, coe = priv->hw->rx_csum;
-@@ -5125,7 +5125,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -5117,7 +5117,7 @@ static int stmmac_rx(struct stmmac_priv
int buf_sz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
if (netif_msg_rx_status(priv)) {
void *rx_head;
-@@ -5139,7 +5139,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -5131,7 +5131,7 @@ static int stmmac_rx(struct stmmac_priv
desc_size = sizeof(struct dma_desc);
}
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
-@@ -5183,7 +5183,7 @@ read_again:
+@@ -5175,7 +5175,7 @@ read_again:
break;
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
-@@ -5317,7 +5317,7 @@ read_again:
+@@ -5302,7 +5302,7 @@ read_again:
buf1_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->page, buf->page_offset, buf1_len,
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->page);
-@@ -5329,7 +5329,7 @@ read_again:
+@@ -5314,7 +5314,7 @@ read_again:
buf2_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->sec_page, 0, buf2_len,
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->sec_page);
-@@ -5762,11 +5762,13 @@ static irqreturn_t stmmac_safety_interru
+@@ -5747,11 +5747,13 @@ static irqreturn_t stmmac_safety_interru
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
{
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
-@@ -5801,10 +5803,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
+@@ -5786,10 +5788,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
{
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
-@@ -5830,10 +5834,10 @@ static void stmmac_poll_controller(struc
+@@ -5815,10 +5819,10 @@ static void stmmac_poll_controller(struc
if (priv->plat->multi_msi_en) {
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
} else {
disable_irq(dev->irq);
stmmac_interrupt(dev->irq, dev);
-@@ -6014,34 +6018,34 @@ static int stmmac_rings_status_show(stru
+@@ -5999,34 +6003,34 @@ static int stmmac_rings_status_show(stru
return 0;
for (queue = 0; queue < rx_count; queue++) {
}
}
-@@ -6388,7 +6392,7 @@ void stmmac_disable_rx_queue(struct stmm
+@@ -6373,7 +6377,7 @@ void stmmac_disable_rx_queue(struct stmm
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
u32 buf_size;
-@@ -6425,7 +6429,7 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6410,7 +6414,7 @@ void stmmac_enable_rx_queue(struct stmma
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
rx_q->queue_index);
}
-@@ -6451,7 +6455,7 @@ void stmmac_disable_tx_queue(struct stmm
+@@ -6436,7 +6440,7 @@ void stmmac_disable_tx_queue(struct stmm
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
int ret;
-@@ -6501,7 +6505,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6486,7 +6490,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
-@@ -6560,7 +6564,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6545,7 +6549,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_cnt; chan++) {
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
-@@ -6578,7 +6582,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6563,7 +6567,7 @@ int stmmac_xdp_open(struct net_device *d
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
rx_q->queue_index);
}
-@@ -6587,7 +6591,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6572,7 +6576,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_cnt; chan++) {
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
-@@ -6620,7 +6624,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6605,7 +6609,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
stmmac_hw_teardown(dev);
init_error:
-@@ -6647,8 +6651,8 @@ int stmmac_xsk_wakeup(struct net_device
+@@ -6632,8 +6636,8 @@ int stmmac_xsk_wakeup(struct net_device
queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
ch = &priv->channel[queue];
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
-@@ -6908,8 +6912,8 @@ int stmmac_reinit_ringparam(struct net_d
+@@ -6893,8 +6897,8 @@ int stmmac_reinit_ringparam(struct net_d
if (netif_running(dev))
stmmac_release(dev);
if (netif_running(dev))
ret = stmmac_open(dev);
-@@ -7347,7 +7351,7 @@ int stmmac_suspend(struct device *dev)
+@@ -7332,7 +7336,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
if (priv->eee_enabled) {
priv->tx_path_in_lpi_mode = false;
-@@ -7399,7 +7403,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
+@@ -7384,7 +7388,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
{
rx_q->cur_rx = 0;
rx_q->dirty_rx = 0;
-@@ -7407,7 +7411,7 @@ static void stmmac_reset_rx_queue(struct
+@@ -7392,7 +7396,7 @@ static void stmmac_reset_rx_queue(struct
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
{
if (i >= priv->plat->tx_queues_to_use)
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
-@@ -972,13 +972,13 @@ static int tc_setup_etf(struct stmmac_pr
+@@ -973,13 +973,13 @@ static int tc_setup_etf(struct stmmac_pr
return -EOPNOTSUPP;
if (qopt->queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
-@@ -6387,7 +6503,7 @@ void stmmac_disable_rx_queue(struct stmm
+@@ -6372,7 +6488,7 @@ void stmmac_disable_rx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
}
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
-@@ -6398,21 +6514,21 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6383,21 +6499,21 @@ void stmmac_enable_rx_queue(struct stmma
u32 buf_size;
int ret;
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, rx_q->queue_index);
-@@ -6450,7 +6566,7 @@ void stmmac_disable_tx_queue(struct stmm
+@@ -6435,7 +6551,7 @@ void stmmac_disable_tx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
}
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
-@@ -6460,21 +6576,21 @@ void stmmac_enable_tx_queue(struct stmma
+@@ -6445,21 +6561,21 @@ void stmmac_enable_tx_queue(struct stmma
unsigned long flags;
int ret;
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, tx_q->queue_index);
-@@ -6514,7 +6630,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6499,7 +6615,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
-@@ -6539,14 +6655,14 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6524,14 +6640,14 @@ int stmmac_xdp_open(struct net_device *d
u32 chan;
int ret;
if (ret < 0) {
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
__func__);
-@@ -6628,7 +6744,7 @@ irq_error:
+@@ -6613,7 +6729,7 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
dma_desc_error:
return ret;
}
-@@ -7494,7 +7610,7 @@ int stmmac_resume(struct device *dev)
+@@ -7479,7 +7595,7 @@ int stmmac_resume(struct device *dev)
stmmac_reset_queues_param(priv);
stmmac_free_tx_skbufs(priv);
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5629,18 +5629,15 @@ static int stmmac_change_mtu(struct net_
+@@ -5614,18 +5614,15 @@ static int stmmac_change_mtu(struct net_
{
struct stmmac_priv *priv = netdev_priv(dev);
int txfifosz = priv->plat->tx_fifo_size;
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
return -EINVAL;
-@@ -5652,8 +5649,29 @@ static int stmmac_change_mtu(struct net_
+@@ -5637,8 +5634,29 @@ static int stmmac_change_mtu(struct net_
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
return -EINVAL;
--- /dev/null
+Subject: [PATCH v2] netfilter: xtables: fix typo causing some targets to not load on IPv6
+Date: Sat, 19 Oct 2024 08:05:07 +0300 [thread overview]
+Message-ID: <20241019-xtables-typos-v2-1-6b8b1735dc8e@0upti.me> (raw)
+
+These were added with the wrong family in 4cdc55e, which seems
+to just have been a typo, but now ip6tables rules with --set-mark
+don't work anymore, which is pretty bad.
+
+Fixes: 0bfcb7b71e73 ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed")
+Reviewed-by: Phil Sutter <phil@nwl.cc>
+Signed-off-by: Ilya Katsnelson <me@0upti.me>
+---
+Changes in v2:
+- Fixed a typo in the commit message (that's karma).
+- Replaced a reference to backport commit.
+- Link to v1: https://lore.kernel.org/r/20241018-xtables-typos-v1-1-02a51789c0ec@0upti.me
+---
+ net/netfilter/xt_NFLOG.c | 2 +-
+ net/netfilter/xt_mark.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/netfilter/xt_NFLOG.c
++++ b/net/netfilter/xt_NFLOG.c
+@@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] _
+ {
+ .name = "NFLOG",
+ .revision = 0,
+- .family = NFPROTO_IPV4,
++ .family = NFPROTO_IPV6,
+ .checkentry = nflog_tg_check,
+ .destroy = nflog_tg_destroy,
+ .target = nflog_tg,
+--- a/net/netfilter/xt_mark.c
++++ b/net/netfilter/xt_mark.c
+@@ -62,7 +62,7 @@ static struct xt_target mark_tg_reg[] __
+ {
+ .name = "MARK",
+ .revision = 2,
+- .family = NFPROTO_IPV4,
++ .family = NFPROTO_IPV6,
+ .target = mark_tg,
+ .targetsize = sizeof(struct xt_mark_tginfo2),
+ .me = THIS_MODULE,
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
-@@ -510,8 +510,8 @@ err_register_netdev:
+@@ -511,8 +511,8 @@ err_register_netdev:
ipheth_free_urbs(dev);
err_alloc_urbs:
err_get_macaddr:
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
-@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
+@@ -374,12 +374,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
}
memcpy(dev->tx_buf, skb->data, skb->len);
ipheth_rx_submit(dev, GFP_ATOMIC);
}
-@@ -310,6 +411,27 @@ static int ipheth_get_macaddr(struct iph
+@@ -311,6 +412,27 @@ static int ipheth_get_macaddr(struct iph
return retval;
}
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
{
struct usb_device *udev = dev->udev;
-@@ -317,7 +439,7 @@ static int ipheth_rx_submit(struct iphet
+@@ -318,7 +440,7 @@ static int ipheth_rx_submit(struct iphet
usb_fill_bulk_urb(dev->rx_urb, udev,
usb_rcvbulkpipe(udev, dev->bulk_in),
ipheth_rcvbulk_callback,
dev);
dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-@@ -365,7 +487,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
+@@ -366,7 +488,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
int retval;
/* Paranoid */
WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
dev->net->stats.tx_dropped++;
dev_kfree_skb_any(skb);
-@@ -448,6 +570,8 @@ static int ipheth_probe(struct usb_inter
+@@ -449,6 +571,8 @@ static int ipheth_probe(struct usb_inter
dev->net = netdev;
dev->intf = intf;
dev->confirmed_pairing = false;
/* Set up endpoints */
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
if (hintf == NULL) {
-@@ -479,6 +603,12 @@ static int ipheth_probe(struct usb_inter
+@@ -480,6 +604,12 @@ static int ipheth_probe(struct usb_inter
if (retval)
goto err_get_macaddr;
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
-@@ -2293,6 +2293,23 @@ struct btmtk_section_map {
+@@ -2296,6 +2296,23 @@ struct btmtk_section_map {
};
} __packed;
static void btusb_mtk_wmt_recv(struct urb *urb)
{
struct hci_dev *hdev = urb->context;
-@@ -3947,6 +3964,7 @@ static int btusb_probe(struct usb_interf
+@@ -3950,6 +3967,7 @@ static int btusb_probe(struct usb_interf
hdev->shutdown = btusb_mtk_shutdown;
hdev->manufacturer = 70;
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
-@@ -2298,7 +2298,7 @@ static int btusb_set_bdaddr_mtk(struct h
+@@ -2301,7 +2301,7 @@ static int btusb_set_bdaddr_mtk(struct h
struct sk_buff *skb;
long ret;
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
-@@ -785,9 +785,10 @@ static bool acpi_of_modalias(struct acpi
+@@ -793,9 +793,10 @@ static bool acpi_of_modalias(struct acpi
* @modalias: Pointer to buffer that modalias value will be copied into
* @len: Length of modalias buffer
*
*
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
-@@ -214,6 +214,7 @@ extern int usbnet_ether_cdc_bind(struct
+@@ -229,6 +229,7 @@ extern int usbnet_ether_cdc_bind(struct
extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *);
extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *);
extern void usbnet_cdc_status(struct usbnet *, struct urb *);
# CONFIG_PROC_CHILDREN is not set
CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_MEM_ALWAYS_FORCE=y
+# CONFIG_PROC_MEM_FORCE_PTRACE is not set
+# CONFIG_PROC_MEM_NO_FORCE is not set
# CONFIG_PROC_PAGE_MONITOR is not set
# CONFIG_PROC_STRIPPED is not set
CONFIG_PROC_SYSCTL=y
--- a/block/blk.h
+++ b/block/blk.h
-@@ -354,6 +354,8 @@ void blk_free_ext_minor(unsigned int min
+@@ -346,6 +346,8 @@ void blk_free_ext_minor(unsigned int min
#define ADDPART_FLAG_NONE 0
#define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2
/* everything is up and running, commence */
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
if (err)
-@@ -600,6 +612,11 @@ static bool blk_add_partition(struct gen
+@@ -602,6 +614,11 @@ static bool blk_add_partition(struct gen
(state->parts[p].flags & ADDPART_FLAG_RAID))
md_autodetect_dev(part->bd_dev);
return connmark_tg_shift(skb, info);
}
-@@ -167,6 +194,16 @@ static struct xt_target connmark_tg_reg[
- .targetsize = sizeof(struct xt_connmark_tginfo2),
+@@ -168,6 +195,16 @@ static struct xt_target connmark_tg_reg[
.destroy = connmark_tg_destroy,
.me = THIS_MODULE,
+ },
++ {
++ .name = "CONNMARK",
++ .revision = 3,
++ .family = NFPROTO_IPV4,
++ .checkentry = connmark_tg_check,
++ .target = connmark_tg_v3,
++ .targetsize = sizeof(struct xt_connmark_tginfo3),
++ .destroy = connmark_tg_destroy,
++ .me = THIS_MODULE,
+ },
+ #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
+ {
+ .name = "CONNMARK",
+@@ -189,6 +226,16 @@ static struct xt_target connmark_tg_reg[
+ .destroy = connmark_tg_destroy,
+ .me = THIS_MODULE,
+ },
+ {
+ .name = "CONNMARK",
+ .revision = 3,
-+ .family = NFPROTO_UNSPEC,
++ .family = NFPROTO_IPV6,
+ .checkentry = connmark_tg_check,
+ .target = connmark_tg_v3,
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
+ .destroy = connmark_tg_destroy,
+ .me = THIS_MODULE,
- }
++ },
+ #endif
};
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2872,6 +2872,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2867,6 +2867,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
-@@ -3022,16 +3026,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3017,16 +3021,6 @@ static inline struct sk_buff *dev_alloc_
}
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
-@@ -3029,11 +3029,13 @@ static const struct seq_operations fib_r
+@@ -3026,11 +3026,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net)
{
fib_triestat_seq_show, NULL))
goto out2;
-@@ -3044,17 +3046,21 @@ int __net_init fib_proc_init(struct net
+@@ -3041,17 +3043,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3:
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
-@@ -692,6 +692,7 @@ static const struct spi_device_id spidev
+@@ -693,6 +693,7 @@ static const struct spi_device_id spidev
{ .name = "spi-petra" },
{ .name = "spi-authenta" },
{ .name = "em3581" },
{},
};
MODULE_DEVICE_TABLE(spi, spidev_spi_ids);
-@@ -720,6 +721,7 @@ static const struct of_device_id spidev_
+@@ -722,6 +723,7 @@ static const struct of_device_id spidev_
{ .compatible = "rohm,dh2228fv", .data = &spidev_of_check },
{ .compatible = "semtech,sx1301", .data = &spidev_of_check },
{ .compatible = "silabs,em3581", .data = &spidev_of_check },
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2838,7 +2838,7 @@ static inline int pskb_network_may_pull(
+@@ -2833,7 +2833,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
-@@ -2777,6 +2777,7 @@ static const char *const rtn_type_names[
+@@ -2774,6 +2774,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW",
[RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE",
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -4564,6 +4583,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -4552,6 +4571,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -5051,7 +5081,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -5039,7 +5069,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 ||
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -6298,6 +6329,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6286,6 +6317,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);
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -6309,6 +6342,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6297,6 +6330,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
-@@ -6500,6 +6534,8 @@ static int __net_init ip6_route_net_init
+@@ -6488,6 +6522,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
-@@ -6510,11 +6546,21 @@ static int __net_init ip6_route_net_init
+@@ -6498,11 +6534,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
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);
-@@ -6541,6 +6587,8 @@ out:
+@@ -6529,6 +6575,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -6560,6 +6608,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6548,6 +6596,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6643,6 +6692,9 @@ void __init ip6_route_init_special_entri
+@@ -6631,6 +6680,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);
#endif
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -893,6 +893,7 @@ struct sk_buff {
+@@ -888,6 +888,7 @@ struct sk_buff {
#ifdef CONFIG_IPV6_NDISC_NODETYPE
__u8 ndisc_nodetype:2;
#endif
__u8 inner_protocol_type:1;
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -6077,6 +6077,9 @@ static enum gro_result dev_gro_receive(s
+@@ -6081,6 +6081,9 @@ static enum gro_result dev_gro_receive(s
int same_flow;
int grow;
if (netif_elide_gro(skb->dev))
goto normal;
-@@ -8094,6 +8097,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -8098,6 +8101,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
-@@ -8145,6 +8190,7 @@ static int __netdev_upper_dev_link(struc
+@@ -8149,6 +8194,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
-@@ -8241,6 +8287,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -8245,6 +8291,7 @@ static void __netdev_upper_dev_unlink(st
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
-@@ -9060,6 +9107,7 @@ int dev_set_mac_address(struct net_devic
+@@ -9064,6 +9111,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
-@@ -7827,7 +7827,7 @@ static int nft_register_flowtable_net_ho
+@@ -7838,7 +7838,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);
struct rtnl_link {
rtnl_doit_func doit;
-@@ -4728,7 +4728,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
+@@ -4757,7 +4757,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
brport_nla_put_flag(skb, flags, mask,
IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) ||
brport_nla_put_flag(skb, flags, mask,
#endif
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -4586,7 +4586,7 @@ static int rps_ipi_queued(struct softnet
+@@ -4590,7 +4590,7 @@ static int rps_ipi_queued(struct softnet
#ifdef CONFIG_RPS
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
sd->rps_ipi_next = mysd->rps_ipi_list;
mysd->rps_ipi_list = sd;
-@@ -5767,6 +5767,8 @@ static DEFINE_PER_CPU(struct work_struct
+@@ -5771,6 +5771,8 @@ static DEFINE_PER_CPU(struct work_struct
/* Network device is going away, flush any packets still pending */
static void flush_backlog(struct work_struct *work)
{
struct sk_buff *skb, *tmp;
struct softnet_data *sd;
-@@ -5782,9 +5784,18 @@ static void flush_backlog(struct work_st
+@@ -5786,9 +5788,18 @@ static void flush_backlog(struct work_st
input_queue_head_incr(sd);
}
}
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
__skb_unlink(skb, &sd->process_queue);
-@@ -5792,7 +5803,18 @@ static void flush_backlog(struct work_st
+@@ -5796,7 +5807,18 @@ static void flush_backlog(struct work_st
input_queue_head_incr(sd);
}
}
}
static bool flush_required(int cpu)
-@@ -6475,6 +6497,7 @@ static int process_backlog(struct napi_s
+@@ -6479,6 +6501,7 @@ static int process_backlog(struct napi_s
local_irq_disable();
rps_lock(sd);
if (skb_queue_empty(&sd->input_pkt_queue)) {
/*
* Inline a custom version of __napi_complete().
-@@ -6484,7 +6507,8 @@ static int process_backlog(struct napi_s
+@@ -6488,7 +6511,8 @@ static int process_backlog(struct napi_s
* We can use a plain write instead of clear_bit(),
* and we dont need an smp_mb() memory barrier.
*/
again = false;
} else {
skb_queue_splice_tail_init(&sd->input_pkt_queue,
-@@ -6901,6 +6925,57 @@ int dev_set_threaded(struct net_device *
+@@ -6905,6 +6929,57 @@ int dev_set_threaded(struct net_device *
}
EXPORT_SYMBOL(dev_set_threaded);
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int weight)
{
-@@ -11385,6 +11460,9 @@ static int dev_cpu_dead(unsigned int old
+@@ -11389,6 +11464,9 @@ static int dev_cpu_dead(unsigned int old
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable();
#ifdef CONFIG_RPS
remsd = oldsd->rps_ipi_list;
oldsd->rps_ipi_list = NULL;
-@@ -11724,6 +11802,7 @@ static int __init net_dev_init(void)
+@@ -11728,6 +11806,7 @@ static int __init net_dev_init(void)
sd->cpu = i;
#endif
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1209,6 +1209,46 @@ static void b53_force_port_config(struct
+@@ -1213,6 +1213,46 @@ static void b53_force_port_config(struct
b53_write8(dev, B53_CTRL_PAGE, off, reg);
}
static void b53_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev)
{
-@@ -1235,6 +1275,9 @@ static void b53_adjust_link(struct dsa_s
+@@ -1239,6 +1279,9 @@ static void b53_adjust_link(struct dsa_s
tx_pause, rx_pause);
b53_force_link(dev, port, phydev->link);
if (is531x5(dev) && phy_interface_is_rgmii(phydev)) {
if (port == dev->imp_port)
off = B53_RGMII_CTRL_IMP;
-@@ -1419,6 +1462,9 @@ void b53_phylink_mac_link_up(struct dsa_
+@@ -1423,6 +1466,9 @@ void b53_phylink_mac_link_up(struct dsa_
{
struct b53_device *dev = ds->priv;
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2464,6 +2464,19 @@ static const struct b53_chip_data b53_sw
+@@ -2473,6 +2473,19 @@ static const struct b53_chip_data b53_sw
.jumbo_size_reg = B53_JUMBO_MAX_SIZE_63XX,
},
{
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1240,8 +1240,12 @@ static void b53_adjust_63xx_rgmii(struct
+@@ -1244,8 +1244,12 @@ static void b53_adjust_63xx_rgmii(struct
break;
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2612,6 +2612,20 @@ static const struct b53_chip_data b53_sw
+@@ -2621,6 +2621,20 @@ static const struct b53_chip_data b53_sw
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
},
};
static int b53_switch_init(struct b53_device *dev)
-@@ -2788,6 +2802,7 @@ int b53_switch_detect(struct b53_device
+@@ -2797,6 +2811,7 @@ int b53_switch_detect(struct b53_device
case BCM53012_DEVICE_ID:
case BCM53018_DEVICE_ID:
case BCM53019_DEVICE_ID:
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
-@@ -170,6 +170,7 @@ static int bcm2835_rng_probe(struct plat
+@@ -172,6 +172,7 @@ static int bcm2835_rng_probe(struct plat
priv->rng.init = bcm2835_rng_init;
priv->rng.read = bcm2835_rng_read;
priv->rng.cleanup = bcm2835_rng_cleanup;
netif_tx_disable(dev);
-@@ -6639,7 +6632,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6624,7 +6617,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
-@@ -6734,8 +6727,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6719,8 +6712,7 @@ int stmmac_xdp_open(struct net_device *d
stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
tx_q->tx_tail_addr, chan);
}
/* Enable the MAC Rx/Tx */
-@@ -6758,7 +6750,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6743,7 +6735,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
stmmac_hw_teardown(dev);
init_error:
-@@ -7485,7 +7477,7 @@ int stmmac_suspend(struct device *dev)
+@@ -7470,7 +7462,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
return 0;
}
-@@ -458,15 +652,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -458,17 +652,18 @@ ltq_etop_tx(struct sk_buff *skb, struct
int queue = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, queue);
struct ltq_etop_priv *priv = netdev_priv(dev);
u32 byte_offset;
+ int len;
- len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
+ if (skb_put_padto(skb, ETH_ZLEN))
+ return NETDEV_TX_OK;
+ len = skb->len;
- if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
+ if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) ||
netdev_err(dev, "tx ring full\n");
netif_tx_stop_queue(txq);
return NETDEV_TX_BUSY;
-@@ -474,7 +669,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -476,7 +671,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
/* dma needs to start on a 16 byte aligned address */
byte_offset = CPHYSADDR(skb->data) % 16;
netif_trans_update(dev);
-@@ -484,11 +679,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -486,11 +681,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
wmb();
desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK);
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
-@@ -499,11 +694,14 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -501,11 +696,14 @@ ltq_etop_change_mtu(struct net_device *d
{
struct ltq_etop_priv *priv = netdev_priv(dev);
unsigned long flags;
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
-@@ -556,6 +754,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -558,6 +756,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -573,9 +774,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -575,9 +776,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
return 0;
err_netdev:
-@@ -595,6 +797,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -597,6 +799,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -618,14 +823,18 @@ static const struct net_device_ops ltq_e
+@@ -620,14 +825,18 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -651,31 +860,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -653,31 +862,62 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
err = register_netdev(dev);
if (err)
-@@ -704,31 +944,22 @@ ltq_etop_remove(struct platform_device *
+@@ -706,31 +946,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}
+early_param("ethaddr", setup_ethaddr);
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -758,7 +758,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -760,7 +760,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
priv->txch.dma.nr = tx;
priv->txch.dma.dev = &priv->pdev->dev;
-@@ -677,8 +680,8 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -679,8 +682,8 @@ ltq_etop_tx(struct sk_buff *skb, struct
return NETDEV_TX_BUSY;
}
priv->txch.skb[priv->txch.dma.desc] = skb;
netif_trans_update(dev);
-@@ -926,6 +929,18 @@ static int ltq_etop_probe(struct platfor
+@@ -928,6 +931,18 @@ static int ltq_etop_probe(struct platfor
spin_lock_init(&priv->lock);
SET_NETDEV_DEV(dev, &pdev->dev);
if (IS_ERR(i2c->clk)) {
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
-@@ -577,7 +577,7 @@ static int geni_i2c_probe(struct platfor
+@@ -575,7 +575,7 @@ static int geni_i2c_probe(struct platfor
i2c_set_adapdata(&gi2c->adap, gi2c);
gi2c->adap.dev.parent = dev;
gi2c->adap.dev.of_node = dev->of_node;
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
-@@ -2097,6 +2097,14 @@ config CMDLINE_FORCE
+@@ -2099,6 +2099,14 @@ config CMDLINE_FORCE
endchoice
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
-@@ -732,6 +732,14 @@ config SENSORS_IBMPOWERNV
+@@ -734,6 +734,14 @@ config SENSORS_IBMPOWERNV
This driver can also be built as a module. If so, the module
will be called ibmpowernv.
#include <linux/platform_data/x86/apple.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
-@@ -6000,3 +6001,34 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -6008,3 +6009,34 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
#endif
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
-@@ -508,6 +508,12 @@ static int dwc2_driver_probe(struct plat
+@@ -496,6 +496,12 @@ static int dwc2_driver_probe(struct plat
if (retval)
return retval;
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
-@@ -566,6 +566,14 @@ config BUILTIN_DTB
+@@ -571,6 +571,14 @@ config BUILTIN_DTB
depends on OF
default y if XIP_KERNEL