kernel: bump 6.12 to 6.12.31

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.31

Remove upstreamed patches:
  backport-6.12/780-27-v6.15-r8169-don-t-scan-PHY-addresses-0.patch [1]
  backport-6.12/780-33-v6.15-r8169-disable-RTL8126-ZRX-DC-timeout.patch [2]
  bcm27xx/patches-6.12/950-0315-media-i2c-imx219-Correct-the-minimum-vblanking-value.patch [3]
  bcm27xx/patches-6.12/950-0857-drm-v3d-Add-clock-handling.patch [4]
  bcm27xx/patches-6.12/950-0874-PCI-brcmstb-Expand-inbound-window-size-up-to-64GB.patch [5]
  bcm27xx/patches-6.12/950-0877-PCI-brcmstb-Adding-a-softdep-to-MIP-MSI-X-driver.patch [6]
  bcm27xx/patches-6.12/950-0960-media-imx335-Set-vblank-immediately.patch [7]

Manually rebased patches:
  d1/patches-6.12/0009-ASoC-sunxi-sun4i-codec-add-basic-support-for-D1-audi.patch

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=ba59747562c49974cbace989d76b94a8331da442
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=2780aa8394415df0a69e3b908d6dd8c79e1d1bcc
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=9a981079097bee6a0583877798de0b240717bdde
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=bbd6dc1fb6c56267ad1d58810d92287fcd5b0058
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=3ffaa2e999380477774e76680ff4cef247451168
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=12153e3948c596737853c3ec4ff7e4e3f4a9f9a6
[7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.31&id=8d7e13c31c52690655883dff604238b0760a3644

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18953
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Shiji Yang 2025-05-29 18:25:21 +08:00 committed by Hauke Mehrtens
parent 6296c17026
commit 30cdc48360
59 changed files with 141 additions and 471 deletions

View file

@ -750,7 +750,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4321,14 +4321,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -4329,14 +4329,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);

View file

@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1656,13 +1656,6 @@ drm_atomic_helper_wait_for_vblanks(struc
@@ -1684,13 +1684,6 @@ drm_atomic_helper_wait_for_vblanks(struc
int i, ret;
unsigned int crtc_mask = 0;
@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
if (!new_crtc_state->active)
continue;
@@ -2311,12 +2304,6 @@ int drm_atomic_helper_setup_commit(struc
@@ -2339,12 +2332,6 @@ int drm_atomic_helper_setup_commit(struc
complete_all(&commit->flip_done);
continue;
}

View file

@ -1991,7 +1991,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define MAX_TUNING_LOOP 40
@@ -3194,7 +3194,7 @@ static void sdhci_timeout_timer(struct t
@@ -3199,7 +3199,7 @@ static void sdhci_timeout_timer(struct t
spin_lock_irqsave(&host->lock, flags);
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@ -2000,7 +2000,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
mmc_hostname(host->mmc));
sdhci_err_stats_inc(host, REQ_TIMEOUT);
sdhci_dumpregs(host);
@@ -3217,7 +3217,7 @@ static void sdhci_timeout_data_timer(str
@@ -3222,7 +3222,7 @@ static void sdhci_timeout_data_timer(str
if (host->data || host->data_cmd ||
(host->cmd && sdhci_data_line_cmd(host->cmd))) {

View file

@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1352,6 +1352,7 @@ static const struct adv7180_chip_info ad
@@ -1362,6 +1362,7 @@ static const struct adv7180_chip_info ad
static int init_device(struct adv7180_state *state)
{
int ret;
@ -24,7 +24,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
mutex_lock(&state->mutex);
@@ -1399,6 +1400,18 @@ static int init_device(struct adv7180_st
@@ -1409,6 +1410,18 @@ static int init_device(struct adv7180_st
goto out_unlock;
}

View file

@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1341,6 +1341,7 @@ static const struct adv7180_chip_info ad
@@ -1351,6 +1351,7 @@ static const struct adv7180_chip_info ad
BIT(ADV7182_INPUT_SVIDEO_AIN1_AIN2) |
BIT(ADV7182_INPUT_SVIDEO_AIN3_AIN4) |
BIT(ADV7182_INPUT_SVIDEO_AIN7_AIN8) |

View file

@ -37,7 +37,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -321,6 +321,21 @@ static int v3d_platform_drm_probe(struct
@@ -331,6 +331,21 @@ static int v3d_platform_drm_probe(struct
}
}
@ -59,7 +59,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
if (v3d->ver < 41) {
ret = map_regs(v3d, &v3d->gca_regs, "gca");
if (ret)
@@ -349,6 +364,8 @@ static int v3d_platform_drm_probe(struct
@@ -360,6 +375,8 @@ static int v3d_platform_drm_probe(struct
ret = v3d_sysfs_init(dev);
if (ret)
goto drm_unregister;

View file

@ -41,7 +41,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
struct drm_device *drm;
struct v3d_dev *v3d;
int ret;
@@ -327,7 +333,20 @@ static int v3d_platform_drm_probe(struct
@@ -337,7 +343,20 @@ static int v3d_platform_drm_probe(struct
dev_err(dev, "Failed to get clock (%ld)\n", PTR_ERR(v3d->clk));
return PTR_ERR(v3d->clk);
}
@ -63,7 +63,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
/* For downclocking, drop it to the minimum frequency we can get from
* the CPRMAN clock generator dividing off our parent. The divider is
* 4 bits, but ask for just higher than that so that rounding doesn't
@@ -364,7 +383,7 @@ static int v3d_platform_drm_probe(struct
@@ -375,7 +394,7 @@ static int v3d_platform_drm_probe(struct
ret = v3d_sysfs_init(dev);
if (ret)
goto drm_unregister;

View file

@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct vchiq_platform_info bcm2835_info = {
.cache_line_size = 32,
@@ -1760,6 +1761,7 @@ static int vchiq_probe(struct platform_d
@@ -1759,6 +1760,7 @@ static int vchiq_probe(struct platform_d
vchiq_debugfs_init(&mgmt->state);
@ -29,7 +29,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
@@ -1778,6 +1780,7 @@ static void vchiq_remove(struct platform
@@ -1777,6 +1779,7 @@ static void vchiq_remove(struct platform
vchiq_device_unregister(bcm2835_audio);
vchiq_device_unregister(bcm2835_camera);

View file

@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static struct vchiq_device *vcsm_cma;
static const struct vchiq_platform_info bcm2835_info = {
@@ -1762,6 +1763,7 @@ static int vchiq_probe(struct platform_d
@@ -1761,6 +1762,7 @@ static int vchiq_probe(struct platform_d
vchiq_debugfs_init(&mgmt->state);
vcsm_cma = vchiq_device_register(&pdev->dev, "vcsm-cma");
@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
@@ -1780,6 +1782,7 @@ static void vchiq_remove(struct platform
@@ -1779,6 +1781,7 @@ static void vchiq_remove(struct platform
vchiq_device_unregister(bcm2835_audio);
vchiq_device_unregister(bcm2835_camera);

View file

@ -234,7 +234,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
dev_dbg(&pdev->dev, "arm: vchiq_init - done (slots %pK, phys %pad)\n",
vchiq_slot_zero, &slot_phys);
@@ -1711,6 +1777,7 @@ void vchiq_platform_conn_state_changed(s
@@ -1710,6 +1776,7 @@ void vchiq_platform_conn_state_changed(s
static const struct of_device_id vchiq_of_match[] = {
{ .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_info },
{ .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_info },

View file

@ -21,7 +21,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
static struct vchiq_device *vcsm_cma;
static const struct vchiq_platform_info bcm2835_info = {
@@ -1858,6 +1859,7 @@ static int vchiq_probe(struct platform_d
@@ -1857,6 +1858,7 @@ static int vchiq_probe(struct platform_d
bcm2835_codec = vchiq_device_register(&pdev->dev, "bcm2835-codec");
bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
@ -29,7 +29,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
return 0;
@@ -1872,6 +1874,7 @@ static void vchiq_remove(struct platform
@@ -1871,6 +1873,7 @@ static void vchiq_remove(struct platform
struct vchiq_drv_mgmt *mgmt = dev_get_drvdata(&pdev->dev);
struct vchiq_arm_state *arm_state;

View file

@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
struct adv7180_state;
#define ADV7180_FLAG_RESET_POWERED BIT(0)
@@ -407,10 +411,24 @@ out:
@@ -408,10 +412,24 @@ out:
return ret;
}
@ -56,7 +56,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
if (ret)
return ret;
@@ -436,7 +454,11 @@ static int adv7180_program_std(struct ad
@@ -437,7 +455,11 @@ static int adv7180_program_std(struct ad
static int adv7180_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
{
struct adv7180_state *state = to_state(sd);
@ -69,7 +69,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
if (ret)
return ret;
@@ -458,6 +480,8 @@ static int adv7180_g_std(struct v4l2_sub
@@ -459,6 +481,8 @@ static int adv7180_g_std(struct v4l2_sub
{
struct adv7180_state *state = to_state(sd);
@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
*norm = state->curr_norm;
return 0;
@@ -895,6 +919,8 @@ static int adv7180_s_stream(struct v4l2_
@@ -900,6 +924,8 @@ static int adv7180_s_stream(struct v4l2_
return 0;
}

View file

@ -1,25 +0,0 @@
From d2a776c4d38ccf0435083a90f51ed8886dd7aac9 Mon Sep 17 00:00:00 2001
From: David Plowman <david.plowman@raspberrypi.com>
Date: Tue, 25 Jan 2022 15:48:53 +0000
Subject: [PATCH] media: i2c: imx219: Correct the minimum vblanking value
The datasheet for this sensor documents the minimum vblanking as being
32 lines. It does fix some problems with occasional black lines at the
bottom of images (tested on Raspberry Pi).
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
drivers/media/i2c/imx219.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -74,7 +74,7 @@
#define IMX219_REG_VTS CCI_REG16(0x0160)
#define IMX219_VTS_MAX 0xffff
-#define IMX219_VBLANK_MIN 4
+#define IMX219_VBLANK_MIN 32
/* HBLANK control - read only */
#define IMX219_PPL_DEFAULT 3448

View file

@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3647,6 +3647,48 @@ static int xhci_align_td(struct xhci_hcd
@@ -3657,6 +3657,48 @@ static int xhci_align_td(struct xhci_hcd
return 1;
}
@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* This is very similar to what ehci-q.c qtd_fill() does */
int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
struct urb *urb, int slot_id, unsigned int ep_index)
@@ -3801,6 +3843,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3811,6 +3853,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
}
check_trb_math(urb, enqd_len);
@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
start_cycle, start_trb);
return 0;
@@ -3949,6 +3993,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
@@ -3959,6 +4003,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
/* Event on completion */
field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);

View file

@ -27,7 +27,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
.postinit = dwcmshc_rk35xx_postinit,
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3032,6 +3032,15 @@ static void sdhci_card_event(struct mmc_
@@ -3037,6 +3037,15 @@ static void sdhci_card_event(struct mmc_
spin_unlock_irqrestore(&host->lock, flags);
}
@ -43,7 +43,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
static const struct mmc_host_ops sdhci_ops = {
.request = sdhci_request,
.post_req = sdhci_post_req,
@@ -3047,6 +3056,7 @@ static const struct mmc_host_ops sdhci_o
@@ -3052,6 +3061,7 @@ static const struct mmc_host_ops sdhci_o
.execute_tuning = sdhci_execute_tuning,
.card_event = sdhci_card_event,
.card_busy = sdhci_card_busy,
@ -51,7 +51,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
};
/*****************************************************************************\
@@ -4565,6 +4575,15 @@ int sdhci_setup_host(struct sdhci_host *
@@ -4570,6 +4580,15 @@ int sdhci_setup_host(struct sdhci_host *
!(host->quirks2 & SDHCI_QUIRK2_BROKEN_DDR50))
mmc->caps |= MMC_CAP_UHS_DDR50;

View file

@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND);
return true;
@@ -3291,6 +3297,11 @@ static void sdhci_cmd_irq(struct sdhci_h
@@ -3296,6 +3302,11 @@ static void sdhci_cmd_irq(struct sdhci_h
if (intmask & SDHCI_INT_TIMEOUT) {
host->cmd->error = -ETIMEDOUT;
sdhci_err_stats_inc(host, CMD_TIMEOUT);

View file

@ -21,7 +21,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1392,7 +1392,7 @@ struct urb_priv {
@@ -1395,7 +1395,7 @@ struct urb_priv {
};
/* Number of Event Ring segments to allocate, when amount is not specified. (spec allows 32k) */

View file

@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -732,10 +732,15 @@ static int adv7180_enum_mbus_code(struct
@@ -737,10 +737,15 @@ static int adv7180_enum_mbus_code(struct
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{
@ -34,7 +34,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
return 0;
}
@@ -745,7 +750,10 @@ static int adv7180_mbus_fmt(struct v4l2_
@@ -750,7 +755,10 @@ static int adv7180_mbus_fmt(struct v4l2_
{
struct adv7180_state *state = to_state(sd);

View file

@ -32,7 +32,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static int dbg_input;
module_param(dbg_input, int, 0644);
MODULE_PARM_DESC(dbg_input, "Input number (0-31)");
@@ -228,6 +238,7 @@ struct adv7180_state {
@@ -229,6 +239,7 @@ struct adv7180_state {
const struct adv7180_chip_info *chip_info;
enum v4l2_field field;
bool force_bt656_4;
@ -40,7 +40,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
};
#define to_adv7180_sd(_ctrl) (&container_of(_ctrl->handler, \
struct adv7180_state, \
@@ -629,6 +640,9 @@ static int adv7180_s_ctrl(struct v4l2_ct
@@ -630,6 +641,9 @@ static int adv7180_s_ctrl(struct v4l2_ct
if (ret)
return ret;
@ -50,7 +50,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
val = ctrl->val;
switch (ctrl->id) {
case V4L2_CID_BRIGHTNESS:
@@ -670,6 +684,7 @@ static int adv7180_s_ctrl(struct v4l2_ct
@@ -671,6 +685,7 @@ static int adv7180_s_ctrl(struct v4l2_ct
ret = -EINVAL;
}
@ -58,7 +58,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
mutex_unlock(&state->mutex);
return ret;
}
@@ -690,7 +705,7 @@ static const struct v4l2_ctrl_config adv
@@ -691,7 +706,7 @@ static const struct v4l2_ctrl_config adv
static int adv7180_init_controls(struct adv7180_state *state)
{
@ -67,9 +67,9 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
v4l2_ctrl_new_std(&state->ctrl_hdl, &adv7180_ctrl_ops,
V4L2_CID_BRIGHTNESS, ADV7180_BRI_MIN,
@@ -712,6 +727,17 @@ static int adv7180_init_controls(struct
0, ARRAY_SIZE(test_pattern_menu) - 1,
test_pattern_menu);
@@ -717,6 +732,17 @@ static int adv7180_init_controls(struct
test_pattern_menu);
}
+ if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
+ state->link_freq =
@ -85,7 +85,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
state->sd.ctrl_handler = &state->ctrl_hdl;
if (state->ctrl_hdl.error) {
int err = state->ctrl_hdl.error;
@@ -844,6 +870,10 @@ static int adv7180_set_pad_format(struct
@@ -849,6 +875,10 @@ static int adv7180_set_pad_format(struct
adv7180_set_power(state, false);
adv7180_set_field_mode(state);
adv7180_set_power(state, true);

View file

@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
BUG_ON(data->blksz > host->mmc->max_blk_size);
BUG_ON(data->blocks > 65535);
@@ -4709,11 +4709,16 @@ int sdhci_setup_host(struct sdhci_host *
@@ -4714,11 +4714,16 @@ int sdhci_setup_host(struct sdhci_host *
spin_lock_init(&host->lock);
/*

View file

@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -465,6 +465,8 @@ struct xhci_ep_ctx {
@@ -468,6 +468,8 @@ struct xhci_ep_ctx {
#define CTX_TO_EP_MAXPSTREAMS(p) (((p) & EP_MAXPSTREAMS_MASK) >> 10)
/* Endpoint is set up with a Linear Stream Array (vs. Secondary Stream Array) */
#define EP_HAS_LSA (1 << 15)

View file

@ -88,7 +88,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20240923141348.2422499-5-mca
/**
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -473,6 +473,9 @@ void drm_gem_object_release(struct drm_g
@@ -474,6 +474,9 @@ void drm_gem_object_release(struct drm_g
void drm_gem_object_free(struct kref *kref);
int drm_gem_object_init(struct drm_device *dev,
struct drm_gem_object *obj, size_t size);

View file

@ -1,99 +0,0 @@
From d3976b4e3830d608c155713dd2f7c36839897ec5 Mon Sep 17 00:00:00 2001
From: Stefan Wahren <wahrenst@gmx.net>
Date: Sat, 1 Feb 2025 13:50:46 +0100
Subject: [PATCH] drm/v3d: Add clock handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since the initial commit 57692c94dcbe ("drm/v3d: Introduce a new DRM driver
for Broadcom V3D V3.x+") the struct v3d_dev reserved a pointer for
an optional V3D clock. But there wasn't any code, which fetched it.
So add the missing clock handling before accessing any V3D registers.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250201125046.33030-1-wahrenst@gmx.net
---
drivers/gpu/drm/v3d/v3d_drv.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -304,11 +304,21 @@ static int v3d_platform_drm_probe(struct
if (ret)
return ret;
+ v3d->clk = devm_clk_get_optional(dev, NULL);
+ if (IS_ERR(v3d->clk))
+ return dev_err_probe(dev, PTR_ERR(v3d->clk), "Failed to get V3D clock\n");
+
+ ret = clk_prepare_enable(v3d->clk);
+ if (ret) {
+ dev_err(&pdev->dev, "Couldn't enable the V3D clock\n");
+ return ret;
+ }
+
mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
mask = DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
ret = dma_set_mask_and_coherent(dev, mask);
if (ret)
- return ret;
+ goto clk_disable;
v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH);
@@ -328,14 +338,14 @@ static int v3d_platform_drm_probe(struct
ret = PTR_ERR(v3d->reset);
if (ret == -EPROBE_DEFER)
- return ret;
+ goto clk_disable;
v3d->reset = NULL;
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
if (ret) {
dev_err(dev,
"Failed to get reset control or bridge regs\n");
- return ret;
+ goto clk_disable;
}
}
@@ -370,14 +380,15 @@ static int v3d_platform_drm_probe(struct
if (v3d->ver < 41) {
ret = map_regs(v3d, &v3d->gca_regs, "gca");
if (ret)
- return ret;
+ goto clk_disable;
}
v3d->mmu_scratch = dma_alloc_wc(dev, 4096, &v3d->mmu_scratch_paddr,
GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO);
if (!v3d->mmu_scratch) {
dev_err(dev, "Failed to allocate MMU scratch page\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto clk_disable;
}
ret = v3d_gem_init(drm);
@@ -408,6 +419,8 @@ gem_destroy:
v3d_gem_destroy(drm);
dma_free:
dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr);
+clk_disable:
+ clk_disable_unprepare(v3d->clk);
return ret;
}
@@ -425,6 +438,8 @@ static void v3d_platform_drm_remove(stru
dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch,
v3d->mmu_scratch_paddr);
+
+ clk_disable_unprepare(v3d->clk);
}
static struct platform_driver v3d_platform_driver = {

View file

@ -1,38 +0,0 @@
From f46dc47bb16ebca678b357c38d16d586357ffbeb Mon Sep 17 00:00:00 2001
From: Stanimir Varbanov <svarbanov@suse.de>
Date: Mon, 24 Feb 2025 10:35:58 +0200
Subject: [PATCH] PCI: brcmstb: Expand inbound window size up to 64GB
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The BCM2712 memory map can support up to 64GB of system memory, thus
expand the inbound window size in calculation helper function.
The change is safe for the currently supported SoCs that have smaller
inbound window sizes.
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jim Quinlan <james.quinlan@broadcom.com>
Tested-by: Ivan T. Ivanov <iivanov@suse.de>
Link: https://lore.kernel.org/r/20250120130119.671119-6-svarbanov@suse.de
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
---
drivers/pci/controller/pcie-brcmstb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -304,8 +304,8 @@ static int brcm_pcie_encode_ibar_size(u6
if (log2_in >= 12 && log2_in <= 15)
/* Covers 4KB to 32KB (inclusive) */
return (log2_in - 12) + 0x1c;
- else if (log2_in >= 16 && log2_in <= 35)
- /* Covers 64KB to 32GB, (inclusive) */
+ else if (log2_in >= 16 && log2_in <= 36)
+ /* Covers 64KB to 64GB, (inclusive) */
return log2_in - 15;
/* Something is awry so disable */
return 0;

View file

@ -1,31 +0,0 @@
From d0b8d7cc6cb1120acca237958d3d88bfcd75976a Mon Sep 17 00:00:00 2001
From: Stanimir Varbanov <svarbanov@suse.de>
Date: Mon, 24 Feb 2025 10:35:56 +0200
Subject: [PATCH] PCI: brcmstb: Adding a softdep to MIP MSI-X driver
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In case brcmstb PCIe driver and MIP MSI-X interrupt controller
drivers are built as modules there could be a race in probing.
To avoid this add a softdep to MIP driver to guarantee that MIP
driver will be load first.
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Ivan T. Ivanov <iivanov@suse.de>
Link: https://lore.kernel.org/r/20250120130119.671119-9-svarbanov@suse.de
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
---
drivers/pci/controller/pcie-brcmstb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -2004,3 +2004,4 @@ module_platform_driver(brcm_pcie_driver)
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");

View file

@ -142,7 +142,7 @@ Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
static int imx335_update_test_pattern(struct imx335 *imx335, u32 pattern_index)
{
int ret = 0;
@@ -585,6 +641,10 @@ static int imx335_set_ctrl(struct v4l2_c
@@ -594,6 +650,10 @@ static int imx335_set_ctrl(struct v4l2_c
ret = imx335_update_exp_gain(imx335, exposure, analog_gain);
break;
@ -153,7 +153,7 @@ Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
case V4L2_CID_TEST_PATTERN:
ret = imx335_update_test_pattern(imx335, ctrl->val);
@@ -1166,7 +1226,7 @@ static int imx335_init_controls(struct i
@@ -1175,7 +1235,7 @@ static int imx335_init_controls(struct i
return ret;
/* v4l2_fwnode_device_properties can add two more controls */
@ -162,7 +162,7 @@ Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
if (ret)
return ret;
@@ -1201,6 +1261,13 @@ static int imx335_init_controls(struct i
@@ -1210,6 +1270,13 @@ static int imx335_init_controls(struct i
v4l2_ctrl_cluster(2, &imx335->exp_ctrl);

View file

@ -1,52 +0,0 @@
From a9a2c30bb67cbf1e03d312e02eb659ef9673b123 Mon Sep 17 00:00:00 2001
From: Paul Elder <paul.elder@ideasonboard.com>
Date: Fri, 14 Feb 2025 18:03:53 +0900
Subject: [PATCH] media: imx335: Set vblank immediately
When the vblank v4l2 control is set, it does not get written to the
hardware immediately. It only gets updated when exposure is set. Change
the behavior such that the vblank is written immediately when the
control is set.
Commit c0aa40f45fef ("media: imx335: Set vblank immediately")' upstream
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
drivers/media/i2c/imx335.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -615,12 +615,12 @@ static int imx335_set_ctrl(struct v4l2_c
imx335->vblank,
imx335->vblank + imx335->cur_mode->height);
- return __v4l2_ctrl_modify_range(imx335->exp_ctrl,
- IMX335_EXPOSURE_MIN,
- imx335->vblank +
- imx335->cur_mode->height -
- IMX335_EXPOSURE_OFFSET,
- 1, IMX335_EXPOSURE_DEFAULT);
+ __v4l2_ctrl_modify_range(imx335->exp_ctrl,
+ IMX335_EXPOSURE_MIN,
+ imx335->vblank +
+ imx335->cur_mode->height -
+ IMX335_EXPOSURE_OFFSET,
+ 1, IMX335_EXPOSURE_DEFAULT);
}
/*
@@ -631,6 +631,13 @@ static int imx335_set_ctrl(struct v4l2_c
return 0;
switch (ctrl->id) {
+ case V4L2_CID_VBLANK:
+ exposure = imx335->exp_ctrl->val;
+ analog_gain = imx335->again_ctrl->val;
+
+ ret = imx335_update_exp_gain(imx335, exposure, analog_gain);
+
+ break;
case V4L2_CID_EXPOSURE:
exposure = ctrl->val;
analog_gain = imx335->again_ctrl->val;

View file

@ -22,7 +22,7 @@ Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -718,7 +718,8 @@ static int imx335_enum_frame_size(struct
@@ -720,7 +720,8 @@ static int imx335_enum_frame_size(struct
struct imx335 *imx335 = to_imx335(sd);
u32 code;

View file

@ -16,7 +16,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -228,15 +228,65 @@
@@ -229,16 +229,66 @@
/* TODO H3 DAP (Digital Audio Processing) bits */
@ -76,6 +76,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
+ struct clk *clk_module_dac;
struct reset_control *rst;
struct gpio_desc *gpio_pa;
struct gpio_desc *gpio_hp;
+ const struct sun4i_codec_quirks *quirks;
- /* ADC_FIFOC register is at different offset on different SoCs */
@ -84,7 +85,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
struct regmap_field *reg_adc_fifoc;
struct snd_dmaengine_dai_dma_data capture_dma_data;
@@ -246,33 +296,33 @@ struct sun4i_codec {
@@ -248,33 +298,33 @@ struct sun4i_codec {
static void sun4i_codec_start_playback(struct sun4i_codec *scodec)
{
/* Flush TX FIFO */
@ -126,7 +127,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
}
static int sun4i_codec_trigger(struct snd_pcm_substream *substream, int cmd,
@@ -321,8 +371,8 @@ static int sun4i_codec_prepare_capture(s
@@ -323,8 +373,8 @@ static int sun4i_codec_prepare_capture(s
/* Set RX FIFO trigger level */
regmap_field_update_bits(scodec->reg_adc_fifoc,
@ -137,7 +138,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
/*
* FIXME: Undocumented in the datasheet, but
@@ -356,13 +406,13 @@ static int sun4i_codec_prepare_playback(
@@ -358,13 +408,13 @@ static int sun4i_codec_prepare_playback(
u32 val;
/* Flush the TX FIFO */
@ -156,7 +157,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
if (substream->runtime->rate > 32000)
/* Use 64 bits FIR filter */
@@ -371,13 +421,12 @@ static int sun4i_codec_prepare_playback(
@@ -373,13 +423,12 @@ static int sun4i_codec_prepare_playback(
/* Use 32 bits FIR filter */
val = BIT(SUN4I_CODEC_DAC_FIFOC_FIR_VERSION);
@ -174,7 +175,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
return 0;
};
@@ -472,30 +521,32 @@ static int sun4i_codec_hw_params_capture
@@ -474,30 +523,32 @@ static int sun4i_codec_hw_params_capture
7 << SUN4I_CODEC_ADC_FIFOC_ADC_FS,
hwrate << SUN4I_CODEC_ADC_FIFOC_ADC_FS);
@ -218,7 +219,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
scodec->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
}
@@ -510,9 +561,9 @@ static int sun4i_codec_hw_params_playbac
@@ -512,9 +563,9 @@ static int sun4i_codec_hw_params_playbac
u32 val;
/* Set DAC sample rate */
@ -231,7 +232,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
/* Set the number of channels we want to use */
if (params_channels(params) == 1)
@@ -520,27 +571,26 @@ static int sun4i_codec_hw_params_playbac
@@ -522,27 +573,26 @@ static int sun4i_codec_hw_params_playbac
else
val = 0;
@ -269,7 +270,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
scodec->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
}
@@ -561,7 +611,11 @@ static int sun4i_codec_hw_params(struct
@@ -563,7 +613,11 @@ static int sun4i_codec_hw_params(struct
if (!clk_freq)
return -EINVAL;
@ -282,7 +283,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
if (ret)
return ret;
@@ -587,10 +641,14 @@ static int sun4i_codec_startup(struct sn
@@ -589,10 +643,14 @@ static int sun4i_codec_startup(struct sn
* Stop issuing DRQ when we have room for less than 16 samples
* in our TX FIFO
*/
@ -300,7 +301,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
}
static void sun4i_codec_shutdown(struct snd_pcm_substream *substream,
@@ -599,7 +657,11 @@ static void sun4i_codec_shutdown(struct
@@ -601,7 +659,11 @@ static void sun4i_codec_shutdown(struct
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card);
@ -313,7 +314,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
}
static const struct snd_soc_dai_ops sun4i_codec_dai_ops = {
@@ -1216,6 +1278,55 @@ static const struct snd_soc_component_dr
@@ -1218,6 +1280,55 @@ static const struct snd_soc_component_dr
.endianness = 1,
};
@ -369,7 +370,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
static const struct snd_soc_component_driver sun4i_codec_component = {
.name = "sun4i-codec",
.legacy_dai_naming = 1,
@@ -1518,6 +1629,66 @@ static struct snd_soc_card *sun8i_v3s_co
@@ -1564,6 +1675,66 @@ static struct snd_soc_card *sun8i_v3s_co
return card;
};
@ -436,7 +437,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
static const struct regmap_config sun4i_codec_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -1560,21 +1731,22 @@ static const struct regmap_config sun8i_
@@ -1606,21 +1777,22 @@ static const struct regmap_config sun8i_
.max_register = SUN8I_H3_CODEC_ADC_DBG,
};
@ -467,7 +468,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
.reg_adc_rxdata = SUN4I_CODEC_ADC_RXDATA,
};
@@ -1583,7 +1755,11 @@ static const struct sun4i_codec_quirks s
@@ -1629,7 +1801,11 @@ static const struct sun4i_codec_quirks s
.regmap_config = &sun6i_codec_regmap_config,
.codec = &sun6i_codec_codec,
.create_card = sun6i_codec_create_card,
@ -479,7 +480,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
.has_reset = true,
@@ -1593,7 +1769,11 @@ static const struct sun4i_codec_quirks s
@@ -1639,7 +1815,11 @@ static const struct sun4i_codec_quirks s
.regmap_config = &sun7i_codec_regmap_config,
.codec = &sun7i_codec_codec,
.create_card = sun4i_codec_create_card,
@ -491,7 +492,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
.reg_adc_rxdata = SUN4I_CODEC_ADC_RXDATA,
};
@@ -1602,7 +1782,11 @@ static const struct sun4i_codec_quirks s
@@ -1648,7 +1828,11 @@ static const struct sun4i_codec_quirks s
.regmap_config = &sun8i_a23_codec_regmap_config,
.codec = &sun8i_a23_codec_codec,
.create_card = sun8i_a23_codec_create_card,
@ -503,7 +504,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
.reg_dac_txdata = SUN4I_CODEC_DAC_TXDATA,
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
.has_reset = true,
@@ -1617,7 +1801,11 @@ static const struct sun4i_codec_quirks s
@@ -1663,7 +1847,11 @@ static const struct sun4i_codec_quirks s
*/
.codec = &sun8i_a23_codec_codec,
.create_card = sun8i_h3_codec_create_card,
@ -515,7 +516,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
.reg_dac_txdata = SUN8I_H3_CODEC_DAC_TXDATA,
.reg_adc_rxdata = SUN6I_CODEC_ADC_RXDATA,
.has_reset = true,
@@ -1631,12 +1819,31 @@ static const struct sun4i_codec_quirks s
@@ -1677,12 +1865,31 @@ static const struct sun4i_codec_quirks s
*/
.codec = &sun8i_a23_codec_codec,
.create_card = sun8i_v3s_codec_create_card,
@ -547,7 +548,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
static const struct of_device_id sun4i_codec_of_match[] = {
{
.compatible = "allwinner,sun4i-a10-codec",
@@ -1662,6 +1869,10 @@ static const struct of_device_id sun4i_c
@@ -1708,6 +1915,10 @@ static const struct of_device_id sun4i_c
.compatible = "allwinner,sun8i-v3s-codec",
.data = &sun8i_v3s_codec_quirks,
},
@ -558,7 +559,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
{}
};
MODULE_DEVICE_TABLE(of, sun4i_codec_of_match);
@@ -1690,6 +1901,7 @@ static int sun4i_codec_probe(struct plat
@@ -1736,6 +1947,7 @@ static int sun4i_codec_probe(struct plat
dev_err(&pdev->dev, "Failed to determine the quirks to use\n");
return -ENODEV;
}
@ -566,7 +567,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
scodec->regmap = devm_regmap_init_mmio(&pdev->dev, base,
quirks->regmap_config);
@@ -1705,10 +1917,24 @@ static int sun4i_codec_probe(struct plat
@@ -1751,10 +1963,24 @@ static int sun4i_codec_probe(struct plat
return PTR_ERR(scodec->clk_apb);
}
@ -595,7 +596,7 @@ Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
}
if (quirks->has_reset) {
@@ -1737,6 +1963,16 @@ static int sun4i_codec_probe(struct plat
@@ -1790,6 +2016,16 @@ static int sun4i_codec_probe(struct plat
dev_err(&pdev->dev, "Failed to create regmap fields: %d\n",
ret);
return ret;

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,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

@ -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