mirror of
https://github.com/openwrt/openwrt.git
synced 2025-04-09 04:15:47 +00:00
kernel: bump 6.6 to 6.6.55
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.55 Added the following default ksym to target/linux/generic/config-6.6: CONFIG_PROC_MEM_ALWAYS_FORCE=y # CONFIG_PROC_MEM_FORCE_PTRACE is not set # CONFIG_PROC_MEM_NO_FORCE is not set Removed upstreamed: generic/backport-6.6/780-23-v6.12-r8169-Fix-spelling-mistake-tx_underun-tx_underrun.patch[1] generic/backport-6.6/780-25-v6.12-r8169-add-tally-counter-fields-added-with-RTL8125.patch[2] generic/pending-6.6/684-gso-fix-gso-fraglist-segmentation-after-pull-from-fr.patch[3] lantiq/patches-6.6/0025-v6.12-net-ethernet-lantiq_etop-fix-memory-disclosure.patch[4] Manually rebased: bcm27xx/patches-6.6/950-0086-Main-bcm2708-bcm2709-linux-port.patch bcm27xx/patches-6.6/950-0998-i2c-designware-Add-support-for-bus-clear-feature.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=f02fcb7283b1c25f7e3ae07d7a2c830e06eb1a62 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=1c723d785adb711496bc64c24240f952f4faaabf 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=af3122f5fdc0d00581d6e598a668df6bf54c9daa 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=e66e38d07b31e177ca430758ed97fbc79f27d966 Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/16655 Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
6b7d549dd0
commit
12f12df569
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .54
|
||||
LINUX_KERNEL_HASH-6.6.54 = 5fae869d6a24055c16ffc2d92669e3fb2b258e34d36c850bb8cf9def417ecfa0
|
||||
LINUX_VERSION-6.6 = .55
|
||||
LINUX_KERNEL_HASH-6.6.55 = cb636a09575d0aa06dc586433a3081a3f39ed2a7fdaa3d927df7385c0fd1e09d
|
||||
|
@ -125,10 +125,10 @@ board_bcm2835: Remove coherent dma pool increase - API has gone
|
||||
|
||||
- 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",
|
||||
@@ -192,7 +195,18 @@ static struct platform_driver bcm2835_mb
|
||||
@@ -193,7 +196,18 @@ static struct platform_driver bcm2835_mb
|
||||
},
|
||||
.probe = bcm2835_mbox_probe,
|
||||
};
|
||||
|
@ -17565,7 +17565,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
}
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -857,8 +857,14 @@ static int usb_audio_probe(struct usb_in
|
||||
@@ -863,8 +863,14 @@ static int usb_audio_probe(struct usb_in
|
||||
if (ignore_ctl_error)
|
||||
chip->quirk_flags |= QUIRK_FLAG_IGNORE_CTL_ERROR;
|
||||
|
||||
@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
* For devices with more than one control interface, we assume the
|
||||
--- a/sound/usb/quirks.c
|
||||
+++ b/sound/usb/quirks.c
|
||||
@@ -2191,6 +2191,8 @@ static const struct usb_audio_quirk_flag
|
||||
@@ -2195,6 +2195,8 @@ static const struct usb_audio_quirk_flag
|
||||
QUIRK_FLAG_ALIGN_TRANSFER),
|
||||
DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
|
||||
QUIRK_FLAG_ALIGN_TRANSFER),
|
||||
|
@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1409,6 +1412,9 @@
|
||||
@@ -1394,6 +1397,9 @@
|
||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-designware-core.h
|
||||
+++ b/drivers/i2c/busses/i2c-designware-core.h
|
||||
@@ -122,7 +122,9 @@
|
||||
@@ -123,7 +123,9 @@
|
||||
|
||||
#define DW_IC_ERR_TX_ABRT 0x1
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
regmap_update_bits(dev->map, DW_IC_CON, DW_IC_CON_10BITADDR_MASTER,
|
||||
ic_con);
|
||||
|
||||
@@ -472,6 +476,14 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
|
||||
@@ -500,6 +504,14 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
|
||||
regmap_read(dev->map, DW_IC_RXFLR, &flr);
|
||||
rx_limit = dev->rx_fifo_depth - flr;
|
||||
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
while (buf_len > 0 && tx_limit > 0 && rx_limit > 0) {
|
||||
u32 cmd = 0;
|
||||
|
||||
@@ -743,7 +755,7 @@ static const struct i2c_algorithm i2c_dw
|
||||
@@ -781,7 +793,7 @@ static const struct i2c_algorithm i2c_dw
|
||||
};
|
||||
|
||||
static const struct i2c_adapter_quirks i2c_dw_quirks = {
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
};
|
||||
|
||||
static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev)
|
||||
@@ -876,7 +888,8 @@ void i2c_dw_configure_master(struct dw_i
|
||||
@@ -914,7 +926,8 @@ void i2c_dw_configure_master(struct dw_i
|
||||
{
|
||||
struct i2c_timings *t = &dev->timings;
|
||||
|
||||
|
@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-designware-core.h
|
||||
+++ b/drivers/i2c/busses/i2c-designware-core.h
|
||||
@@ -291,6 +291,7 @@ struct dw_i2c_dev {
|
||||
@@ -292,6 +292,7 @@ struct dw_i2c_dev {
|
||||
u16 fp_lcnt;
|
||||
u16 hs_hcnt;
|
||||
u16 hs_lcnt;
|
||||
|
@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
};
|
||||
|
||||
static int dw_reg_read(void *context, unsigned int reg, unsigned int *val)
|
||||
@@ -593,8 +595,16 @@ int i2c_dw_wait_bus_not_busy(struct dw_i
|
||||
@@ -607,8 +609,16 @@ int i2c_dw_wait_bus_not_busy(struct dw_i
|
||||
int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
|
||||
{
|
||||
unsigned long abort_source = dev->abort_source;
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
if (abort_source & DW_IC_TX_ABRT_NOACK) {
|
||||
for_each_set_bit(i, &abort_source, ARRAY_SIZE(abort_sources))
|
||||
dev_dbg(dev->dev,
|
||||
@@ -609,6 +619,8 @@ int i2c_dw_handle_tx_abort(struct dw_i2c
|
||||
@@ -623,6 +633,8 @@ int i2c_dw_handle_tx_abort(struct dw_i2c
|
||||
return -EAGAIN;
|
||||
else if (abort_source & DW_IC_TX_ABRT_GCALL_READ)
|
||||
return -EINVAL; /* wrong msgs[] data */
|
||||
@ -74,11 +74,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
#define DW_IC_COMP_TYPE 0xfc
|
||||
#define DW_IC_COMP_TYPE_VALUE 0x44570140 /* "DW" + 0x0140 */
|
||||
|
||||
@@ -109,13 +112,16 @@
|
||||
DW_IC_INTR_RX_UNDER | \
|
||||
DW_IC_INTR_RD_REQ)
|
||||
@@ -111,12 +114,14 @@
|
||||
|
||||
+#define DW_IC_ENABLE_ENABLE BIT(0)
|
||||
#define DW_IC_ENABLE_ENABLE BIT(0)
|
||||
#define DW_IC_ENABLE_ABORT BIT(1)
|
||||
+#define DW_IC_ENABLE_BUS_RECOVERY BIT(3)
|
||||
|
||||
@ -91,7 +89,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
#define DW_IC_SDA_HOLD_RX_SHIFT 16
|
||||
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
|
||||
@@ -163,6 +169,7 @@
|
||||
@@ -164,6 +169,7 @@
|
||||
#define ABRT_SLAVE_FLUSH_TXFIFO 13
|
||||
#define ABRT_SLAVE_ARBLOST 14
|
||||
#define ABRT_SLAVE_RD_INTX 15
|
||||
@ -99,7 +97,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
#define DW_IC_TX_ABRT_7B_ADDR_NOACK BIT(ABRT_7B_ADDR_NOACK)
|
||||
#define DW_IC_TX_ABRT_10ADDR1_NOACK BIT(ABRT_10ADDR1_NOACK)
|
||||
@@ -178,6 +185,7 @@
|
||||
@@ -179,6 +185,7 @@
|
||||
#define DW_IC_RX_ABRT_SLAVE_RD_INTX BIT(ABRT_SLAVE_RD_INTX)
|
||||
#define DW_IC_RX_ABRT_SLAVE_ARBLOST BIT(ABRT_SLAVE_ARBLOST)
|
||||
#define DW_IC_RX_ABRT_SLAVE_FLUSH_TXFIFO BIT(ABRT_SLAVE_FLUSH_TXFIFO)
|
||||
@ -135,7 +133,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
/* Write SDA hold time if supported */
|
||||
if (dev->sda_hold_time)
|
||||
regmap_write(dev->map, DW_IC_SDA_HOLD, dev->sda_hold_time);
|
||||
@@ -1033,6 +1045,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
@@ -1071,6 +1083,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
struct i2c_adapter *adap = &dev->adapter;
|
||||
unsigned long irq_flags;
|
||||
unsigned int ic_con;
|
||||
@ -143,7 +141,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
int ret;
|
||||
|
||||
init_completion(&dev->cmd_complete);
|
||||
@@ -1068,7 +1081,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
@@ -1106,7 +1119,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -4473,13 +4473,7 @@ static inline void ____napi_schedule(str
|
||||
@@ -4477,13 +4477,7 @@ static inline void ____napi_schedule(str
|
||||
*/
|
||||
thread = READ_ONCE(napi->thread);
|
||||
if (thread) {
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
wake_up_process(thread);
|
||||
return;
|
||||
}
|
||||
@@ -6635,8 +6629,6 @@ static int napi_poll(struct napi_struct
|
||||
@@ -6639,8 +6633,6 @@ static int napi_poll(struct napi_struct
|
||||
|
||||
static int napi_thread_wait(struct napi_struct *napi)
|
||||
{
|
||||
@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
while (!kthread_should_stop()) {
|
||||
@@ -6645,15 +6637,13 @@ static int napi_thread_wait(struct napi_
|
||||
@@ -6649,15 +6641,13 @@ static int napi_thread_wait(struct napi_
|
||||
* Testing SCHED bit is not enough because SCHED bit might be
|
||||
* set by some other busy poll thread or by napi_disable().
|
||||
*/
|
||||
|
@ -108,7 +108,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static inline void rps_lock_irqsave(struct softnet_data *sd,
|
||||
unsigned long *flags)
|
||||
{
|
||||
@@ -4441,6 +4467,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
|
||||
@@ -4445,6 +4471,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
|
||||
/*************************************************************************
|
||||
* Receiver routines
|
||||
*************************************************************************/
|
||||
@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
int netdev_max_backlog __read_mostly = 1000;
|
||||
EXPORT_SYMBOL(netdev_max_backlog);
|
||||
@@ -4473,12 +4500,16 @@ static inline void ____napi_schedule(str
|
||||
@@ -4477,12 +4504,16 @@ static inline void ____napi_schedule(str
|
||||
*/
|
||||
thread = READ_ONCE(napi->thread);
|
||||
if (thread) {
|
||||
@ -133,7 +133,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
list_add_tail(&napi->poll_list, &sd->poll_list);
|
||||
WRITE_ONCE(napi->list_owner, smp_processor_id());
|
||||
/* If not called from net_rx_action()
|
||||
@@ -4724,6 +4755,11 @@ static void napi_schedule_rps(struct sof
|
||||
@@ -4728,6 +4759,11 @@ static void napi_schedule_rps(struct sof
|
||||
|
||||
#ifdef CONFIG_RPS
|
||||
if (sd != mysd) {
|
||||
@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
sd->rps_ipi_next = mysd->rps_ipi_list;
|
||||
mysd->rps_ipi_list = sd;
|
||||
|
||||
@@ -5947,7 +5983,7 @@ static void net_rps_action_and_irq_enabl
|
||||
@@ -5951,7 +5987,7 @@ static void net_rps_action_and_irq_enabl
|
||||
#ifdef CONFIG_RPS
|
||||
struct softnet_data *remsd = sd->rps_ipi_list;
|
||||
|
||||
@ -154,7 +154,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
sd->rps_ipi_list = NULL;
|
||||
|
||||
local_irq_enable();
|
||||
@@ -5962,7 +5998,7 @@ static void net_rps_action_and_irq_enabl
|
||||
@@ -5966,7 +6002,7 @@ static void net_rps_action_and_irq_enabl
|
||||
static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
|
||||
{
|
||||
#ifdef CONFIG_RPS
|
||||
@ -163,7 +163,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -6006,7 +6042,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6010,7 +6046,7 @@ 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.
|
||||
*/
|
||||
@ -172,7 +172,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
again = false;
|
||||
} else {
|
||||
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
||||
@@ -6672,43 +6708,48 @@ static void skb_defer_free_flush(struct
|
||||
@@ -6676,43 +6712,48 @@ static void skb_defer_free_flush(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11289,7 +11330,7 @@ static int dev_cpu_dead(unsigned int old
|
||||
@@ -11293,7 +11334,7 @@ static int dev_cpu_dead(unsigned int old
|
||||
|
||||
list_del_init(&napi->poll_list);
|
||||
if (napi->poll == process_backlog)
|
||||
@ -259,7 +259,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
else
|
||||
____napi_schedule(sd, napi);
|
||||
}
|
||||
@@ -11297,12 +11338,14 @@ static int dev_cpu_dead(unsigned int old
|
||||
@@ -11301,12 +11342,14 @@ static int dev_cpu_dead(unsigned int old
|
||||
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
||||
local_irq_enable();
|
||||
|
||||
@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
/* Process offline CPU's input_pkt_queue */
|
||||
while ((skb = __skb_dequeue(&oldsd->process_queue))) {
|
||||
@@ -11565,6 +11608,38 @@ static struct pernet_operations __net_in
|
||||
@@ -11569,6 +11612,38 @@ static struct pernet_operations __net_in
|
||||
*
|
||||
*/
|
||||
|
||||
@ -317,7 +317,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/*
|
||||
* This is called single threaded during boot, so no need
|
||||
* to take the rtnl semaphore.
|
||||
@@ -11615,7 +11690,10 @@ static int __init net_dev_init(void)
|
||||
@@ -11619,7 +11694,10 @@ static int __init net_dev_init(void)
|
||||
init_gro_hash(&sd->backlog);
|
||||
sd->backlog.poll = process_backlog;
|
||||
sd->backlog.weight = weight_p;
|
||||
|
@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
spin_unlock_irq(&sd->input_pkt_queue.lock);
|
||||
else if (!IS_ENABLED(CONFIG_PREEMPT_RT))
|
||||
local_irq_enable();
|
||||
@@ -4774,6 +4774,23 @@ static void napi_schedule_rps(struct sof
|
||||
@@ -4778,6 +4778,23 @@ static void napi_schedule_rps(struct sof
|
||||
__napi_schedule_irqoff(&mysd->backlog);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads())
|
||||
spin_unlock_irq(&sd->input_pkt_queue.lock);
|
||||
@@ -4779,12 +4779,12 @@ void kick_defer_list_purge(struct softne
|
||||
@@ -4783,12 +4783,12 @@ void kick_defer_list_purge(struct softne
|
||||
unsigned long flags;
|
||||
|
||||
if (use_backlog_threads()) {
|
||||
@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
} else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
|
||||
smp_call_function_single_async(cpu, &sd->defer_csd);
|
||||
@@ -4846,7 +4846,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
@@ -4850,7 +4850,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
reason = SKB_DROP_REASON_NOT_SPECIFIED;
|
||||
sd = &per_cpu(softnet_data, cpu);
|
||||
|
||||
@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
if (!netif_running(skb->dev))
|
||||
goto drop;
|
||||
qlen = skb_queue_len(&sd->input_pkt_queue);
|
||||
@@ -4855,7 +4855,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
@@ -4859,7 +4859,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
enqueue:
|
||||
__skb_queue_tail(&sd->input_pkt_queue, skb);
|
||||
input_queue_tail_incr_save(sd, qtail);
|
||||
@ -100,7 +100,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return NET_RX_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -4870,7 +4870,7 @@ enqueue:
|
||||
@@ -4874,7 +4874,7 @@ enqueue:
|
||||
|
||||
drop:
|
||||
sd->dropped++;
|
||||
@ -109,7 +109,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
dev_core_stats_rx_dropped_inc(skb->dev);
|
||||
kfree_skb_reason(skb, reason);
|
||||
@@ -5901,7 +5901,7 @@ static void flush_backlog(struct work_st
|
||||
@@ -5905,7 +5905,7 @@ static void flush_backlog(struct work_st
|
||||
local_bh_disable();
|
||||
sd = this_cpu_ptr(&softnet_data);
|
||||
|
||||
@ -118,7 +118,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
|
||||
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
||||
__skb_unlink(skb, &sd->input_pkt_queue);
|
||||
@@ -5909,7 +5909,7 @@ static void flush_backlog(struct work_st
|
||||
@@ -5913,7 +5913,7 @@ static void flush_backlog(struct work_st
|
||||
input_queue_head_incr(sd);
|
||||
}
|
||||
}
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
|
||||
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
||||
@@ -5927,14 +5927,14 @@ static bool flush_required(int cpu)
|
||||
@@ -5931,14 +5931,14 @@ static bool flush_required(int cpu)
|
||||
struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
||||
bool do_flush;
|
||||
|
||||
@ -144,7 +144,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
return do_flush;
|
||||
#endif
|
||||
@@ -6049,7 +6049,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6053,7 +6053,7 @@ static int process_backlog(struct napi_s
|
||||
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
if (skb_queue_empty(&sd->input_pkt_queue)) {
|
||||
/*
|
||||
* Inline a custom version of __napi_complete().
|
||||
@@ -6065,7 +6065,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6069,7 +6069,7 @@ static int process_backlog(struct napi_s
|
||||
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
||||
&sd->process_queue);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
--- a/net/ipv4/udp_offload.c
|
||||
+++ b/net/ipv4/udp_offload.c
|
||||
@@ -362,6 +362,14 @@ struct sk_buff *__udp_gso_segment(struct
|
||||
@@ -380,6 +380,14 @@ struct sk_buff *__udp_gso_segment(struct
|
||||
else
|
||||
uh->check = gso_make_checksum(seg, ~check) ? : CSUM_MANGLED_0;
|
||||
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -9751,6 +9751,15 @@ static void netdev_sync_lower_features(s
|
||||
@@ -9755,6 +9755,15 @@ static void netdev_sync_lower_features(s
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static netdev_features_t netdev_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
@@ -9832,15 +9841,9 @@ static netdev_features_t netdev_fix_feat
|
||||
@@ -9836,15 +9845,9 @@ static netdev_features_t netdev_fix_feat
|
||||
features &= ~NETIF_F_LRO;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) {
|
||||
@@ -9848,6 +9851,11 @@ static netdev_features_t netdev_fix_feat
|
||||
@@ -9852,6 +9855,11 @@ static netdev_features_t netdev_fix_feat
|
||||
features &= ~NETIF_F_HW_TLS_RX;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10658,6 +10658,8 @@ struct rtnl_link_stats64 *dev_get_stats(
|
||||
@@ -10662,6 +10662,8 @@ struct rtnl_link_stats64 *dev_get_stats(
|
||||
ops->ndo_get_stats64(dev, storage);
|
||||
} else if (ops->ndo_get_stats) {
|
||||
netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
|
||||
|
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/**
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -6602,7 +6602,7 @@ static int __napi_poll(struct napi_struc
|
||||
@@ -6606,7 +6606,7 @@ static int __napi_poll(struct napi_struc
|
||||
* accidentally calling ->poll() when NAPI is not scheduled.
|
||||
*/
|
||||
work = 0;
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -3129,6 +3129,33 @@ static void rtl_hw_start_8168g_2(struct
|
||||
@@ -3156,6 +3156,33 @@ static void rtl_hw_start_8168g_2(struct
|
||||
rtl_ephy_init(tp, e_info_8168g_2);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl_hw_start_8411_2(struct rtl8169_private *tp)
|
||||
{
|
||||
static const struct ephy_info e_info_8411_2[] = {
|
||||
@@ -3162,117 +3189,7 @@ static void rtl_hw_start_8411_2(struct r
|
||||
@@ -3189,117 +3216,7 @@ static void rtl_hw_start_8411_2(struct r
|
||||
mdelay(3);
|
||||
r8168_mac_ocp_write(tp, 0xFC26, 0x0000);
|
||||
|
||||
|
@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
#define TX_DMA_BURST 7 /* Maximum PCI burst, '7' is unlimited */
|
||||
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
|
||||
|
||||
@@ -2626,8 +2622,7 @@ static void rtl_set_rx_mode(struct net_d
|
||||
@@ -2653,8 +2649,7 @@ static void rtl_set_rx_mode(struct net_d
|
||||
rx_mode |= AcceptAllPhys;
|
||||
} else if (!(dev->flags & IFF_MULTICAST)) {
|
||||
rx_mode &= ~AcceptMulticast;
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -2252,6 +2252,9 @@ u16 rtl8168h_2_get_adc_bias_ioffset(stru
|
||||
@@ -2279,6 +2279,9 @@ u16 rtl8168h_2_get_adc_bias_ioffset(stru
|
||||
|
||||
static void rtl_schedule_task(struct rtl8169_private *tp, enum rtl_flag flag)
|
||||
{
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
set_bit(flag, tp->wk.flags);
|
||||
schedule_work(&tp->wk.work);
|
||||
}
|
||||
@@ -4491,8 +4494,7 @@ static void rtl_task(struct work_struct
|
||||
@@ -4518,8 +4521,7 @@ static void rtl_task(struct work_struct
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
|
@ -225,7 +225,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
LED_FREQ = 0x1a,
|
||||
EEE_LED = 0x1b,
|
||||
ERIDR = 0x70,
|
||||
@@ -616,6 +617,7 @@ struct rtl8169_private {
|
||||
@@ -643,6 +644,7 @@ struct rtl8169_private {
|
||||
|
||||
raw_spinlock_t config25_lock;
|
||||
raw_spinlock_t mac_ocp_lock;
|
||||
@ -233,7 +233,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
raw_spinlock_t cfg9346_usage_lock;
|
||||
int cfg9346_usage_count;
|
||||
@@ -788,6 +790,62 @@ static const struct rtl_cond name = {
|
||||
@@ -815,6 +817,62 @@ static const struct rtl_cond name = {
|
||||
\
|
||||
static bool name ## _check(struct rtl8169_private *tp)
|
||||
|
||||
@ -296,7 +296,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type)
|
||||
{
|
||||
/* based on RTL8168FP_OOBMAC_BASE in vendor driver */
|
||||
@@ -5168,6 +5226,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5195,6 +5253,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
raw_spin_lock_init(&tp->cfg9346_usage_lock);
|
||||
raw_spin_lock_init(&tp->config25_lock);
|
||||
raw_spin_lock_init(&tp->mac_ocp_lock);
|
||||
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev,
|
||||
struct pcpu_sw_netstats);
|
||||
@@ -5324,6 +5383,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5351,6 +5410,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
obj-$(CONFIG_R8169) += r8169.o
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5383,11 +5383,10 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5410,11 +5410,10 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -629,7 +629,6 @@ struct rtl8169_private {
|
||||
@@ -656,7 +656,6 @@ struct rtl8169_private {
|
||||
struct rtl8169_counters *counters;
|
||||
struct rtl8169_tc_offsets tc_offset;
|
||||
u32 saved_wolopts;
|
||||
@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
const char *fw_name;
|
||||
struct rtl_fw *rtl_fw;
|
||||
@@ -2010,17 +2009,11 @@ static int rtl8169_get_eee(struct net_de
|
||||
@@ -2037,17 +2036,11 @@ static int rtl8169_get_eee(struct net_de
|
||||
static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data)
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static void rtl8169_get_ringparam(struct net_device *dev,
|
||||
@@ -2085,21 +2078,6 @@ static const struct ethtool_ops rtl8169_
|
||||
@@ -2112,21 +2105,6 @@ static const struct ethtool_ops rtl8169_
|
||||
.set_pauseparam = rtl8169_set_pauseparam,
|
||||
};
|
||||
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
|
||||
{
|
||||
/*
|
||||
@@ -2336,9 +2314,6 @@ static void rtl8169_init_phy(struct rtl8
|
||||
@@ -2363,9 +2341,6 @@ static void rtl8169_init_phy(struct rtl8
|
||||
/* We may have called phy_speed_down before */
|
||||
phy_speed_up(tp->phydev);
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
genphy_soft_reset(tp->phydev);
|
||||
}
|
||||
|
||||
@@ -5085,7 +5060,9 @@ static int r8169_mdio_register(struct rt
|
||||
@@ -5112,7 +5087,9 @@ static int r8169_mdio_register(struct rt
|
||||
}
|
||||
|
||||
tp->phydev->mac_managed_pm = true;
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
phy_support_asym_pause(tp->phydev);
|
||||
|
||||
/* PHY will be woken up in rtl_open() */
|
||||
@@ -5220,7 +5197,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5247,7 +5224,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
tp->dev = dev;
|
||||
tp->pci_dev = pdev;
|
||||
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
TxPoll_8125 = 0x90,
|
||||
MAC0_BKP = 0x19e0,
|
||||
EEE_TXIDLE_TIMER_8125 = 0x6048,
|
||||
@@ -1139,7 +1146,7 @@ static void rtl_writephy(struct rtl8169_
|
||||
@@ -1166,7 +1173,7 @@ static void rtl_writephy(struct rtl8169_
|
||||
case RTL_GIGA_MAC_VER_31:
|
||||
r8168dp_2_mdio_write(tp, location, val);
|
||||
break;
|
||||
@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8168g_mdio_write(tp, location, val);
|
||||
break;
|
||||
default:
|
||||
@@ -1154,7 +1161,7 @@ static int rtl_readphy(struct rtl8169_pr
|
||||
@@ -1181,7 +1188,7 @@ static int rtl_readphy(struct rtl8169_pr
|
||||
case RTL_GIGA_MAC_VER_28:
|
||||
case RTL_GIGA_MAC_VER_31:
|
||||
return r8168dp_2_mdio_read(tp, location);
|
||||
@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return r8168g_mdio_read(tp, location);
|
||||
default:
|
||||
return r8169_mdio_read(tp, location);
|
||||
@@ -1363,7 +1370,7 @@ static void rtl_set_d3_pll_down(struct r
|
||||
@@ -1390,7 +1397,7 @@ static void rtl_set_d3_pll_down(struct r
|
||||
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26:
|
||||
case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30:
|
||||
case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_37:
|
||||
@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (enable)
|
||||
RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~D3_NO_PLL_DOWN);
|
||||
else
|
||||
@@ -1530,7 +1537,7 @@ static void __rtl8169_set_wol(struct rtl
|
||||
@@ -1557,7 +1564,7 @@ static void __rtl8169_set_wol(struct rtl
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
case RTL_GIGA_MAC_VER_37:
|
||||
@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (wolopts)
|
||||
rtl_mod_config2(tp, 0, PME_SIGNAL);
|
||||
else
|
||||
@@ -2096,6 +2103,9 @@ static enum mac_version rtl8169_get_mac_
|
||||
@@ -2123,6 +2130,9 @@ static enum mac_version rtl8169_get_mac_
|
||||
u16 val;
|
||||
enum mac_version ver;
|
||||
} mac_info[] = {
|
||||
@ -111,7 +111,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* 8125B family. */
|
||||
{ 0x7cf, 0x641, RTL_GIGA_MAC_VER_63 },
|
||||
|
||||
@@ -2366,6 +2376,7 @@ static void rtl_init_rxcfg(struct rtl816
|
||||
@@ -2393,6 +2403,7 @@ static void rtl_init_rxcfg(struct rtl816
|
||||
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST);
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_63:
|
||||
@ -119,7 +119,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST |
|
||||
RX_PAUSE_SLOT_ON);
|
||||
break;
|
||||
@@ -2552,7 +2563,7 @@ static void rtl_wait_txrx_fifo_empty(str
|
||||
@@ -2579,7 +2590,7 @@ static void rtl_wait_txrx_fifo_empty(str
|
||||
case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_61:
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
|
||||
break;
|
||||
@ -128,7 +128,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond_2, 100, 42);
|
||||
@@ -2795,7 +2806,7 @@ static void rtl_enable_exit_l1(struct rt
|
||||
@@ -2822,7 +2833,7 @@ static void rtl_enable_exit_l1(struct rt
|
||||
case RTL_GIGA_MAC_VER_37 ... RTL_GIGA_MAC_VER_38:
|
||||
rtl_eri_set_bits(tp, 0xd4, 0x0c00);
|
||||
break;
|
||||
@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
|
||||
break;
|
||||
default:
|
||||
@@ -2809,7 +2820,7 @@ static void rtl_disable_exit_l1(struct r
|
||||
@@ -2836,7 +2847,7 @@ static void rtl_disable_exit_l1(struct r
|
||||
case RTL_GIGA_MAC_VER_34 ... RTL_GIGA_MAC_VER_38:
|
||||
rtl_eri_clear_bits(tp, 0xd4, 0x1f00);
|
||||
break;
|
||||
@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
|
||||
break;
|
||||
default:
|
||||
@@ -2819,6 +2830,8 @@ static void rtl_disable_exit_l1(struct r
|
||||
@@ -2846,6 +2857,8 @@ static void rtl_disable_exit_l1(struct r
|
||||
|
||||
static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
|
||||
{
|
||||
@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (tp->mac_version < RTL_GIGA_MAC_VER_32)
|
||||
return;
|
||||
|
||||
@@ -2832,11 +2845,19 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2859,11 +2872,19 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
return;
|
||||
|
||||
rtl_mod_config5(tp, 0, ASPM_en);
|
||||
@ -177,7 +177,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* reset ephy tx/rx disable timer */
|
||||
r8168_mac_ocp_modify(tp, 0xe094, 0xff00, 0);
|
||||
/* chip can trigger L1.2 */
|
||||
@@ -2848,14 +2869,22 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2875,14 +2896,22 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
} else {
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
|
||||
@ -202,7 +202,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rtl_mod_config5(tp, ASPM_en, 0);
|
||||
}
|
||||
}
|
||||
@@ -3568,10 +3597,15 @@ static void rtl_hw_start_8125_common(str
|
||||
@@ -3595,10 +3624,15 @@ static void rtl_hw_start_8125_common(str
|
||||
/* disable new tx descriptor format */
|
||||
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
|
||||
|
||||
@ -220,7 +220,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (tp->mac_version == RTL_GIGA_MAC_VER_63)
|
||||
r8168_mac_ocp_modify(tp, 0xe63e, 0x0c30, 0x0000);
|
||||
@@ -3584,6 +3618,10 @@ static void rtl_hw_start_8125_common(str
|
||||
@@ -3611,6 +3645,10 @@ static void rtl_hw_start_8125_common(str
|
||||
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
|
||||
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
|
||||
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
|
||||
@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
r8168_mac_ocp_modify(tp, 0xe0c0, 0x4f0f, 0x4403);
|
||||
r8168_mac_ocp_modify(tp, 0xe052, 0x0080, 0x0068);
|
||||
r8168_mac_ocp_modify(tp, 0xd430, 0x0fff, 0x047f);
|
||||
@@ -3598,10 +3636,10 @@ static void rtl_hw_start_8125_common(str
|
||||
@@ -3625,10 +3663,10 @@ static void rtl_hw_start_8125_common(str
|
||||
|
||||
rtl_loop_wait_low(tp, &rtl_mac_ocp_e00e_cond, 1000, 10);
|
||||
|
||||
@ -245,7 +245,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
rtl_disable_rxdvgate(tp);
|
||||
}
|
||||
@@ -3645,6 +3683,12 @@ static void rtl_hw_start_8125b(struct rt
|
||||
@@ -3672,6 +3710,12 @@ static void rtl_hw_start_8125b(struct rt
|
||||
rtl_hw_start_8125_common(tp);
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
static void rtl_hw_config(struct rtl8169_private *tp)
|
||||
{
|
||||
static const rtl_generic_fct hw_configs[] = {
|
||||
@@ -3687,6 +3731,7 @@ static void rtl_hw_config(struct rtl8169
|
||||
@@ -3714,6 +3758,7 @@ static void rtl_hw_config(struct rtl8169
|
||||
[RTL_GIGA_MAC_VER_53] = rtl_hw_start_8117,
|
||||
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
|
||||
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
|
||||
@ -266,7 +266,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
};
|
||||
|
||||
if (hw_configs[tp->mac_version])
|
||||
@@ -3697,9 +3742,23 @@ static void rtl_hw_start_8125(struct rtl
|
||||
@@ -3724,9 +3769,23 @@ static void rtl_hw_start_8125(struct rtl
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
rtl_hw_config(tp);
|
||||
}
|
||||
@@ -3777,8 +3836,7 @@ static int rtl8169_change_mtu(struct net
|
||||
@@ -3804,8 +3863,7 @@ static int rtl8169_change_mtu(struct net
|
||||
rtl_jumbo_config(tp);
|
||||
|
||||
switch (tp->mac_version) {
|
||||
@ -302,7 +302,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rtl8125_set_eee_txidle_timer(tp);
|
||||
break;
|
||||
default:
|
||||
@@ -3927,7 +3985,7 @@ static void rtl8169_cleanup(struct rtl81
|
||||
@@ -3954,7 +4012,7 @@ static void rtl8169_cleanup(struct rtl81
|
||||
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
|
||||
rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666);
|
||||
break;
|
||||
@ -311,7 +311,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
rtl_enable_rxdvgate(tp);
|
||||
fsleep(2000);
|
||||
break;
|
||||
@@ -4078,8 +4136,7 @@ static unsigned int rtl_quirk_packet_pad
|
||||
@@ -4105,8 +4163,7 @@ static unsigned int rtl_quirk_packet_pad
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
@ -321,7 +321,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
padto = max_t(unsigned int, padto, ETH_ZLEN);
|
||||
break;
|
||||
default:
|
||||
@@ -5112,7 +5169,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
@@ -5139,7 +5196,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
|
||||
rtl_hw_init_8168g(tp);
|
||||
break;
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5261,11 +5261,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5288,11 +5288,6 @@ static int rtl_init_one(struct pci_dev *
|
||||
raw_spin_lock_init(&tp->mac_ocp_lock);
|
||||
mutex_init(&tp->led_lock);
|
||||
|
||||
@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/* Get the *optional* external "ether_clk" used on some boards */
|
||||
tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk");
|
||||
if (IS_ERR(tp->clk))
|
||||
@@ -5380,6 +5375,8 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5407,6 +5402,8 @@ static int rtl_init_one(struct pci_dev *
|
||||
dev->hw_features |= NETIF_F_RXALL;
|
||||
dev->hw_features |= NETIF_F_RXFCS;
|
||||
|
||||
|
@ -173,7 +173,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
#define RX_VLAN_INNER_8125 BIT(22)
|
||||
#define RX_VLAN_OUTER_8125 BIT(23)
|
||||
#define RX_VLAN_8125 (RX_VLAN_INNER_8125 | RX_VLAN_OUTER_8125)
|
||||
@@ -830,6 +836,51 @@ int rtl8168_get_led_mode(struct rtl8169_
|
||||
@@ -857,6 +863,51 @@ int rtl8168_get_led_mode(struct rtl8169_
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
void r8169_get_led_name(struct rtl8169_private *tp, int idx,
|
||||
char *buf, int buf_len)
|
||||
{
|
||||
@@ -5413,10 +5464,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5440,10 +5491,12 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -619,6 +619,7 @@ struct rtl8169_private {
|
||||
@@ -646,6 +646,7 @@ struct rtl8169_private {
|
||||
struct page *Rx_databuff[NUM_RX_DESC]; /* Rx data buffers */
|
||||
struct ring_info tx_skb[NUM_TX_DESC]; /* Tx data buffers */
|
||||
u16 cp_cmd;
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
u32 irq_mask;
|
||||
int irq;
|
||||
struct clk *clk;
|
||||
@@ -2054,6 +2055,22 @@ static int rtl_set_coalesce(struct net_d
|
||||
@@ -2081,6 +2082,22 @@ static int rtl_set_coalesce(struct net_d
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static int rtl8169_get_eee(struct net_device *dev, struct ethtool_eee *data)
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
@@ -2312,14 +2329,8 @@ static void rtl8125a_config_eee_mac(stru
|
||||
@@ -2339,14 +2356,8 @@ static void rtl8125a_config_eee_mac(stru
|
||||
r8168_mac_ocp_modify(tp, 0xeb62, 0, BIT(2) | BIT(1));
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xe040, 0, BIT(1) | BIT(0));
|
||||
}
|
||||
|
||||
@@ -3852,6 +3863,8 @@ static void rtl_hw_start(struct rtl8169
|
||||
@@ -3879,6 +3890,8 @@ static void rtl_hw_start(struct rtl8169
|
||||
rtl_hw_aspm_clkreq_enable(tp, false);
|
||||
RTL_W16(tp, CPlusCmd, tp->cp_cmd);
|
||||
|
||||
@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
|
||||
rtl_hw_start_8169(tp);
|
||||
else if (rtl_is_8125(tp))
|
||||
@@ -3885,14 +3898,7 @@ static int rtl8169_change_mtu(struct net
|
||||
@@ -3912,14 +3925,7 @@ static int rtl8169_change_mtu(struct net
|
||||
dev->mtu = new_mtu;
|
||||
netdev_update_features(dev);
|
||||
rtl_jumbo_config(tp);
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -2060,6 +2060,11 @@ static void rtl_set_eee_txidle_timer(str
|
||||
@@ -2087,6 +2087,11 @@ static void rtl_set_eee_txidle_timer(str
|
||||
unsigned int timer_val = READ_ONCE(tp->dev->mtu) + ETH_HLEN + 0x20;
|
||||
|
||||
switch (tp->mac_version) {
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -2076,14 +2076,34 @@ static void rtl_set_eee_txidle_timer(str
|
||||
@@ -2103,14 +2103,34 @@ static void rtl_set_eee_txidle_timer(str
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -676,6 +676,7 @@ MODULE_FIRMWARE(FIRMWARE_8168FP_3);
|
||||
@@ -703,6 +703,7 @@ MODULE_FIRMWARE(FIRMWARE_8168FP_3);
|
||||
MODULE_FIRMWARE(FIRMWARE_8107E_2);
|
||||
MODULE_FIRMWARE(FIRMWARE_8125A_3);
|
||||
MODULE_FIRMWARE(FIRMWARE_8125B_2);
|
||||
|
@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -647,6 +647,8 @@ struct rtl8169_private {
|
||||
@@ -674,6 +674,8 @@ struct rtl8169_private {
|
||||
const char *fw_name;
|
||||
struct rtl_fw *rtl_fw;
|
||||
|
||||
@ -124,7 +124,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
u32 ocp_base;
|
||||
};
|
||||
|
||||
@@ -5040,6 +5042,8 @@ static void rtl_remove_one(struct pci_de
|
||||
@@ -5067,6 +5069,8 @@ static void rtl_remove_one(struct pci_de
|
||||
|
||||
cancel_work_sync(&tp->wk.work);
|
||||
|
||||
@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
unregister_netdev(tp->dev);
|
||||
|
||||
if (tp->dash_type != RTL_DASH_NONE)
|
||||
@@ -5498,9 +5502,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5525,9 +5529,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
|
||||
if (IS_ENABLED(CONFIG_R8169_LEDS)) {
|
||||
if (rtl_is_8125(tp))
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5042,7 +5042,8 @@ static void rtl_remove_one(struct pci_de
|
||||
@@ -5069,7 +5069,8 @@ static void rtl_remove_one(struct pci_de
|
||||
|
||||
cancel_work_sync(&tp->wk.work);
|
||||
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -2230,6 +2230,8 @@ static enum mac_version rtl8169_get_mac_
|
||||
@@ -2257,6 +2257,8 @@ static enum mac_version rtl8169_get_mac_
|
||||
* the wild. Let's disable detection.
|
||||
* { 0x7cf, 0x540, RTL_GIGA_MAC_VER_45 },
|
||||
*/
|
||||
|
@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -3925,7 +3925,7 @@ static int rtl8169_change_mtu(struct net
|
||||
@@ -3952,7 +3952,7 @@ static int rtl8169_change_mtu(struct net
|
||||
{
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5083,12 +5083,10 @@ static void rtl_set_irq_mask(struct rtl8
|
||||
@@ -5110,12 +5110,10 @@ static void rtl_set_irq_mask(struct rtl8
|
||||
tp->irq_mask = RxOK | RxErr | TxOK | TxErr | LinkChg;
|
||||
|
||||
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -2275,7 +2275,9 @@ static enum mac_version rtl8169_get_mac_
|
||||
@@ -2302,7 +2302,9 @@ static enum mac_version rtl8169_get_mac_
|
||||
|
||||
/* 8168B family. */
|
||||
{ 0x7c8, 0x380, RTL_GIGA_MAC_VER_17 },
|
||||
|
@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
};
|
||||
|
||||
static const struct pci_device_id rtl8169_pci_tbl[] = {
|
||||
@@ -1201,7 +1203,7 @@ static void rtl_writephy(struct rtl8169_
|
||||
@@ -1228,7 +1230,7 @@ static void rtl_writephy(struct rtl8169_
|
||||
case RTL_GIGA_MAC_VER_31:
|
||||
r8168dp_2_mdio_write(tp, location, val);
|
||||
break;
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168g_mdio_write(tp, location, val);
|
||||
break;
|
||||
default:
|
||||
@@ -1216,7 +1218,7 @@ static int rtl_readphy(struct rtl8169_pr
|
||||
@@ -1243,7 +1245,7 @@ static int rtl_readphy(struct rtl8169_pr
|
||||
case RTL_GIGA_MAC_VER_28:
|
||||
case RTL_GIGA_MAC_VER_31:
|
||||
return r8168dp_2_mdio_read(tp, location);
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
return r8168g_mdio_read(tp, location);
|
||||
default:
|
||||
return r8169_mdio_read(tp, location);
|
||||
@@ -1425,7 +1427,7 @@ static void rtl_set_d3_pll_down(struct r
|
||||
@@ -1452,7 +1454,7 @@ static void rtl_set_d3_pll_down(struct r
|
||||
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26:
|
||||
case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30:
|
||||
case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_37:
|
||||
@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (enable)
|
||||
RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~D3_NO_PLL_DOWN);
|
||||
else
|
||||
@@ -1592,7 +1594,7 @@ static void __rtl8169_set_wol(struct rtl
|
||||
@@ -1619,7 +1621,7 @@ static void __rtl8169_set_wol(struct rtl
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
case RTL_GIGA_MAC_VER_37:
|
||||
@ -80,7 +80,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (wolopts)
|
||||
rtl_mod_config2(tp, 0, PME_SIGNAL);
|
||||
else
|
||||
@@ -2071,6 +2073,7 @@ static void rtl_set_eee_txidle_timer(str
|
||||
@@ -2098,6 +2100,7 @@ static void rtl_set_eee_txidle_timer(str
|
||||
case RTL_GIGA_MAC_VER_61:
|
||||
case RTL_GIGA_MAC_VER_63:
|
||||
case RTL_GIGA_MAC_VER_65:
|
||||
@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
tp->tx_lpi_timer = timer_val;
|
||||
RTL_W16(tp, EEE_TXIDLE_TIMER_8125, timer_val);
|
||||
break;
|
||||
@@ -2200,6 +2203,7 @@ static enum mac_version rtl8169_get_mac_
|
||||
@@ -2227,6 +2230,7 @@ static enum mac_version rtl8169_get_mac_
|
||||
enum mac_version ver;
|
||||
} mac_info[] = {
|
||||
/* 8126A family. */
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
{ 0x7cf, 0x649, RTL_GIGA_MAC_VER_65 },
|
||||
|
||||
/* 8125B family. */
|
||||
@@ -2471,6 +2475,7 @@ static void rtl_init_rxcfg(struct rtl816
|
||||
@@ -2498,6 +2502,7 @@ static void rtl_init_rxcfg(struct rtl816
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_63:
|
||||
case RTL_GIGA_MAC_VER_65:
|
||||
@ -104,7 +104,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST |
|
||||
RX_PAUSE_SLOT_ON);
|
||||
break;
|
||||
@@ -2657,7 +2662,7 @@ static void rtl_wait_txrx_fifo_empty(str
|
||||
@@ -2684,7 +2689,7 @@ static void rtl_wait_txrx_fifo_empty(str
|
||||
case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_61:
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
|
||||
break;
|
||||
@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
|
||||
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond_2, 100, 42);
|
||||
@@ -2900,7 +2905,7 @@ static void rtl_enable_exit_l1(struct rt
|
||||
@@ -2927,7 +2932,7 @@ static void rtl_enable_exit_l1(struct rt
|
||||
case RTL_GIGA_MAC_VER_37 ... RTL_GIGA_MAC_VER_38:
|
||||
rtl_eri_set_bits(tp, 0xd4, 0x0c00);
|
||||
break;
|
||||
@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
|
||||
break;
|
||||
default:
|
||||
@@ -2914,7 +2919,7 @@ static void rtl_disable_exit_l1(struct r
|
||||
@@ -2941,7 +2946,7 @@ static void rtl_disable_exit_l1(struct r
|
||||
case RTL_GIGA_MAC_VER_34 ... RTL_GIGA_MAC_VER_38:
|
||||
rtl_eri_clear_bits(tp, 0xd4, 0x1f00);
|
||||
break;
|
||||
@ -131,7 +131,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
|
||||
break;
|
||||
default:
|
||||
@@ -2941,6 +2946,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2968,6 +2973,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
rtl_mod_config5(tp, 0, ASPM_en);
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_65:
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
val8 = RTL_R8(tp, INT_CFG0_8125) | INT_CFG0_CLKREQEN;
|
||||
RTL_W8(tp, INT_CFG0_8125, val8);
|
||||
break;
|
||||
@@ -2951,7 +2957,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2978,7 +2984,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
|
||||
@ -148,7 +148,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
/* reset ephy tx/rx disable timer */
|
||||
r8168_mac_ocp_modify(tp, 0xe094, 0xff00, 0);
|
||||
/* chip can trigger L1.2 */
|
||||
@@ -2963,7 +2969,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2990,7 +2996,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
} else {
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
|
||||
@ -157,7 +157,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xe092, 0x00ff, 0);
|
||||
break;
|
||||
default:
|
||||
@@ -2972,6 +2978,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
@@ -2999,6 +3005,7 @@ static void rtl_hw_aspm_clkreq_enable(st
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_65:
|
||||
@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
val8 = RTL_R8(tp, INT_CFG0_8125) & ~INT_CFG0_CLKREQEN;
|
||||
RTL_W8(tp, INT_CFG0_8125, val8);
|
||||
break;
|
||||
@@ -3691,10 +3698,12 @@ static void rtl_hw_start_8125_common(str
|
||||
@@ -3718,10 +3725,12 @@ static void rtl_hw_start_8125_common(str
|
||||
/* disable new tx descriptor format */
|
||||
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
|
||||
|
||||
@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0400);
|
||||
else if (tp->mac_version == RTL_GIGA_MAC_VER_63)
|
||||
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0200);
|
||||
@@ -3712,7 +3721,8 @@ static void rtl_hw_start_8125_common(str
|
||||
@@ -3739,7 +3748,8 @@ static void rtl_hw_start_8125_common(str
|
||||
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
|
||||
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
|
||||
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
|
||||
@ -190,7 +190,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
r8168_mac_ocp_modify(tp, 0xea1c, 0x0300, 0x0000);
|
||||
else
|
||||
r8168_mac_ocp_modify(tp, 0xea1c, 0x0004, 0x0000);
|
||||
@@ -3826,6 +3836,7 @@ static void rtl_hw_config(struct rtl8169
|
||||
@@ -3853,6 +3863,7 @@ static void rtl_hw_config(struct rtl8169
|
||||
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
|
||||
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
|
||||
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8126a,
|
||||
@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
};
|
||||
|
||||
if (hw_configs[tp->mac_version])
|
||||
@@ -3846,6 +3857,7 @@ static void rtl_hw_start_8125(struct rtl
|
||||
@@ -3873,6 +3884,7 @@ static void rtl_hw_start_8125(struct rtl
|
||||
break;
|
||||
case RTL_GIGA_MAC_VER_63:
|
||||
case RTL_GIGA_MAC_VER_65:
|
||||
@ -206,7 +206,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
for (i = 0xa00; i < 0xa80; i += 4)
|
||||
RTL_W32(tp, i, 0);
|
||||
RTL_W16(tp, INT_CFG1_8125, 0x0000);
|
||||
@@ -4074,7 +4086,7 @@ static void rtl8169_cleanup(struct rtl81
|
||||
@@ -4101,7 +4113,7 @@ static void rtl8169_cleanup(struct rtl81
|
||||
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
|
||||
rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666);
|
||||
break;
|
||||
@ -215,7 +215,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
rtl_enable_rxdvgate(tp);
|
||||
fsleep(2000);
|
||||
break;
|
||||
@@ -4225,7 +4237,7 @@ static unsigned int rtl_quirk_packet_pad
|
||||
@@ -4252,7 +4264,7 @@ static unsigned int rtl_quirk_packet_pad
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
padto = max_t(unsigned int, padto, ETH_ZLEN);
|
||||
break;
|
||||
default:
|
||||
@@ -5259,7 +5271,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
@@ -5286,7 +5298,7 @@ static void rtl_hw_initialize(struct rtl
|
||||
case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
|
||||
rtl_hw_init_8168g(tp);
|
||||
break;
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 8df9439389a44fb2cc4ef695e08d6a8870b1616c Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.i.king@gmail.com>
|
||||
Date: Mon, 9 Sep 2024 15:00:21 +0100
|
||||
Subject: [PATCH 44/47] r8169: Fix spelling mistake: "tx_underun" ->
|
||||
"tx_underrun"
|
||||
|
||||
There is a spelling mistake in the struct field tx_underun, rename
|
||||
it to tx_underrun.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Link: https://patch.msgid.link/20240909140021.64884-1-colin.i.king@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -578,7 +578,7 @@ struct rtl8169_counters {
|
||||
__le64 rx_broadcast;
|
||||
__le32 rx_multicast;
|
||||
__le16 tx_aborted;
|
||||
- __le16 tx_underun;
|
||||
+ __le16 tx_underrun;
|
||||
};
|
||||
|
||||
struct rtl8169_tc_offsets {
|
||||
@@ -1843,7 +1843,7 @@ static void rtl8169_get_ethtool_stats(st
|
||||
data[9] = le64_to_cpu(counters->rx_broadcast);
|
||||
data[10] = le32_to_cpu(counters->rx_multicast);
|
||||
data[11] = le16_to_cpu(counters->tx_aborted);
|
||||
- data[12] = le16_to_cpu(counters->tx_underun);
|
||||
+ data[12] = le16_to_cpu(counters->tx_underrun);
|
||||
}
|
||||
|
||||
static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
@ -1,56 +0,0 @@
|
||||
From ced8e8b8f40accfcce4a2bbd8b150aa76d5eff9a Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Tue, 17 Sep 2024 23:04:46 +0200
|
||||
Subject: [PATCH 46/47] r8169: add tally counter fields added with RTL8125
|
||||
|
||||
RTL8125 added fields to the tally counter, what may result in the chip
|
||||
dma'ing these new fields to unallocated memory. Therefore make sure
|
||||
that the allocated memory area is big enough to hold all of the
|
||||
tally counter values, even if we use only parts of it.
|
||||
|
||||
Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Link: https://patch.msgid.link/741d26a9-2b2b-485d-91d9-ecb302e345b5@gmail.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -579,6 +579,33 @@ struct rtl8169_counters {
|
||||
__le32 rx_multicast;
|
||||
__le16 tx_aborted;
|
||||
__le16 tx_underrun;
|
||||
+ /* new since RTL8125 */
|
||||
+ __le64 tx_octets;
|
||||
+ __le64 rx_octets;
|
||||
+ __le64 rx_multicast64;
|
||||
+ __le64 tx_unicast64;
|
||||
+ __le64 tx_broadcast64;
|
||||
+ __le64 tx_multicast64;
|
||||
+ __le32 tx_pause_on;
|
||||
+ __le32 tx_pause_off;
|
||||
+ __le32 tx_pause_all;
|
||||
+ __le32 tx_deferred;
|
||||
+ __le32 tx_late_collision;
|
||||
+ __le32 tx_all_collision;
|
||||
+ __le32 tx_aborted32;
|
||||
+ __le32 align_errors32;
|
||||
+ __le32 rx_frame_too_long;
|
||||
+ __le32 rx_runt;
|
||||
+ __le32 rx_pause_on;
|
||||
+ __le32 rx_pause_off;
|
||||
+ __le32 rx_pause_all;
|
||||
+ __le32 rx_unknown_opcode;
|
||||
+ __le32 rx_mac_error;
|
||||
+ __le32 tx_underrun32;
|
||||
+ __le32 rx_mac_missed;
|
||||
+ __le32 rx_tcam_dropped;
|
||||
+ __le32 tdu;
|
||||
+ __le32 rdu;
|
||||
};
|
||||
|
||||
struct rtl8169_tc_offsets {
|
@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10968,7 +10968,8 @@ void free_netdev(struct net_device *dev)
|
||||
@@ -10972,7 +10972,8 @@ void free_netdev(struct net_device *dev)
|
||||
dev->xdp_bulkq = NULL;
|
||||
|
||||
/* Compatibility with error handling in drivers */
|
||||
|
@ -4732,6 +4732,9 @@ CONFIG_PRINT_STACK_DEPTH=64
|
||||
# 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
|
||||
|
@ -45,7 +45,7 @@ Signe-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *skb, int thoff));
|
||||
--- a/net/core/gro.c
|
||||
+++ b/net/core/gro.c
|
||||
@@ -233,6 +233,33 @@ done:
|
||||
@@ -228,6 +228,33 @@ done:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ Signe-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4;
|
||||
--- a/net/ipv4/udp_offload.c
|
||||
+++ b/net/ipv4/udp_offload.c
|
||||
@@ -452,33 +452,6 @@ out:
|
||||
@@ -470,33 +470,6 @@ out:
|
||||
return segs;
|
||||
}
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
From: Willem de Bruijn <willemb@google.com>
|
||||
Date: Sun, 22 Sep 2024 11:03:45 -0400
|
||||
Subject: [PATCH] gso: fix gso fraglist segmentation after pull from
|
||||
frag_list
|
||||
|
||||
Detect gso fraglist skbs with corrupted geometry (see below) and
|
||||
pass these to skb_segment instead of skb_segment_list, as the first
|
||||
can segment them correctly.
|
||||
|
||||
Valid SKB_GSO_FRAGLIST skbs
|
||||
- consist of two or more segments
|
||||
- the head_skb holds the protocol headers plus first gso_size
|
||||
- one or more frag_list skbs hold exactly one segment
|
||||
- all but the last must be gso_size
|
||||
|
||||
Optional datapath hooks such as NAT and BPF (bpf_skb_pull_data) can
|
||||
modify these skbs, breaking these invariants.
|
||||
|
||||
In extreme cases they pull all data into skb linear. For UDP, this
|
||||
causes a NULL ptr deref in __udpv4_gso_segment_list_csum at
|
||||
udp_hdr(seg->next)->dest.
|
||||
|
||||
Detect invalid geometry due to pull, by checking head_skb size.
|
||||
Don't just drop, as this may blackhole a destination. Convert to be
|
||||
able to pass to regular skb_segment.
|
||||
|
||||
Link: https://lore.kernel.org/netdev/20240428142913.18666-1-shiming.cheng@mediatek.com/
|
||||
Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
|
||||
Signed-off-by: Willem de Bruijn <willemb@google.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
|
||||
--- a/net/ipv4/udp_offload.c
|
||||
+++ b/net/ipv4/udp_offload.c
|
||||
@@ -296,8 +296,16 @@ struct sk_buff *__udp_gso_segment(struct
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (skb_shinfo(gso_skb)->gso_type & SKB_GSO_FRAGLIST)
|
||||
- return __udp_gso_segment_list(gso_skb, features, is_ipv6);
|
||||
+ if (skb_shinfo(gso_skb)->gso_type & SKB_GSO_FRAGLIST) {
|
||||
+ /* Detect modified geometry and pass these to skb_segment. */
|
||||
+ if (skb_pagelen(gso_skb) - sizeof(*uh) == skb_shinfo(gso_skb)->gso_size)
|
||||
+ return __udp_gso_segment_list(gso_skb, features, is_ipv6);
|
||||
+
|
||||
+ /* Setup csum, as fraglist skips this in udp4_gro_receive. */
|
||||
+ gso_skb->csum_start = skb_transport_header(gso_skb) - gso_skb->head;
|
||||
+ gso_skb->csum_offset = offsetof(struct udphdr, check);
|
||||
+ gso_skb->ip_summed = CHECKSUM_PARTIAL;
|
||||
+ }
|
||||
|
||||
skb_pull(gso_skb, sizeof(*uh));
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -8333,7 +8333,7 @@ static int nft_register_flowtable_net_ho
|
||||
@@ -8376,7 +8376,7 @@ static int nft_register_flowtable_net_ho
|
||||
err = flowtable->data.type->setup(&flowtable->data,
|
||||
hook->ops.dev,
|
||||
FLOW_BLOCK_BIND);
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 45c0de18ff2dc9af01236380404bbd6a46502c69 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Date: Mon, 23 Sep 2024 23:49:49 +0200
|
||||
Subject: net: ethernet: lantiq_etop: fix memory disclosure
|
||||
|
||||
When applying padding, the buffer is not zeroed, which results in memory
|
||||
disclosure. The mentioned data is observed on the wire. This patch uses
|
||||
skb_put_padto() to pad Ethernet frames properly. The mentioned function
|
||||
zeroes the expanded buffer.
|
||||
|
||||
In case the packet cannot be padded it is silently dropped. Statistics
|
||||
are also not incremented. This driver does not support statistics in the
|
||||
old 32-bit format or the new 64-bit format. These will be added in the
|
||||
future. In its current form, the patch should be easily backported to
|
||||
stable versions.
|
||||
|
||||
Ethernet MACs on Amazon-SE and Danube cannot do padding of the packets
|
||||
in hardware, so software padding must be applied.
|
||||
|
||||
Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
|
||||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20240923214949.231511-2-olek2@wp.pl
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/ethernet/lantiq_etop.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/lantiq_etop.c
|
||||
+++ b/drivers/net/ethernet/lantiq_etop.c
|
||||
@@ -482,7 +482,9 @@ ltq_etop_tx(struct sk_buff *skb, struct
|
||||
unsigned long flags;
|
||||
u32 byte_offset;
|
||||
|
||||
- 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]) {
|
||||
netdev_err(dev, "tx ring full\n");
|
@ -37,7 +37,7 @@
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -2307,6 +2307,14 @@ config CMDLINE_FORCE
|
||||
@@ -2308,6 +2308,14 @@ config CMDLINE_FORCE
|
||||
|
||||
endchoice
|
||||
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
|
||||
|
||||
--- a/arch/riscv/Kconfig
|
||||
+++ b/arch/riscv/Kconfig
|
||||
@@ -897,6 +897,14 @@ config PORTABLE
|
||||
@@ -901,6 +901,14 @@ config PORTABLE
|
||||
select MMU
|
||||
select OF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user