kernel: bump 6.12 to 6.12.31

This commit is contained in:
coolsnowwolf 2025-06-02 20:17:38 +08:00
parent 8ba3cb910e
commit dd7b87ae99
45 changed files with 113 additions and 327 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.12 = .30
LINUX_KERNEL_HASH-6.12.30 = df046a48971e40ce0b2e003e7e55b6b1e7da2912120eb216d5d6c8450c9cf82e
LINUX_VERSION-6.12 = .31
LINUX_KERNEL_HASH-6.12.31 = b04c5b3e5df6e0aa5e9cd1efe527fac99f9dd39a43b97f13b22f8ca93e524ba7

View File

@ -19,7 +19,7 @@ Signed-off-by: Jens Axboe <axboe@kernel.dk>
--- a/block/blk.h
+++ b/block/blk.h
@@ -555,6 +555,7 @@ void blk_free_ext_minor(unsigned int min
@@ -556,6 +556,7 @@ void blk_free_ext_minor(unsigned int min
#define ADDPART_FLAG_NONE 0
#define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2

View File

@ -546,7 +546,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
--- a/drivers/net/phy/nxp-c45-tja11xx.c
+++ b/drivers/net/phy/nxp-c45-tja11xx.c
@@ -2052,7 +2052,7 @@ static struct phy_driver nxp_c45_driver[
@@ -2102,7 +2102,7 @@ static struct phy_driver nxp_c45_driver[
module_phy_driver(nxp_c45_driver);

View File

@ -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
@@ -4777,11 +4777,7 @@ static void r8169_phylink_handler(struct
@@ -4804,11 +4804,7 @@ static void r8169_phylink_handler(struct
if (netif_carrier_ok(ndev)) {
rtl_link_chg_patch(tp);
pm_request_resume(d);

View File

@ -20,7 +20,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
@@ -5489,11 +5489,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5517,11 +5517,6 @@ static int rtl_init_one(struct pci_dev *
dev->features |= dev->hw_features;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rtl_chip_supports_csum_v2(tp)) {
dev->hw_features |= NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6;
netif_set_tso_max_size(dev, RTL_GSO_MAX_SIZE_V2);
@@ -5504,6 +5499,17 @@ static int rtl_init_one(struct pci_dev *
@@ -5532,6 +5527,17 @@ static int rtl_init_one(struct pci_dev *
netif_set_tso_max_segs(dev, RTL_GSO_MAX_SEGS_V1);
}

View File

@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
@@ -3893,6 +3972,9 @@ static void rtl_hw_start_8125(struct rtl
@@ -3920,6 +3999,9 @@ static void rtl_hw_start_8125(struct rtl
break;
}

View File

@ -18,7 +18,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4800,10 +4800,8 @@ static void rtl_task(struct work_struct
@@ -4827,10 +4827,8 @@ static void rtl_task(struct work_struct
container_of(work, struct rtl8169_private, wk.work);
int ret;
@ -30,7 +30,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
if (test_and_clear_bit(RTL_FLAG_TASK_TX_TIMEOUT, tp->wk.flags)) {
/* if chip isn't accessible, reset bus to revive it */
@@ -4812,7 +4810,7 @@ static void rtl_task(struct work_struct
@@ -4839,7 +4837,7 @@ static void rtl_task(struct work_struct
if (ret < 0) {
netdev_err(tp->dev, "Can't reset secondary PCI bus, detach NIC\n");
netif_device_detach(tp->dev);
@ -39,7 +39,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
}
}
@@ -4831,8 +4829,6 @@ reset:
@@ -4858,8 +4856,6 @@ reset:
} else if (test_and_clear_bit(RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE, tp->wk.flags)) {
rtl_reset_work(tp);
}

View File

@ -39,7 +39,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
}
static void rtl8169_init_phy(struct rtl8169_private *tp)
@@ -4800,9 +4797,6 @@ static void rtl_task(struct work_struct
@@ -4827,9 +4824,6 @@ static void rtl_task(struct work_struct
container_of(work, struct rtl8169_private, wk.work);
int ret;
@ -49,7 +49,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
if (test_and_clear_bit(RTL_FLAG_TASK_TX_TIMEOUT, tp->wk.flags)) {
/* if chip isn't accessible, reset bus to revive it */
if (RTL_R32(tp, TxConfig) == ~0) {
@@ -4886,6 +4880,7 @@ static int r8169_phy_connect(struct rtl8
@@ -4913,6 +4907,7 @@ static int r8169_phy_connect(struct rtl8
static void rtl8169_down(struct rtl8169_private *tp)
{
@ -57,7 +57,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
/* Clear all task flags */
bitmap_zero(tp->wk.flags, RTL_FLAG_MAX);
@@ -4914,7 +4909,7 @@ static void rtl8169_up(struct rtl8169_pr
@@ -4941,7 +4936,7 @@ static void rtl8169_up(struct rtl8169_pr
phy_resume(tp->phydev);
rtl8169_init_phy(tp);
napi_enable(&tp->napi);
@ -66,7 +66,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
rtl_reset_work(tp);
phy_start(tp->phydev);
@@ -4931,8 +4926,6 @@ static int rtl8169_close(struct net_devi
@@ -4958,8 +4953,6 @@ static int rtl8169_close(struct net_devi
rtl8169_down(tp);
rtl8169_rx_clear(tp);
@ -75,7 +75,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
free_irq(tp->irq, tp);
phy_disconnect(tp->phydev);
@@ -5165,7 +5158,7 @@ static void rtl_remove_one(struct pci_de
@@ -5192,7 +5185,7 @@ static void rtl_remove_one(struct pci_de
if (pci_dev_run_wake(pdev))
pm_runtime_get_noresume(&pdev->dev);
@ -84,7 +84,7 @@ Signed-off-by: Andrew Lunn <andrew@lunn.ch>
if (IS_ENABLED(CONFIG_R8169_LEDS))
r8169_remove_leds(tp->leds);
@@ -5542,6 +5535,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5570,6 +5563,7 @@ static int rtl_init_one(struct pci_dev *
tp->irq = pci_irq_vector(pdev, 0);
INIT_WORK(&tp->wk.work, rtl_task);

View File

@ -86,7 +86,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;
@@ -3871,6 +3872,12 @@ static void rtl_hw_start_8125b(struct rt
@@ -3897,6 +3898,12 @@ static void rtl_hw_start_8125b(struct rt
rtl_hw_start_8125_common(tp);
}
@ -98,8 +98,8 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+
static void rtl_hw_start_8126a(struct rtl8169_private *tp)
{
rtl_set_def_aspm_entry_latency(tp);
@@ -3919,6 +3926,7 @@ static void rtl_hw_config(struct rtl8169
rtl_disable_zrxdc_timeout(tp);
@@ -3946,6 +3953,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,
@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8126a,
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8126a,
};
@@ -3936,6 +3944,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3963,6 +3971,7 @@ static void rtl_hw_start_8125(struct rtl
/* disable interrupt coalescing */
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_61:

View File

@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
EEE_TXIDLE_TIMER_8125 = 0x6048,
};
@@ -3765,8 +3767,8 @@ static void rtl_hw_start_8125_common(str
@@ -3791,8 +3793,8 @@ static void rtl_hw_start_8125_common(str
rtl_pcie_state_l2l3_disable(tp);
RTL_W16(tp, 0x382, 0x221b);

View File

@ -102,7 +102,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
@@ -5451,8 +5428,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5479,8 +5456,6 @@ static int rtl_init_one(struct pci_dev *
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
tp->ocp_base = OCP_STD_PHY_BASE;

View File

@ -22,7 +22,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
@@ -5227,6 +5227,11 @@ static int r8169_mdio_register(struct rt
@@ -5255,6 +5255,11 @@ static int r8169_mdio_register(struct rt
phy_support_eee(tp->phydev);
phy_support_asym_pause(tp->phydev);

View File

@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
RTL_FLAG_TASK_TX_TIMEOUT,
RTL_FLAG_MAX
};
@@ -4722,8 +4721,6 @@ static void rtl_task(struct work_struct
@@ -4749,8 +4748,6 @@ static void rtl_task(struct work_struct
reset:
rtl_reset_work(tp);
netif_wake_queue(tp->dev);

View File

@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
*/
@@ -3802,7 +3801,6 @@ static void rtl_hw_config(struct rtl8169
@@ -3829,7 +3828,6 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_08] = rtl_hw_start_8102e_3,
[RTL_GIGA_MAC_VER_09] = rtl_hw_start_8102e_2,
[RTL_GIGA_MAC_VER_10] = NULL,
@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_14] = rtl_hw_start_8401,
[RTL_GIGA_MAC_VER_17] = rtl_hw_start_8168b,
[RTL_GIGA_MAC_VER_18] = rtl_hw_start_8168cp_1,
@@ -4678,12 +4676,6 @@ static irqreturn_t rtl8169_interrupt(int
@@ -4705,12 +4703,6 @@ static irqreturn_t rtl8169_interrupt(int
if (status & LinkChg)
phy_mac_interrupt(tp->phydev);
@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_irq_disable(tp);
napi_schedule(&tp->napi);
out:
@@ -5099,9 +5091,6 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5126,9 +5118,6 @@ static void rtl_set_irq_mask(struct rtl8
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
tp->irq_mask |= SYSErr | RxFIFOOver;
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static int rtl_alloc_irq(struct rtl8169_private *tp)
@@ -5295,7 +5284,6 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5323,7 +5312,6 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
return JUMBO_7K;
/* RTL8168b */

View File

@ -107,7 +107,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 +2900,7 @@ static void rtl_enable_exit_l1(struct rt
@@ -2926,7 +2926,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;
@ -116,7 +116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
break;
default:
@@ -2914,7 +2914,7 @@ static void rtl_disable_exit_l1(struct r
@@ -2940,7 +2940,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;
@ -125,7 +125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
break;
default:
@@ -2940,8 +2940,8 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2966,8 +2966,8 @@ static void rtl_hw_aspm_clkreq_enable(st
rtl_mod_config5(tp, 0, ASPM_en);
switch (tp->mac_version) {
@ -136,7 +136,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;
@@ -2952,7 +2952,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2978,7 +2978,7 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
@ -145,7 +145,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 */
@@ -2964,7 +2964,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2990,7 +2990,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:
@ -154,7 +154,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe092, 0x00ff, 0);
break;
default:
@@ -2972,8 +2972,8 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2998,8 +2998,8 @@ static void rtl_hw_aspm_clkreq_enable(st
}
switch (tp->mac_version) {
@ -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;
@@ -3693,12 +3693,12 @@ static void rtl_hw_start_8125_common(str
@@ -3719,12 +3719,12 @@ static void rtl_hw_start_8125_common(str
/* disable new tx descriptor format */
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
@ -182,7 +182,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);
@@ -3716,8 +3716,8 @@ static void rtl_hw_start_8125_common(str
@@ -3742,8 +3742,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);
@ -193,7 +193,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);
@@ -3836,8 +3836,8 @@ static void rtl_hw_config(struct rtl8169
@@ -3863,8 +3863,8 @@ 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_64] = rtl_hw_start_8125d,
@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
if (hw_configs[tp->mac_version])
@@ -3858,8 +3858,8 @@ static void rtl_hw_start_8125(struct rtl
@@ -3885,8 +3885,8 @@ static void rtl_hw_start_8125(struct rtl
RTL_W32(tp, i, 0);
break;
case RTL_GIGA_MAC_VER_63:
@ -215,7 +215,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);
@@ -4091,7 +4091,7 @@ static void rtl8169_cleanup(struct rtl81
@@ -4118,7 +4118,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;
@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_enable_rxdvgate(tp);
fsleep(2000);
break;
@@ -4248,7 +4248,7 @@ static unsigned int rtl_quirk_packet_pad
@@ -4275,7 +4275,7 @@ static unsigned int rtl_quirk_packet_pad
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_34:
@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5265,7 +5265,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5293,7 +5293,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;

View File

@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{ 0x7cf, 0x688, RTL_GIGA_MAC_VER_64 },
/* 8125B family. */
@@ -3836,6 +3840,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3863,6 +3867,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_64] = rtl_hw_start_8125d,
@ -70,7 +70,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_70] = rtl_hw_start_8126a,
[RTL_GIGA_MAC_VER_71] = rtl_hw_start_8126a,
};
@@ -3854,6 +3859,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3881,6 +3886,7 @@ static void rtl_hw_start_8125(struct rtl
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_61:
case RTL_GIGA_MAC_VER_64:

View File

@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* 8125D family. */
{ 0x7cf, 0x689, RTL_GIGA_MAC_VER_65 },
{ 0x7cf, 0x688, RTL_GIGA_MAC_VER_64 },
@@ -3841,6 +3869,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3868,6 +3896,7 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
[RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8125d,
@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[RTL_GIGA_MAC_VER_70] = rtl_hw_start_8126a,
[RTL_GIGA_MAC_VER_71] = rtl_hw_start_8126a,
};
@@ -3860,6 +3889,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3887,6 +3916,7 @@ static void rtl_hw_start_8125(struct rtl
case RTL_GIGA_MAC_VER_61:
case RTL_GIGA_MAC_VER_64:
case RTL_GIGA_MAC_VER_65:

View File

@ -1,26 +0,0 @@
From faac69a4ae5abb49e62c79c66b51bb905c9aa5ec Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 4 Feb 2025 07:58:17 +0100
Subject: [PATCH] r8169: don't scan PHY addresses > 0
The PHY address is a dummy, because r8169 PHY access registers
don't support a PHY address. Therefore scan address 0 only.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/830637dd-4016-4a68-92b3-618fcac6589d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/realtek/r8169_main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5222,6 +5222,7 @@ static int r8169_mdio_register(struct rt
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_MAC_INTERRUPT;
+ new_bus->phy_mask = GENMASK(31, 1);
snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x",
pci_domain_nr(pdev->bus), pci_dev_id(pdev));

View File

@ -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
@@ -5200,6 +5200,33 @@ static int r8169_mdio_write_reg(struct m
@@ -5227,6 +5227,33 @@ static int r8169_mdio_write_reg(struct m
return 0;
}
@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int r8169_mdio_register(struct rtl8169_private *tp)
{
struct pci_dev *pdev = tp->pci_dev;
@@ -5230,6 +5257,11 @@ static int r8169_mdio_register(struct rt
@@ -5257,6 +5284,11 @@ static int r8169_mdio_register(struct rt
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;

View File

@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct {
const char *name;
@@ -5359,6 +5360,9 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5386,6 +5387,9 @@ static int rtl_jumbo_max(struct rtl8169_
/* RTL8168c */
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;

View File

@ -17,7 +17,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
@@ -5446,11 +5446,10 @@ static int rtl_init_one(struct pci_dev *
@@ -5473,11 +5473,10 @@ static int rtl_init_one(struct pci_dev *
if (region < 0)
return dev_err_probe(&pdev->dev, -ENODEV, "no MMIO resource found\n");

View File

@ -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
@@ -5397,7 +5397,7 @@ done:
@@ -5424,7 +5424,7 @@ done:
/* register is set if system vendor successfully tested ASPM 1.2 */
static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
{

View File

@ -1,60 +0,0 @@
From b48688ea3c9ac8d5d910c6e91fb7f80d846581f0 Mon Sep 17 00:00:00 2001
From: ChunHao Lin <hau@realtek.com>
Date: Tue, 18 Mar 2025 16:37:21 +0800
Subject: [PATCH] r8169: disable RTL8126 ZRX-DC timeout
Disable it due to it dose not meet ZRX-DC specification. If it is enabled,
device will exit L1 substate every 100ms. Disable it for saving more power
in L1 substate.
Signed-off-by: ChunHao Lin <hau@realtek.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/20250318083721.4127-3-hau@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
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
@@ -2852,6 +2852,32 @@ static u32 rtl_csi_read(struct rtl8169_p
RTL_R32(tp, CSIDR) : ~0;
}
+static void rtl_disable_zrxdc_timeout(struct rtl8169_private *tp)
+{
+ struct pci_dev *pdev = tp->pci_dev;
+ u32 csi;
+ int rc;
+ u8 val;
+
+#define RTL_GEN3_RELATED_OFF 0x0890
+#define RTL_GEN3_ZRXDC_NONCOMPL 0x1
+ if (pdev->cfg_size > RTL_GEN3_RELATED_OFF) {
+ rc = pci_read_config_byte(pdev, RTL_GEN3_RELATED_OFF, &val);
+ if (rc == PCIBIOS_SUCCESSFUL) {
+ val &= ~RTL_GEN3_ZRXDC_NONCOMPL;
+ rc = pci_write_config_byte(pdev, RTL_GEN3_RELATED_OFF,
+ val);
+ if (rc == PCIBIOS_SUCCESSFUL)
+ return;
+ }
+ }
+
+ netdev_notice_once(tp->dev,
+ "No native access to PCI extended config space, falling back to CSI\n");
+ csi = rtl_csi_read(tp, RTL_GEN3_RELATED_OFF);
+ rtl_csi_write(tp, RTL_GEN3_RELATED_OFF, csi & ~RTL_GEN3_ZRXDC_NONCOMPL);
+}
+
static void rtl_set_aspm_entry_latency(struct rtl8169_private *tp, u8 val)
{
struct pci_dev *pdev = tp->pci_dev;
@@ -3824,6 +3850,7 @@ static void rtl_hw_start_8125d(struct rt
static void rtl_hw_start_8126a(struct rtl8169_private *tp)
{
+ rtl_disable_zrxdc_timeout(tp);
rtl_set_def_aspm_entry_latency(tp);
rtl_hw_start_8125_common(tp);
}

View File

@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -1063,7 +1063,7 @@ static void page_pool_release_retry(stru
@@ -1064,7 +1064,7 @@ static void page_pool_release_retry(stru
struct delayed_work *dwq = to_delayed_work(wq);
struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw);
void *netdev;
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
inflight = page_pool_release(pool);
/* In rare cases, a driver bug may cause inflight to go negative.
@@ -1075,6 +1075,17 @@ static void page_pool_release_retry(stru
@@ -1076,6 +1076,17 @@ static void page_pool_release_retry(stru
if (inflight <= 0)
return;

View File

@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe)
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -5051,6 +5051,8 @@ static int __init proc_vmalloc_init(void
@@ -5054,6 +5054,8 @@ static int __init proc_vmalloc_init(void
{
void *priv_data = NULL;
@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -3037,11 +3037,13 @@ static const struct seq_operations fib_r
@@ -3015,11 +3015,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net)
{
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL))
goto out2;
@@ -3052,17 +3054,21 @@ int __net_init fib_proc_init(struct net
@@ -3030,17 +3032,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3:

View File

@ -1,6 +1,6 @@
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -71,6 +71,9 @@ void brioctl_set(int (*hook)(struct net
@@ -72,6 +72,9 @@ void brioctl_set(int (*hook)(struct net
int br_ioctl_call(struct net *net, struct net_bridge *br, unsigned int cmd,
struct ifreq *ifr, void __user *uarg);
@ -35,7 +35,7 @@
const struct nf_ct_event_notifier *nb);
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -512,6 +512,9 @@ config FAILOVER
@@ -521,6 +521,9 @@ config FAILOVER
migration of VMs with direct attached VFs by failing over to the
paravirtual datapath when the VF is unplugged.
@ -95,9 +95,9 @@
+ }
+#endif
len = skb->len;
trace_net_dev_start_xmit(skb, dev);
@@ -5488,6 +5496,11 @@ void netdev_rx_handler_unregister(struct
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb)))
@@ -5493,6 +5501,11 @@ void netdev_rx_handler_unregister(struct
}
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);
@ -109,7 +109,7 @@
/*
* Limit the use of PFMEMALLOC reserves to those protocols that implement
* the special handling of PFMEMALLOC skbs.
@@ -5536,6 +5549,10 @@ static int __netif_receive_skb_core(stru
@@ -5541,6 +5554,10 @@ static int __netif_receive_skb_core(stru
int ret = NET_RX_DROP;
__be16 type;
@ -120,7 +120,7 @@
net_timestamp_check(!READ_ONCE(net_hotdata.tstamp_prequeue), skb);
trace_netif_receive_skb(skb);
@@ -5574,6 +5591,15 @@ another_round:
@@ -5579,6 +5596,15 @@ another_round:
goto out;
}

View File

@ -44,7 +44,7 @@
#endif /* _LINUX_U64_STATS_SYNC_H */
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3002,6 +3002,8 @@ int call_netdevice_notifiers(unsigned lo
@@ -3016,6 +3016,8 @@ int call_netdevice_notifiers(unsigned lo
int call_netdevice_notifiers_info(unsigned long val,
struct netdev_notifier_info *info);

View File

@ -46,7 +46,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -628,6 +628,7 @@ enum nf_ct_sysctl_index {
@@ -630,6 +630,7 @@ enum nf_ct_sysctl_index {
#endif
NF_SYSCTL_CT_PROTO_TCP_LOOSE,
NF_SYSCTL_CT_PROTO_TCP_LIBERAL,
@ -54,7 +54,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST,
NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS,
NF_SYSCTL_CT_PROTO_TIMEOUT_UDP,
@@ -830,6 +831,14 @@ static struct ctl_table nf_ct_sysctl_tab
@@ -836,6 +837,14 @@ static struct ctl_table nf_ct_sysctl_tab
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
@ -69,7 +69,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
[NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST] = {
.procname = "nf_conntrack_tcp_ignore_invalid_rst",
.maxlen = sizeof(u8),
@@ -1029,6 +1038,7 @@ static void nf_conntrack_standalone_init
@@ -1037,6 +1046,7 @@ static void nf_conntrack_standalone_init
XASSIGN(LOOSE, &tn->tcp_loose);
XASSIGN(LIBERAL, &tn->tcp_be_liberal);

View File

@ -424,7 +424,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d
@@ -2084,6 +2303,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@ -437,7 +437,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str
@@ -2113,6 +2338,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
@ -462,7 +462,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2120,6 +2363,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b
@@ -2129,9 +2375,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@ -501,7 +501,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p
@@ -2171,6 +2435,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },

View File

@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2784,6 +2784,7 @@ static const char *const rtn_type_names[
@@ -2762,6 +2762,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW",
[RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE",

View File

@ -33,7 +33,7 @@ string.
#include <linux/init.h>
#include <linux/kref.h>
#include <linux/module.h>
@@ -797,6 +800,62 @@ static int nvmem_validate_keepouts(struc
@@ -811,6 +814,62 @@ static int nvmem_validate_keepouts(struc
return 0;
}
@ -96,7 +96,7 @@ string.
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
{
struct device *dev = &nvmem->dev;
@@ -836,6 +895,25 @@ static int nvmem_add_cells_from_dt(struc
@@ -852,6 +911,25 @@ static int nvmem_add_cells_from_dt(struc
if (nvmem->fixup_dt_cell_info)
nvmem->fixup_dt_cell_info(nvmem, &info);

View File

@ -38,7 +38,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
#include <linux/init.h>
#include <linux/kref.h>
#include <linux/module.h>
@@ -800,62 +797,6 @@ static int nvmem_validate_keepouts(struc
@@ -814,62 +811,6 @@ static int nvmem_validate_keepouts(struc
return 0;
}
@ -101,7 +101,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
{
struct device *dev = &nvmem->dev;
@@ -895,24 +836,8 @@ static int nvmem_add_cells_from_dt(struc
@@ -911,24 +852,8 @@ static int nvmem_add_cells_from_dt(struc
if (nvmem->fixup_dt_cell_info)
nvmem->fixup_dt_cell_info(nvmem, &info);

View File

@ -171,7 +171,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -351,6 +351,40 @@ struct spi_driver {
@@ -348,6 +348,40 @@ struct spi_driver {
struct device_driver driver;
};
@ -212,7 +212,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
#define to_spi_driver(__drv) \
( __drv ? container_of_const(__drv, struct spi_driver, driver) : NULL )
@@ -757,6 +791,11 @@ struct spi_controller {
@@ -754,6 +788,11 @@ struct spi_controller {
void *dummy_rx;
void *dummy_tx;
@ -224,7 +224,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs);
/*
@@ -1660,6 +1699,9 @@ spi_register_board_info(struct spi_board
@@ -1657,6 +1696,9 @@ spi_register_board_info(struct spi_board
{ return 0; }
#endif

View File

@ -16,7 +16,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
--- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
+++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
@@ -1537,6 +1537,43 @@ static const char * const rk_udphy_rst_l
@@ -1556,6 +1556,43 @@ static const char * const rk_udphy_rst_l
"init", "cmn", "lane", "pcs_apb", "pma_apb"
};
@ -60,7 +60,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
static const struct rk_udphy_cfg rk3588_udphy_cfgs = {
.num_phys = 2,
.phy_ids = {
@@ -1584,6 +1621,10 @@ static const struct rk_udphy_cfg rk3588_
@@ -1603,6 +1640,10 @@ static const struct rk_udphy_cfg rk3588_
static const struct of_device_id rk_udphy_dt_match[] = {
{

View File

@ -17,7 +17,7 @@ Subject: [PATCH] r8169: add LED configuration from OF
#include <linux/if_vlan.h>
#include <linux/in.h>
#include <linux/io.h>
@@ -175,6 +176,7 @@ enum rtl_registers {
@@ -241,6 +242,7 @@ enum rtl_registers {
MAR0 = 8, /* Multicast filter. */
CounterAddrLow = 0x10,
CounterAddrHigh = 0x14,
@ -25,7 +25,7 @@ Subject: [PATCH] r8169: add LED configuration from OF
TxDescStartAddrLow = 0x20,
TxDescStartAddrHigh = 0x24,
TxHDescStartAddrLow = 0x28,
@@ -5371,6 +5373,22 @@ static bool rtl_aspm_is_safe(struct rtl8
@@ -5378,6 +5380,22 @@ static bool rtl_aspm_is_safe(struct rtl8
return false;
}
@ -47,8 +47,8 @@ Subject: [PATCH] r8169: add LED configuration from OF
+
static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct rtl8169_private *tp;
@@ -5539,6 +5557,7 @@ static int rtl_init_one(struct pci_dev *
const struct rtl_chip_info *chip;
@@ -5549,6 +5567,7 @@ static int rtl_init_one(struct pci_dev *
if (!tp->counters)
return -ENOMEM;

View File

@ -32,7 +32,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
void (*set_rgmii_speed)(struct rk_priv_data *bsp_priv, int speed);
void (*set_rmii_speed)(struct rk_priv_data *bsp_priv, int speed);
void (*set_clock_selection)(struct rk_priv_data *bsp_priv, bool input,
@@ -38,7 +41,7 @@ struct rk_gmac_ops {
@@ -39,7 +42,7 @@ struct rk_gmac_ops {
};
static const char * const rk_clocks[] = {
@ -41,7 +41,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
};
static const char * const rk_rmii_clocks[] = {
@@ -48,6 +51,7 @@ static const char * const rk_rmii_clocks
@@ -49,6 +52,7 @@ static const char * const rk_rmii_clocks
enum rk_clocks_index {
RK_ACLK_MAC = 0,
RK_PCLK_MAC,
@ -49,7 +49,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
RK_MAC_CLK_TX,
RK_CLK_MAC_SPEED,
RK_MAC_CLK_RX,
@@ -79,6 +83,7 @@ struct rk_priv_data {
@@ -80,6 +84,7 @@ struct rk_priv_data {
struct regmap *grf;
struct regmap *php_grf;
@ -57,7 +57,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
};
#define HIWORD_UPDATE(val, mask, shift) \
@@ -91,6 +96,128 @@ struct rk_priv_data {
@@ -92,6 +97,128 @@ struct rk_priv_data {
(((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE : soc##_GMAC_TXCLK_DLY_DISABLE) | \
((rx) ? soc##_GMAC_RXCLK_DLY_ENABLE : soc##_GMAC_RXCLK_DLY_DISABLE))
@ -186,7 +186,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
#define PX30_GRF_GMAC_CON1 0x0904
/* PX30_GRF_GMAC_CON1 */
@@ -1019,6 +1146,7 @@ static const struct rk_gmac_ops rk3399_o
@@ -1020,6 +1147,7 @@ static const struct rk_gmac_ops rk3399_o
#define RK3568_GRF_GMAC1_CON1 0x038c
/* RK3568_GRF_GMAC0_CON1 && RK3568_GRF_GMAC1_CON1 */
@ -194,7 +194,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
#define RK3568_GMAC_PHY_INTF_SEL_RGMII \
(GRF_BIT(4) | GRF_CLR_BIT(5) | GRF_CLR_BIT(6))
#define RK3568_GMAC_PHY_INTF_SEL_RMII \
@@ -1034,6 +1162,46 @@ static const struct rk_gmac_ops rk3399_o
@@ -1035,6 +1163,46 @@ static const struct rk_gmac_ops rk3399_o
#define RK3568_GMAC_CLK_RX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 8)
#define RK3568_GMAC_CLK_TX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 0)
@ -241,7 +241,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
static void rk3568_set_to_rgmii(struct rk_priv_data *bsp_priv,
int tx_delay, int rx_delay)
{
@@ -1106,6 +1274,8 @@ static void rk3568_set_gmac_speed(struct
@@ -1107,6 +1275,8 @@ static void rk3568_set_gmac_speed(struct
static const struct rk_gmac_ops rk3568_ops = {
.set_to_rgmii = rk3568_set_to_rgmii,
.set_to_rmii = rk3568_set_to_rmii,
@ -250,7 +250,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
.set_rgmii_speed = rk3568_set_gmac_speed,
.set_rmii_speed = rk3568_set_gmac_speed,
.regs_valid = true,
@@ -1733,7 +1903,7 @@ static int gmac_clk_enable(struct rk_pri
@@ -1736,7 +1906,7 @@ static int gmac_clk_enable(struct rk_pri
return 0;
}
@ -259,10 +259,10 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
{
struct regulator *ldo = bsp_priv->regulator;
int ret;
@@ -1832,6 +2002,18 @@ static struct rk_priv_data *rk_gmac_setu
"rockchip,grf");
bsp_priv->php_grf = syscon_regmap_lookup_by_phandle(dev->of_node,
"rockchip,php-grf");
@@ -1850,6 +2020,19 @@ static struct rk_priv_data *rk_gmac_setu
}
}
+ bsp_priv->xpcs = syscon_regmap_lookup_by_phandle(dev->of_node,
+ "rockchip,xpcs");
+ if (!IS_ERR(bsp_priv->xpcs)) {
@ -275,10 +275,11 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
+ if (ret)
+ dev_err(dev, "phy_init error\n");
+ }
+
if (plat->phy_node) {
bsp_priv->integrated_phy = of_property_read_bool(plat->phy_node,
@@ -1909,11 +2091,19 @@ static int rk_gmac_powerup(struct rk_pri
"phy-is-integrated");
@@ -1926,11 +2109,19 @@ static int rk_gmac_powerup(struct rk_pri
dev_info(dev, "init for RMII\n");
bsp_priv->ops->set_to_rmii(bsp_priv);
break;
@ -299,7 +300,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
if (ret) {
gmac_clk_enable(bsp_priv, false);
return ret;
@@ -1934,7 +2124,7 @@ static void rk_gmac_powerdown(struct rk_
@@ -1951,7 +2142,7 @@ static void rk_gmac_powerdown(struct rk_
pm_runtime_put_sync(&gmac->pdev->dev);
@ -308,7 +309,7 @@ Signed-off-by: David Wu <david.wu@rock-chips.com>
gmac_clk_enable(gmac, false);
}
@@ -1955,6 +2145,9 @@ static void rk_fix_speed(void *priv, uns
@@ -1972,6 +2163,9 @@ static void rk_fix_speed(void *priv, uns
if (bsp_priv->ops->set_rmii_speed)
bsp_priv->ops->set_rmii_speed(bsp_priv, speed);
break;

View File

@ -15,7 +15,7 @@ Change-Id: I8a69a1239ed3ae91bfe44c96287210da758f9cf9
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1140,6 +1140,201 @@ static const struct rk_gmac_ops rk3399_o
@@ -1141,6 +1141,201 @@ static const struct rk_gmac_ops rk3399_o
.set_rmii_speed = rk3399_set_rmii_speed,
};
@ -217,7 +217,7 @@ Change-Id: I8a69a1239ed3ae91bfe44c96287210da758f9cf9
#define RK3568_GRF_GMAC0_CON0 0x0380
#define RK3568_GRF_GMAC0_CON1 0x0384
#define RK3568_GRF_GMAC1_CON0 0x0388
@@ -2255,6 +2450,7 @@ static const struct of_device_id rk_gmac
@@ -2273,6 +2468,7 @@ static const struct of_device_id rk_gmac
{ .compatible = "rockchip,rk3366-gmac", .data = &rk3366_ops },
{ .compatible = "rockchip,rk3368-gmac", .data = &rk3368_ops },
{ .compatible = "rockchip,rk3399-gmac", .data = &rk3399_ops },

View File

@ -15,7 +15,7 @@ Changes in v2: None
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4039,7 +4039,7 @@ static int ufshcd_dme_link_startup(struc
@@ -4040,7 +4040,7 @@ static int ufshcd_dme_link_startup(struc
*
* Return: 0 on success, non-zero value on failure.
*/
@ -24,7 +24,7 @@ Changes in v2: None
{
struct uic_command uic_cmd = {
.command = UIC_CMD_DME_RESET,
@@ -4053,6 +4053,7 @@ static int ufshcd_dme_reset(struct ufs_h
@@ -4054,6 +4054,7 @@ static int ufshcd_dme_reset(struct ufs_h
return ret;
}
@ -32,7 +32,7 @@ Changes in v2: None
int ufshcd_dme_configure_adapt(struct ufs_hba *hba,
int agreed_gear,
@@ -4078,7 +4079,7 @@ EXPORT_SYMBOL_GPL(ufshcd_dme_configure_a
@@ -4079,7 +4080,7 @@ EXPORT_SYMBOL_GPL(ufshcd_dme_configure_a
*
* Return: 0 on success, non-zero value on failure.
*/
@ -41,7 +41,7 @@ Changes in v2: None
{
struct uic_command uic_cmd = {
.command = UIC_CMD_DME_ENABLE,
@@ -4092,6 +4093,7 @@ static int ufshcd_dme_enable(struct ufs_
@@ -4093,6 +4094,7 @@ static int ufshcd_dme_enable(struct ufs_
return ret;
}

View File

@ -1,48 +0,0 @@
The RK3588 has an offset into the OTP area where the readable area begins
and automatically adds this to the start address.
Other variants are very much similar to rk3588, just with a different
offset, so move that value into variant-data.
To match the size in bytes, store this value also in bytes and not in
number of blocks.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/nvmem/rockchip-otp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -59,7 +59,6 @@
#define RK3588_OTPC_AUTO_EN 0x08
#define RK3588_OTPC_INT_ST 0x84
#define RK3588_OTPC_DOUT0 0x20
-#define RK3588_NO_SECURE_OFFSET 0x300
#define RK3588_NBYTES 4
#define RK3588_BURST_NUM 1
#define RK3588_BURST_SHIFT 8
@@ -69,6 +68,7 @@
struct rockchip_data {
int size;
+ int read_offset;
const char * const *clks;
int num_clks;
nvmem_reg_read_t reg_read;
@@ -196,7 +196,7 @@ static int rk3588_otp_read(void *context
addr_start = round_down(offset, RK3588_NBYTES) / RK3588_NBYTES;
addr_end = round_up(offset + bytes, RK3588_NBYTES) / RK3588_NBYTES;
addr_len = addr_end - addr_start;
- addr_start += RK3588_NO_SECURE_OFFSET;
+ addr_start += otp->data->read_offset / RK3588_NBYTES;
buf = kzalloc(array_size(addr_len, RK3588_NBYTES), GFP_KERNEL);
if (!buf)
@@ -280,6 +280,7 @@ static const char * const rk3588_otp_clo
static const struct rockchip_data rk3588_data = {
.size = 0x400,
+ .read_offset = 0xc00,
.clks = rk3588_otp_clocks,
.num_clks = ARRAY_SIZE(rk3588_otp_clocks),
.reg_read = rk3588_otp_read,

View File

@ -1,45 +0,0 @@
Document the OTP memory found on Rockchip RK3576 SoC.
The RK3576 uses the same set of clocks as the px30/rk3308
but has one reset more, so adapt the binding to handle this
variant as well.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../bindings/nvmem/rockchip,otp.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- a/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
@@ -14,6 +14,7 @@ properties:
enum:
- rockchip,px30-otp
- rockchip,rk3308-otp
+ - rockchip,rk3576-otp
- rockchip,rk3588-otp
reg:
@@ -70,6 +71,23 @@ allOf:
- if:
properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3576-otp
+ then:
+ properties:
+ clocks:
+ minItems: 3
+ resets:
+ minItems: 2
+ reset-names:
+ items:
+ - const: otp
+ - const: apb
+
+ - if:
+ properties:
compatible:
contains:
enum:

View File

@ -1,36 +0,0 @@
The variant works very similar to the rk3588, just with a different
read-offset and size.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/nvmem/rockchip-otp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -274,6 +274,14 @@ static const struct rockchip_data px30_d
.reg_read = px30_otp_read,
};
+static const struct rockchip_data rk3576_data = {
+ .size = 0x100,
+ .read_offset = 0x700,
+ .clks = px30_otp_clocks,
+ .num_clks = ARRAY_SIZE(px30_otp_clocks),
+ .reg_read = rk3588_otp_read,
+};
+
static const char * const rk3588_otp_clocks[] = {
"otp", "apb_pclk", "phy", "arb",
};
@@ -296,6 +304,10 @@ static const struct of_device_id rockchi
.data = &px30_data,
},
{
+ .compatible = "rockchip,rk3576-otp",
+ .data = &rk3576_data,
+ },
+ {
.compatible = "rockchip,rk3588-otp",
.data = &rk3588_data,
},

View File

@ -103,7 +103,7 @@ Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
+ };
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19952,6 +19952,13 @@ F: Documentation/userspace-api/media/v4l
@@ -19956,6 +19956,13 @@ F: Documentation/userspace-api/media/v4l
F: drivers/media/platform/rockchip/rkisp1
F: include/uapi/linux/rkisp1-config.h

View File

@ -9,7 +9,7 @@ Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19958,6 +19958,8 @@ L: linux-rockchip@lists.infradead.org
@@ -19962,6 +19962,8 @@ L: linux-rockchip@lists.infradead.org
L: linux-pwm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml

View File

@ -8,7 +8,7 @@ Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19958,6 +19958,7 @@ L: linux-rockchip@lists.infradead.org
@@ -19962,6 +19962,7 @@ L: linux-rockchip@lists.infradead.org
L: linux-pwm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml

View File

@ -8,7 +8,7 @@ Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19958,6 +19958,7 @@ L: linux-rockchip@lists.infradead.org
@@ -19962,6 +19962,7 @@ L: linux-rockchip@lists.infradead.org
L: linux-pwm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pwm/rockchip,rk3576-pwm.yaml