kernel: bump 6.6 to 6.6.120

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

Removes upstreamed patches:
generic/backport-6.6/600-v6.10-net-Remove-conditional-threaded-NAPI-wakeup-based-on.patch [1]
generic/backport-6.6/601-v6.10-net-Allow-to-use-SMP-threads-for-backlog-NAPI.patch [2]

Manually rebase patches:
bcm27xx/patches-6.6/950-1396-i2c-designware-Add-support-for-bus-clear-feature.patch [3]
ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch [4]
mediatek/patches-6.6/733-01-net-phy-mediatek-Re-organize-MediaTek-ethernet-phy-d.patch [5]
qualcommax/patches-6.6/0113-remoteproc-qcom-Add-secure-PIL-support.patch [6]
qualcommax/patches-6.6/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch [6]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=03765d5c18084eab40351fda09bc6fc1a343cd07
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=f3652768a89cfdaedbe2c9384299eea7ec435fef
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=62641daa93cb8b8ed975fad75fb07f9f9e3488cd
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=fe2ce8f925b09d819546feb5db52ab1db42cb0d4
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=a902343f133154e438b772d3e7b538ed0b163acc
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.120&id=61f371ade3b68dbb46e2d90882af993f73b489b5

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21503
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Goetz Goerisch 2026-01-11 16:30:44 +01:00 committed by Hauke Mehrtens
parent 49862b1cf5
commit 67294cb751
108 changed files with 337 additions and 762 deletions

View file

@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .119
LINUX_KERNEL_HASH-6.6.119 = 3da09b980bb404cc28793479bb2d6c636522679215ffa65a04c893575253e5e8
LINUX_VERSION-6.6 = .120
LINUX_KERNEL_HASH-6.6.120 = 405c332d59eedc4fd78863ff07a06c040dfeef651e58f022910a5ac953e4dc21

View file

@ -221,7 +221,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+MODULE_LICENSE("GPL");
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -103,6 +103,8 @@ static const struct of_device_id allowli
@@ -104,6 +104,8 @@ static const struct of_device_id allowli
* platforms using "operating-points-v2" property.
*/
static const struct of_device_id blocklist[] __initconst = {

View file

@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
};
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -103,6 +103,7 @@ static const struct of_device_id allowli
@@ -104,6 +104,7 @@ static const struct of_device_id allowli
* platforms using "operating-points-v2" property.
*/
static const struct of_device_id blocklist[] __initconst = {

View file

@ -24,7 +24,7 @@ We don't agree with upstream revert so undo it.
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -635,8 +635,11 @@ static int xhci_move_dequeue_past_td(str
@@ -633,8 +633,11 @@ static int xhci_move_dequeue_past_td(str
struct xhci_ring *ep_ring;
struct xhci_command *cmd;
struct xhci_segment *new_seg;
@ -36,7 +36,7 @@ We don't agree with upstream revert so undo it.
dma_addr_t addr;
u64 hw_dequeue;
bool cycle_found = false;
@@ -674,7 +677,27 @@ static int xhci_move_dequeue_past_td(str
@@ -672,7 +675,27 @@ static int xhci_move_dequeue_past_td(str
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
new_seg = ep_ring->deq_seg;
new_deq = ep_ring->dequeue;

View file

@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -200,6 +200,12 @@ static int __release_resource(struct res
@@ -205,6 +205,12 @@ static int __release_resource(struct res
{
struct resource *tmp, **p, *chd;

View file

@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
* For devices with more than one control interface, we assume the
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2279,6 +2279,8 @@ static const struct usb_audio_quirk_flag
@@ -2285,6 +2285,8 @@ static const struct usb_audio_quirk_flag
QUIRK_FLAG_ALIGN_TRANSFER),
DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
QUIRK_FLAG_ALIGN_TRANSFER),

View file

@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -740,9 +740,9 @@ deq_found:
@@ -738,9 +738,9 @@ deq_found:
}
if ((ep->ep_state & SET_DEQ_PENDING)) {

View file

@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
@@ -1453,6 +1456,9 @@
@@ -1454,6 +1457,9 @@
#define USB_VENDOR_ID_XIAOMI 0x2717
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014

View file

@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -123,6 +123,7 @@
@@ -122,6 +122,7 @@
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK 0x2
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x08000000
#define PCIE_BMIPS_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x00800000
@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define PCIE_INTR2_CPU_BASE 0x4300
@@ -252,6 +253,7 @@ struct brcm_pcie {
@@ -251,6 +252,7 @@ struct brcm_pcie {
struct clk *clk;
struct device_node *np;
bool ssc;
@ -34,7 +34,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int gen;
u64 msi_target_addr;
struct brcm_msi *msi;
@@ -1077,12 +1079,25 @@ static int brcm_pcie_start_link(struct b
@@ -1073,12 +1075,25 @@ static int brcm_pcie_start_link(struct b
pci_speed_string(pcie_link_speed[cls]), nlw,
ssc_good ? "(SSC)" : "(!SSC)");
@ -65,7 +65,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
return 0;
@@ -1537,6 +1552,7 @@ static int brcm_pcie_probe(struct platfo
@@ -1533,6 +1548,7 @@ static int brcm_pcie_probe(struct platfo
pcie->gen = (ret < 0) ? 0 : ret;
pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");

View file

@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -442,7 +442,7 @@ static struct irq_chip brcm_msi_irq_chip
@@ -441,7 +441,7 @@ static struct irq_chip brcm_msi_irq_chip
static struct msi_domain_info brcm_msi_domain_info = {
.flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |

View file

@ -34,7 +34,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
@@ -730,6 +730,15 @@ static int xhci_move_dequeue_past_td(str
@@ -728,6 +728,15 @@ static int xhci_move_dequeue_past_td(str
} while (!cycle_found || !td_last_trb_found);
deq_found:

View file

@ -34,7 +34,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1407,6 +1407,7 @@ int xhci_endpoint_init(struct xhci_hcd *
@@ -1401,6 +1401,7 @@ int xhci_endpoint_init(struct xhci_hcd *
unsigned int ep_index;
struct xhci_ep_ctx *ep_ctx;
struct xhci_ring *ep_ring;
@ -42,7 +42,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
unsigned int max_packet;
enum xhci_ring_type ring_type;
u32 max_esit_payload;
@@ -1416,6 +1417,8 @@ int xhci_endpoint_init(struct xhci_hcd *
@@ -1410,6 +1411,8 @@ int xhci_endpoint_init(struct xhci_hcd *
unsigned int mult;
unsigned int avg_trb_len;
unsigned int err_count = 0;
@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
ep_index = xhci_get_endpoint_index(&ep->desc);
ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
@@ -1451,9 +1454,35 @@ int xhci_endpoint_init(struct xhci_hcd *
@@ -1445,9 +1448,35 @@ int xhci_endpoint_init(struct xhci_hcd *
mult = xhci_get_endpoint_mult(udev, ep);
max_packet = usb_endpoint_maxp(&ep->desc);

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
@@ -3733,6 +3733,48 @@ static int xhci_align_td(struct xhci_hcd
@@ -3729,6 +3729,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)
@@ -3889,6 +3931,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3885,6 +3927,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;
@@ -4038,6 +4082,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
@@ -4034,6 +4078,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

@ -191,7 +191,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void macb_init_buffers(struct macb *bp)
{
struct macb_queue *queue;
@@ -977,6 +993,7 @@ static int macb_mii_init(struct macb *bp
@@ -976,6 +992,7 @@ static int macb_mii_init(struct macb *bp
bp->mii_bus->write = &macb_mdio_write_c22;
bp->mii_bus->read_c45 = &macb_mdio_read_c45;
bp->mii_bus->write_c45 = &macb_mdio_write_c45;
@ -199,7 +199,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
bp->pdev->name, bp->pdev->id);
bp->mii_bus->priv = bp;
@@ -1642,6 +1659,11 @@ static int macb_rx(struct macb_queue *qu
@@ -1641,6 +1658,11 @@ static int macb_rx(struct macb_queue *qu
macb_init_rx_ring(queue);
queue_writel(queue, RBQP, queue->rx_ring_dma);
@ -211,7 +211,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_writel(bp, NCR, ctrl | MACB_BIT(RE));
@@ -1944,8 +1966,9 @@ static irqreturn_t macb_interrupt(int ir
@@ -1943,8 +1965,9 @@ static irqreturn_t macb_interrupt(int ir
queue_writel(queue, ISR, MACB_BIT(TCOMP) |
MACB_BIT(TXUBR));
@ -222,7 +222,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
wmb(); // ensure softirq can see update
}
@@ -2401,6 +2424,11 @@ static netdev_tx_t macb_start_xmit(struc
@@ -2400,6 +2423,11 @@ static netdev_tx_t macb_start_xmit(struc
skb_tx_timestamp(skb);
spin_lock(&bp->lock);
@ -234,7 +234,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
spin_unlock(&bp->lock);
@@ -2775,6 +2803,37 @@ static void macb_configure_dma(struct ma
@@ -2774,6 +2802,37 @@ static void macb_configure_dma(struct ma
}
}
@ -272,7 +272,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void macb_init_hw(struct macb *bp)
{
u32 config;
@@ -2803,6 +2862,11 @@ static void macb_init_hw(struct macb *bp
@@ -2802,6 +2861,11 @@ static void macb_init_hw(struct macb *bp
if (bp->caps & MACB_CAPS_JUMBO)
bp->rx_frm_len_mask = MACB_RX_JFRMLEN_MASK;
@ -284,7 +284,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_configure_dma(bp);
/* Enable RX partial store and forward and set watermark */
@@ -3167,6 +3231,52 @@ static void gem_get_ethtool_strings(stru
@@ -3168,6 +3232,52 @@ static void gem_get_ethtool_strings(stru
}
}
@ -337,7 +337,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static struct net_device_stats *macb_get_stats(struct net_device *dev)
{
struct macb *bp = netdev_priv(dev);
@@ -3761,6 +3871,8 @@ static const struct ethtool_ops macb_eth
@@ -3762,6 +3872,8 @@ static const struct ethtool_ops macb_eth
};
static const struct ethtool_ops gem_ethtool_ops = {
@ -346,7 +346,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.get_regs_len = macb_get_regs_len,
.get_regs = macb_get_regs,
.get_wol = macb_get_wol,
@@ -3770,6 +3882,8 @@ static const struct ethtool_ops gem_etht
@@ -3771,6 +3883,8 @@ static const struct ethtool_ops gem_etht
.get_ethtool_stats = gem_get_ethtool_stats,
.get_strings = gem_get_ethtool_strings,
.get_sset_count = gem_get_sset_count,
@ -355,7 +355,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.get_link_ksettings = macb_get_link_ksettings,
.set_link_ksettings = macb_set_link_ksettings,
.get_ringparam = macb_get_ringparam,
@@ -5066,6 +5180,11 @@ static int macb_probe(struct platform_de
@@ -5067,6 +5181,11 @@ static int macb_probe(struct platform_de
}
}
}
@ -367,7 +367,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
spin_lock_init(&bp->lock);
spin_lock_init(&bp->stats_lock);
@@ -5126,6 +5245,21 @@ static int macb_probe(struct platform_de
@@ -5127,6 +5246,21 @@ static int macb_probe(struct platform_de
else
bp->phy_interface = interface;
@ -389,7 +389,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* IP specific init */
err = init(pdev);
if (err)
@@ -5202,6 +5336,19 @@ static int macb_remove(struct platform_d
@@ -5203,6 +5337,19 @@ static int macb_remove(struct platform_d
return 0;
}
@ -409,7 +409,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static int __maybe_unused macb_suspend(struct device *dev)
{
struct net_device *netdev = dev_get_drvdata(dev);
@@ -5416,6 +5563,7 @@ static const struct dev_pm_ops macb_pm_o
@@ -5417,6 +5564,7 @@ static const struct dev_pm_ops macb_pm_o
static struct platform_driver macb_driver = {
.probe = macb_probe,
.remove = macb_remove,

View file

@ -160,9 +160,9 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#include <linux/list.h>
#include <linux/log2.h>
#include <linux/module.h>
@@ -48,10 +49,23 @@
@@ -47,10 +48,23 @@
#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY 0x04dc
#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK 0xc00
+#define PCIE_RC_TL_VDM_CTL0 0x0a20
+#define PCIE_RC_TL_VDM_CTL0_VDM_ENABLED_MASK 0x10000
@ -184,7 +184,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MISC_MISC_CTRL 0x4008
#define PCIE_MISC_MISC_CTRL_PCIE_RCB_64B_MODE_MASK 0x80
#define PCIE_MISC_MISC_CTRL_PCIE_RCB_MPS_MODE_MASK 0x400
@@ -74,6 +88,7 @@
@@ -73,6 +87,7 @@
#define PCIE_MISC_RC_BAR1_CONFIG_LO 0x402c
#define PCIE_MISC_RC_BAR1_CONFIG_LO_SIZE_MASK 0x1f
@ -192,7 +192,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MISC_RC_BAR2_CONFIG_LO 0x4034
#define PCIE_MISC_RC_BAR2_CONFIG_LO_SIZE_MASK 0x1f
@@ -81,6 +96,7 @@
@@ -80,6 +95,7 @@
#define PCIE_MISC_RC_BAR3_CONFIG_LO 0x403c
#define PCIE_MISC_RC_BAR3_CONFIG_LO_SIZE_MASK 0x1f
@ -200,7 +200,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MISC_MSI_BAR_CONFIG_LO 0x4044
#define PCIE_MISC_MSI_BAR_CONFIG_HI 0x4048
@@ -89,12 +105,15 @@
@@ -88,12 +104,15 @@
#define PCIE_MISC_MSI_DATA_CONFIG_VAL_32 0xffe06540
#define PCIE_MISC_MSI_DATA_CONFIG_VAL_8 0xfff86540
@ -216,7 +216,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MISC_PCIE_STATUS_PCIE_DL_ACTIVE_MASK 0x20
#define PCIE_MISC_PCIE_STATUS_PCIE_PHYLINKUP_MASK 0x10
#define PCIE_MISC_PCIE_STATUS_PCIE_LINK_IN_L23_MASK 0x40
@@ -119,14 +138,73 @@
@@ -118,14 +137,73 @@
#define PCIE_MEM_WIN0_LIMIT_HI(win) \
PCIE_MISC_CPU_2_PCIE_MEM_WIN0_LIMIT_HI + ((win) * 8)
@ -292,7 +292,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MSI_INTR2_BASE 0x4500
/* Offsets from PCIE_INTR2_CPU_BASE and PCIE_MSI_INTR2_BASE */
#define MSI_INT_STATUS 0x0
@@ -200,6 +278,8 @@ enum {
@@ -199,6 +277,8 @@ enum {
RGR1_SW_INIT_1,
EXT_CFG_INDEX,
EXT_CFG_DATA,
@ -301,7 +301,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
enum {
@@ -214,6 +294,7 @@ enum pcie_type {
@@ -213,6 +293,7 @@ enum pcie_type {
BCM4908,
BCM7278,
BCM2711,
@ -309,7 +309,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
struct pcie_cfg_data {
@@ -221,6 +302,7 @@ struct pcie_cfg_data {
@@ -220,6 +301,7 @@ struct pcie_cfg_data {
const enum pcie_type type;
void (*perst_set)(struct brcm_pcie *pcie, u32 val);
void (*bridge_sw_init_set)(struct brcm_pcie *pcie, u32 val);
@ -317,7 +317,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
struct subdev_regulators {
@@ -237,7 +319,7 @@ struct brcm_msi {
@@ -236,7 +318,7 @@ struct brcm_msi {
struct mutex lock; /* guards the alloc/free operations */
u64 target_addr;
int irq;
@ -326,7 +326,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
bool legacy;
/* Some chips have MSIs in bits [31..24] of a shared register. */
int legacy_shift;
@@ -261,11 +343,14 @@ struct brcm_pcie {
@@ -260,11 +342,14 @@ struct brcm_pcie {
enum pcie_type type;
struct reset_control *rescal;
struct reset_control *perst_reset;
@ -341,7 +341,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
struct subdev_regulators *sr;
bool ep_wakeup_capable;
};
@@ -376,6 +461,35 @@ static int brcm_pcie_set_ssc(struct brcm
@@ -375,6 +460,35 @@ static int brcm_pcie_set_ssc(struct brcm
return ssc && pll ? 0 : -EIO;
}
@ -377,7 +377,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* Limits operation to a specific generation (1, 2, or 3) */
static void brcm_pcie_set_gen(struct brcm_pcie *pcie, int gen)
{
@@ -433,6 +547,97 @@ static void brcm_pcie_set_outbound_win(s
@@ -432,6 +546,97 @@ static void brcm_pcie_set_outbound_win(s
writel(tmp, pcie->base + PCIE_MEM_WIN0_LIMIT_HI(win));
}
@ -475,7 +475,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static struct irq_chip brcm_msi_irq_chip = {
.name = "BRCM STB PCIe MSI",
.irq_ack = irq_chip_ack_parent,
@@ -449,7 +654,7 @@ static struct msi_domain_info brcm_msi_d
@@ -448,7 +653,7 @@ static struct msi_domain_info brcm_msi_d
static void brcm_pcie_msi_isr(struct irq_desc *desc)
{
struct irq_chip *chip = irq_desc_get_chip(desc);
@ -484,7 +484,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
struct brcm_msi *msi;
struct device *dev;
u32 bit;
@@ -461,10 +666,22 @@ static void brcm_pcie_msi_isr(struct irq
@@ -460,10 +665,22 @@ static void brcm_pcie_msi_isr(struct irq
status = readl(msi->intr_base + MSI_INT_STATUS);
status >>= msi->legacy_shift;
@ -511,7 +511,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
dev_dbg(dev, "unexpected MSI\n");
}
@@ -477,7 +694,7 @@ static void brcm_msi_compose_msi_msg(str
@@ -476,7 +693,7 @@ static void brcm_msi_compose_msi_msg(str
msg->address_lo = lower_32_bits(msi->target_addr);
msg->address_hi = upper_32_bits(msi->target_addr);
@ -520,7 +520,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
static int brcm_msi_set_affinity(struct irq_data *irq_data,
@@ -489,7 +706,7 @@ static int brcm_msi_set_affinity(struct
@@ -488,7 +705,7 @@ static int brcm_msi_set_affinity(struct
static void brcm_msi_ack_irq(struct irq_data *data)
{
struct brcm_msi *msi = irq_data_get_irq_chip_data(data);
@ -529,7 +529,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
writel(1 << shift_amt, msi->intr_base + MSI_INT_CLR);
}
@@ -650,7 +867,7 @@ static int brcm_pcie_enable_msi(struct b
@@ -649,7 +866,7 @@ static int brcm_pcie_enable_msi(struct b
msi->legacy_shift = 24;
} else {
msi->intr_base = msi->base + PCIE_MSI_INTR2_BASE;
@ -538,7 +538,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
msi->legacy_shift = 0;
}
@@ -667,7 +884,7 @@ static int brcm_pcie_enable_msi(struct b
@@ -666,7 +883,7 @@ static int brcm_pcie_enable_msi(struct b
}
/* The controller is capable of serving in both RC and EP roles */
@ -547,7 +547,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
{
void __iomem *base = pcie->base;
u32 val = readl(base + PCIE_MISC_PCIE_STATUS);
@@ -675,6 +892,14 @@ static bool brcm_pcie_rc_mode(struct brc
@@ -674,6 +891,14 @@ static bool brcm_pcie_rc_mode(struct brc
return !!FIELD_GET(PCIE_MISC_PCIE_STATUS_PCIE_PORT_MASK, val);
}
@ -562,7 +562,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static bool brcm_pcie_link_up(struct brcm_pcie *pcie)
{
u32 val = readl(pcie->base + PCIE_MISC_PCIE_STATUS);
@@ -746,6 +971,18 @@ static void brcm_pcie_bridge_sw_init_set
@@ -745,6 +970,18 @@ static void brcm_pcie_bridge_sw_init_set
writel(tmp, pcie->base + PCIE_RGR1_SW_INIT_1(pcie));
}
@ -581,7 +581,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void brcm_pcie_perst_set_4908(struct brcm_pcie *pcie, u32 val)
{
if (WARN_ONCE(!pcie->perst_reset, "missing PERST# reset controller\n"))
@@ -767,6 +1004,16 @@ static void brcm_pcie_perst_set_7278(str
@@ -766,6 +1003,16 @@ static void brcm_pcie_perst_set_7278(str
writel(tmp, pcie->base + PCIE_MISC_PCIE_CTRL);
}
@ -598,7 +598,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void brcm_pcie_perst_set_generic(struct brcm_pcie *pcie, u32 val)
{
u32 tmp;
@@ -793,6 +1040,8 @@ static int brcm_pcie_get_rc_bar2_size_an
@@ -792,6 +1039,8 @@ static int brcm_pcie_get_rc_bar2_size_an
size += entry->res->end - entry->res->start + 1;
if (pcie_beg < lowest_pcie_addr)
lowest_pcie_addr = pcie_beg;
@ -607,7 +607,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
if (lowest_pcie_addr == ~(u64)0) {
@@ -863,6 +1112,30 @@ static int brcm_pcie_get_rc_bar2_size_an
@@ -862,6 +1111,30 @@ static int brcm_pcie_get_rc_bar2_size_an
return 0;
}
@ -638,16 +638,16 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static int brcm_pcie_setup(struct brcm_pcie *pcie)
{
u64 rc_bar2_offset, rc_bar2_size;
@@ -871,7 +1144,7 @@ static int brcm_pcie_setup(struct brcm_p
@@ -870,7 +1143,7 @@ static int brcm_pcie_setup(struct brcm_p
struct resource_entry *entry;
u32 tmp, burst, aspm_support;
u32 tmp, burst;
int num_out_wins = 0;
- int ret, memc;
+ int ret, memc, count, i;
/* Reset the bridge */
pcie->bridge_sw_init_set(pcie, 1);
@@ -894,6 +1167,17 @@ static int brcm_pcie_setup(struct brcm_p
@@ -893,6 +1166,17 @@ static int brcm_pcie_setup(struct brcm_p
/* Wait for SerDes to be stable */
usleep_range(100, 200);
@ -665,7 +665,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/*
* SCB_MAX_BURST_SIZE is a two bit field. For GENERIC chips it
* is encoded as 0=128, 1=256, 2=512, 3=Rsvd, for BCM7278 it
@@ -903,6 +1187,8 @@ static int brcm_pcie_setup(struct brcm_p
@@ -902,6 +1186,8 @@ static int brcm_pcie_setup(struct brcm_p
burst = 0x1; /* 256 bytes */
else if (pcie->type == BCM2711)
burst = 0x0; /* 128 bytes */
@ -674,7 +674,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
else if (pcie->type == BCM7278)
burst = 0x3; /* 512 bytes */
else
@@ -920,6 +1206,8 @@ static int brcm_pcie_setup(struct brcm_p
@@ -919,6 +1205,8 @@ static int brcm_pcie_setup(struct brcm_p
u32p_replace_bits(&tmp, 1, PCIE_MISC_MISC_CTRL_PCIE_RCB_64B_MODE_MASK);
writel(tmp, base + PCIE_MISC_MISC_CTRL);
@ -683,7 +683,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
ret = brcm_pcie_get_rc_bar2_size_and_offset(pcie, &rc_bar2_size,
&rc_bar2_offset);
if (ret)
@@ -932,7 +1220,11 @@ static int brcm_pcie_setup(struct brcm_p
@@ -931,7 +1219,11 @@ static int brcm_pcie_setup(struct brcm_p
writel(upper_32_bits(rc_bar2_offset),
base + PCIE_MISC_RC_BAR2_CONFIG_HI);
@ -695,7 +695,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
for (memc = 0; memc < pcie->num_memc; memc++) {
u32 scb_size_val = ilog2(pcie->memc_size[memc]) - 15;
@@ -943,8 +1235,32 @@ static int brcm_pcie_setup(struct brcm_p
@@ -942,8 +1234,32 @@ static int brcm_pcie_setup(struct brcm_p
else if (memc == 2)
u32p_replace_bits(&tmp, scb_size_val, SCB_SIZE_MASK(2));
}
@ -728,7 +728,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/*
* We ideally want the MSI target address to be located in the 32bit
* addressable memory area. Some devices might depend on it. This is
@@ -957,7 +1273,7 @@ static int brcm_pcie_setup(struct brcm_p
@@ -956,7 +1272,7 @@ static int brcm_pcie_setup(struct brcm_p
else
pcie->msi_target_addr = BRCM_MSI_TARGET_ADDR_GT_4GB;
@ -737,8 +737,8 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
dev_err(pcie->dev, "PCIe RC controller misconfigured as Endpoint\n");
return -EINVAL;
}
@@ -981,6 +1297,38 @@ static int brcm_pcie_setup(struct brcm_p
PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK);
@@ -977,6 +1293,38 @@ static int brcm_pcie_setup(struct brcm_p
tmp &= ~PCI_EXP_LNKCAP_ASPM_L0S;
writel(tmp, base + PCIE_RC_CFG_PRIV1_LINK_CAPABILITY);
+ /* program additional inbound windows (RC_BAR4..RC_BAR10) */
@ -776,7 +776,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/*
* For config space accesses on the RC, show the right class for
* a PCIe-PCIe bridge (the default setting is to be EP mode).
@@ -1036,7 +1384,6 @@ static int brcm_pcie_start_link(struct b
@@ -1032,7 +1380,6 @@ static int brcm_pcie_start_link(struct b
void __iomem *base = pcie->base;
u16 nlw, cls, lnksta;
bool ssc_good = false;
@ -784,7 +784,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
int ret, i;
/* Unassert the fundamental reset */
@@ -1072,6 +1419,7 @@ static int brcm_pcie_start_link(struct b
@@ -1068,6 +1415,7 @@ static int brcm_pcie_start_link(struct b
dev_err(dev, "failed attempt to enter ssc mode\n");
}
@ -792,7 +792,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
lnksta = readw(base + BRCM_PCIE_CAP_REGS + PCI_EXP_LNKSTA);
cls = FIELD_GET(PCI_EXP_LNKSTA_CLS, lnksta);
nlw = FIELD_GET(PCI_EXP_LNKSTA_NLW, lnksta);
@@ -1079,27 +1427,6 @@ static int brcm_pcie_start_link(struct b
@@ -1075,27 +1423,6 @@ static int brcm_pcie_start_link(struct b
pci_speed_string(pcie_link_speed[cls]), nlw,
ssc_good ? "(SSC)" : "(!SSC)");
@ -820,7 +820,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
return 0;
}
@@ -1208,6 +1535,7 @@ static void brcm_pcie_enter_l23(struct b
@@ -1204,6 +1531,7 @@ static void brcm_pcie_enter_l23(struct b
static int brcm_phy_cntl(struct brcm_pcie *pcie, const int start)
{
@ -828,7 +828,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static const u32 shifts[PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_NFLDS] = {
PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_PWRDN_SHIFT,
PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_RESET_SHIFT,
@@ -1240,6 +1568,9 @@ static int brcm_phy_cntl(struct brcm_pci
@@ -1236,6 +1564,9 @@ static int brcm_phy_cntl(struct brcm_pci
dev_err(pcie->dev, "failed to %s phy\n", (start ? "start" : "stop"));
return ret;
@ -838,7 +838,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
static inline int brcm_phy_start(struct brcm_pcie *pcie)
@@ -1272,6 +1603,12 @@ static void brcm_pcie_turn_off(struct br
@@ -1268,6 +1599,12 @@ static void brcm_pcie_turn_off(struct br
u32p_replace_bits(&tmp, 1, PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK);
writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
@ -851,7 +851,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* Shutdown PCIe bridge */
pcie->bridge_sw_init_set(pcie, 1);
}
@@ -1302,9 +1639,9 @@ static int brcm_pcie_suspend_noirq(struc
@@ -1298,9 +1635,9 @@ static int brcm_pcie_suspend_noirq(struc
if (brcm_phy_stop(pcie))
dev_err(dev, "Could not stop phy for suspend\n");
@ -863,7 +863,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
return ret;
}
@@ -1399,7 +1736,7 @@ err_regulator:
@@ -1395,7 +1732,7 @@ err_regulator:
if (pcie->sr)
regulator_bulk_disable(pcie->sr->num_supplies, pcie->sr->supplies);
err_reset:
@ -872,7 +872,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
err_disable_clk:
clk_disable_unprepare(pcie->clk);
return ret;
@@ -1411,8 +1748,8 @@ static void __brcm_pcie_remove(struct br
@@ -1407,8 +1744,8 @@ static void __brcm_pcie_remove(struct br
brcm_pcie_turn_off(pcie);
if (brcm_phy_stop(pcie))
dev_err(pcie->dev, "Could not stop phy\n");
@ -883,7 +883,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
clk_disable_unprepare(pcie->clk);
}
@@ -1430,12 +1767,16 @@ static const int pcie_offsets[] = {
@@ -1426,12 +1763,16 @@ static const int pcie_offsets[] = {
[RGR1_SW_INIT_1] = 0x9210,
[EXT_CFG_INDEX] = 0x9000,
[EXT_CFG_DATA] = 0x9004,
@ -900,7 +900,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static const struct pcie_cfg_data generic_cfg = {
@@ -1443,6 +1784,7 @@ static const struct pcie_cfg_data generi
@@ -1439,6 +1780,7 @@ static const struct pcie_cfg_data generi
.type = GENERIC,
.perst_set = brcm_pcie_perst_set_generic,
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
@ -908,7 +908,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static const struct pcie_cfg_data bcm7425_cfg = {
@@ -1450,6 +1792,7 @@ static const struct pcie_cfg_data bcm742
@@ -1446,6 +1788,7 @@ static const struct pcie_cfg_data bcm742
.type = BCM7425,
.perst_set = brcm_pcie_perst_set_generic,
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
@ -916,7 +916,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static const struct pcie_cfg_data bcm7435_cfg = {
@@ -1464,12 +1807,15 @@ static const struct pcie_cfg_data bcm490
@@ -1460,12 +1803,15 @@ static const struct pcie_cfg_data bcm490
.type = BCM4908,
.perst_set = brcm_pcie_perst_set_4908,
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
@ -932,7 +932,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static const struct pcie_cfg_data bcm7278_cfg = {
@@ -1477,6 +1823,7 @@ static const struct pcie_cfg_data bcm727
@@ -1473,6 +1819,7 @@ static const struct pcie_cfg_data bcm727
.type = BCM7278,
.perst_set = brcm_pcie_perst_set_7278,
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_7278,
@ -940,7 +940,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static const struct pcie_cfg_data bcm2711_cfg = {
@@ -1484,10 +1831,27 @@ static const struct pcie_cfg_data bcm271
@@ -1480,10 +1827,27 @@ static const struct pcie_cfg_data bcm271
.type = BCM2711,
.perst_set = brcm_pcie_perst_set_generic,
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
@ -968,7 +968,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
{ .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg },
{ .compatible = "brcm,bcm7211-pcie", .data = &generic_cfg },
{ .compatible = "brcm,bcm7278-pcie", .data = &bcm7278_cfg },
@@ -1528,7 +1892,7 @@ static int brcm_pcie_probe(struct platfo
@@ -1524,7 +1888,7 @@ static int brcm_pcie_probe(struct platfo
data = of_device_get_match_data(&pdev->dev);
if (!data) {
@ -977,7 +977,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
return -EINVAL;
}
@@ -1539,6 +1903,7 @@ static int brcm_pcie_probe(struct platfo
@@ -1535,6 +1899,7 @@ static int brcm_pcie_probe(struct platfo
pcie->type = data->type;
pcie->perst_set = data->perst_set;
pcie->bridge_sw_init_set = data->bridge_sw_init_set;
@ -985,7 +985,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
pcie->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pcie->base))
@@ -1569,14 +1934,20 @@ static int brcm_pcie_probe(struct platfo
@@ -1565,14 +1930,20 @@ static int brcm_pcie_probe(struct platfo
clk_disable_unprepare(pcie->clk);
return PTR_ERR(pcie->perst_reset);
}
@ -1008,7 +1008,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
clk_disable_unprepare(pcie->clk);
return ret;
}
@@ -1595,8 +1966,38 @@ static int brcm_pcie_probe(struct platfo
@@ -1591,8 +1962,38 @@ static int brcm_pcie_probe(struct platfo
if (pci_msi_enabled()) {
struct device_node *msi_np = of_parse_phandle(pcie->np, "msi-parent", 0);
@ -1048,7 +1048,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
of_node_put(msi_np);
@@ -1620,6 +2021,8 @@ static int brcm_pcie_probe(struct platfo
@@ -1616,6 +2017,8 @@ static int brcm_pcie_probe(struct platfo
return ret;
}

View file

@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -124,7 +124,9 @@
@@ -125,7 +125,9 @@
#define DW_IC_ERR_TX_ABRT 0x1
@ -29,7 +29,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define DW_IC_COMP_PARAM_1_SPEED_MODE_MASK GENMASK(3, 2)
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -229,6 +229,10 @@ static void i2c_dw_xfer_init(struct dw_i
@@ -236,6 +236,10 @@ static void i2c_dw_xfer_init(struct dw_i
ic_tar = DW_IC_TAR_10BITADDR_MASTER;
}
@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
regmap_update_bits(dev->map, DW_IC_CON, DW_IC_CON_10BITADDR_MASTER,
ic_con);
@@ -501,6 +505,14 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
@@ -508,6 +512,14 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
regmap_read(dev->map, DW_IC_RXFLR, &flr);
rx_limit = dev->rx_fifo_depth - flr;
@ -55,7 +55,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
while (buf_len > 0 && tx_limit > 0 && rx_limit > 0) {
u32 cmd = 0;
@@ -782,7 +794,7 @@ static const struct i2c_algorithm i2c_dw
@@ -789,7 +801,7 @@ static const struct i2c_algorithm i2c_dw
};
static const struct i2c_adapter_quirks i2c_dw_quirks = {
@ -64,7 +64,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
};
static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev)
@@ -915,7 +927,8 @@ void i2c_dw_configure_master(struct dw_i
@@ -922,7 +934,8 @@ void i2c_dw_configure_master(struct dw_i
{
struct i2c_timings *t = &dev->timings;

View file

@ -53,7 +53,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
/* L2 intc private data structure */
struct brcmstb_l2_intc_data {
struct irq_domain *domain;
@@ -288,11 +298,18 @@ static int __init brcmstb_l2_lvl_intc_of
@@ -284,11 +294,18 @@ static int brcmstb_l2_lvl_intc_of_init(s
return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init);
}

View file

@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -336,6 +336,7 @@ struct brcm_pcie {
@@ -335,6 +335,7 @@ struct brcm_pcie {
struct device_node *np;
bool ssc;
bool l1ss;
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int gen;
u64 msi_target_addr;
struct brcm_msi *msi;
@@ -1196,14 +1197,14 @@ static int brcm_pcie_setup(struct brcm_p
@@ -1195,14 +1196,14 @@ static int brcm_pcie_setup(struct brcm_p
/*
* Set SCB_MAX_BURST_SIZE, CFG_READ_UR_MODE, SCB_ACCESS_EN,
@ -45,7 +45,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
writel(tmp, base + PCIE_MISC_MISC_CTRL);
brcm_pcie_set_tc_qos(pcie);
@@ -1918,6 +1919,7 @@ static int brcm_pcie_probe(struct platfo
@@ -1914,6 +1915,7 @@ static int brcm_pcie_probe(struct platfo
pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");
pcie->l1ss = of_property_read_bool(np, "brcm,enable-l1ss");

View file

@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -140,6 +140,7 @@
@@ -139,6 +139,7 @@
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG pcie->reg_offsets[PCIE_HARD_DEBUG]
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK 0x2
@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x08000000
#define PCIE_BMIPS_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x00800000
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_L1SS_ENABLE_MASK 0x00200000
@@ -354,6 +355,7 @@ struct brcm_pcie {
@@ -353,6 +354,7 @@ struct brcm_pcie {
bool (*rc_mode)(struct brcm_pcie *pcie);
struct subdev_regulators *sr;
bool ep_wakeup_capable;
@ -31,7 +31,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
};
static inline bool is_bmips(const struct brcm_pcie *pcie)
@@ -1386,9 +1388,28 @@ static int brcm_pcie_start_link(struct b
@@ -1382,9 +1384,28 @@ static int brcm_pcie_start_link(struct b
u16 nlw, cls, lnksta;
bool ssc_good = false;
int ret, i;
@ -61,7 +61,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/*
* Wait for 100ms after PERST# deassertion; see PCIe CEM specification
@@ -1920,6 +1941,7 @@ static int brcm_pcie_probe(struct platfo
@@ -1916,6 +1937,7 @@ static int brcm_pcie_probe(struct platfo
pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");
pcie->l1ss = of_property_read_bool(np, "brcm,enable-l1ss");
pcie->rcb_mps_mode = of_property_read_bool(np, "brcm,enable-mps-rcb");

View file

@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -292,6 +292,7 @@ struct dw_i2c_dev {
@@ -293,6 +293,7 @@ struct dw_i2c_dev {
u16 fp_lcnt;
u16 hs_hcnt;
u16 hs_lcnt;

View file

@ -21,7 +21,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1385,7 +1385,7 @@ static int brcm_pcie_start_link(struct b
@@ -1381,7 +1381,7 @@ static int brcm_pcie_start_link(struct b
{
struct device *dev = pcie->dev;
void __iomem *base = pcie->base;
@ -30,7 +30,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
bool ssc_good = false;
int ret, i;
u32 tmp;
@@ -1449,6 +1449,16 @@ static int brcm_pcie_start_link(struct b
@@ -1445,6 +1445,16 @@ static int brcm_pcie_start_link(struct b
pci_speed_string(pcie_link_speed[cls]), nlw,
ssc_good ? "(SSC)" : "(!SSC)");

View file

@ -18,7 +18,7 @@ Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -199,6 +199,9 @@
@@ -198,6 +198,9 @@
#define VDM_PRIORITY_TO_QOS_MAP_MASK 0xf
#define PCIE_MISC_AXI_INTF_CTRL 0x416C
@ -28,7 +28,7 @@ Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
#define AXI_REQFIFO_EN_QOS_PROPAGATION BIT(7)
#define AXI_BRIDGE_LOW_LATENCY_MODE BIT(6)
#define AXI_MASTER_MAX_OUTSTANDING_REQUESTS_MASK 0x3f
@@ -558,9 +561,11 @@ static void brcm_pcie_set_tc_qos(struct
@@ -557,9 +560,11 @@ static void brcm_pcie_set_tc_qos(struct
if (pcie->type != BCM2712)
return;

View file

@ -26,7 +26,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -147,39 +147,21 @@ static int bcm2835_pwm_probe(struct plat
@@ -125,39 +125,21 @@ static int bcm2835_pwm_probe(struct plat
if (IS_ERR(pc->base))
return PTR_ERR(pc->base);
@ -70,7 +70,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
}
static const struct of_device_id bcm2835_pwm_of_match[] = {
@@ -194,7 +176,6 @@ static struct platform_driver bcm2835_pw
@@ -172,7 +154,6 @@ static struct platform_driver bcm2835_pw
.of_match_table = bcm2835_pwm_of_match,
},
.probe = bcm2835_pwm_probe,

View file

@ -26,7 +26,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
};
static inline struct bcm2835_pwm *to_bcm2835_pwm(struct pwm_chip *chip)
@@ -63,17 +64,11 @@ static int bcm2835_pwm_apply(struct pwm_
@@ -40,17 +41,11 @@ static int bcm2835_pwm_apply(struct pwm_
{
struct bcm2835_pwm *pc = to_bcm2835_pwm(chip);
@ -44,7 +44,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
/*
* period_cycles must be a 32 bit value, so period * rate / NSEC_PER_SEC
* must be <= U32_MAX. As U32_MAX * NSEC_PER_SEC < U64_MAX the
@@ -88,13 +83,13 @@ static int bcm2835_pwm_apply(struct pwm_
@@ -65,13 +60,13 @@ static int bcm2835_pwm_apply(struct pwm_
* <=> period < ((U32_MAX * NSEC_PER_SEC + NSEC_PER_SEC/2) / rate
* <=> period <= ceil((U32_MAX * NSEC_PER_SEC + NSEC_PER_SEC/2) / rate) - 1
*/
@ -60,7 +60,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
/* don't accept a period that is too small */
if (period_cycles < PERIOD_MIN)
@@ -103,7 +98,7 @@ static int bcm2835_pwm_apply(struct pwm_
@@ -80,7 +75,7 @@ static int bcm2835_pwm_apply(struct pwm_
writel(period_cycles, pc->base + PERIOD(pwm->hwpwm));
/* set duty cycle */
@ -69,7 +69,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
writel(val, pc->base + DUTY(pwm->hwpwm));
/* set polarity */
@@ -132,6 +127,13 @@ static const struct pwm_ops bcm2835_pwm_
@@ -110,6 +105,13 @@ static const struct pwm_ops bcm2835_pwm_
.owner = THIS_MODULE,
};
@ -83,7 +83,7 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
static int bcm2835_pwm_probe(struct platform_device *pdev)
{
struct bcm2835_pwm *pc;
@@ -152,8 +154,26 @@ static int bcm2835_pwm_probe(struct plat
@@ -130,8 +132,26 @@ static int bcm2835_pwm_probe(struct plat
return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk),
"clock not found\n");

View file

@ -21,7 +21,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -568,6 +568,18 @@ static void brcm_pcie_set_tc_qos(struct
@@ -567,6 +567,18 @@ static void brcm_pcie_set_tc_qos(struct
AXI_DIS_QOS_GATING_IN_MASTER;
writel(reg, pcie->base + PCIE_MISC_AXI_INTF_CTRL);

View file

@ -28,7 +28,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -507,6 +507,19 @@ void xhci_ring_ep_doorbell(struct xhci_h
@@ -505,6 +505,19 @@ void xhci_ring_ep_doorbell(struct xhci_h
trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id));

View file

@ -28,7 +28,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -721,6 +721,14 @@ void xhci_setup_streams_ep_input_ctx(str
@@ -715,6 +715,14 @@ void xhci_setup_streams_ep_input_ctx(str
ep_ctx->ep_info &= cpu_to_le32(~EP_MAXPSTREAMS_MASK);
ep_ctx->ep_info |= cpu_to_le32(EP_MAXPSTREAMS(max_primary_streams)
| EP_HAS_LSA);

View file

@ -61,10 +61,10 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
}
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -79,9 +79,12 @@
#define DW_IC_TX_ABRT_SOURCE 0x80
@@ -80,9 +80,12 @@
#define DW_IC_ENABLE_STATUS 0x9c
#define DW_IC_CLR_RESTART_DET 0xa8
#define DW_IC_SMBUS_INTR_MASK 0xcc
+#define DW_IC_SCL_STUCK_AT_LOW_TIMEOUT 0xac
+#define DW_IC_SDA_STUCK_AT_LOW_TIMEOUT 0xb0
#define DW_IC_COMP_PARAM_1 0xf4
@ -74,7 +74,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define DW_IC_COMP_TYPE 0xfc
#define DW_IC_COMP_TYPE_VALUE 0x44570140 /* "DW" + 0x0140 */
@@ -111,6 +114,7 @@
@@ -112,6 +115,7 @@
#define DW_IC_ENABLE_ENABLE BIT(0)
#define DW_IC_ENABLE_ABORT BIT(1)
@ -82,7 +82,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define DW_IC_STATUS_ACTIVITY BIT(0)
#define DW_IC_STATUS_TFE BIT(2)
@@ -118,6 +122,7 @@
@@ -119,6 +123,7 @@
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
#define DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY BIT(7)
@ -90,7 +90,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define DW_IC_SDA_HOLD_RX_SHIFT 16
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
@@ -165,6 +170,7 @@
@@ -166,6 +171,7 @@
#define ABRT_SLAVE_FLUSH_TXFIFO 13
#define ABRT_SLAVE_ARBLOST 14
#define ABRT_SLAVE_RD_INTX 15
@ -98,7 +98,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define DW_IC_TX_ABRT_7B_ADDR_NOACK BIT(ABRT_7B_ADDR_NOACK)
#define DW_IC_TX_ABRT_10ADDR1_NOACK BIT(ABRT_10ADDR1_NOACK)
@@ -180,6 +186,7 @@
@@ -181,6 +187,7 @@
#define DW_IC_RX_ABRT_SLAVE_RD_INTX BIT(ABRT_SLAVE_RD_INTX)
#define DW_IC_RX_ABRT_SLAVE_ARBLOST BIT(ABRT_SLAVE_ARBLOST)
#define DW_IC_RX_ABRT_SLAVE_FLUSH_TXFIFO BIT(ABRT_SLAVE_FLUSH_TXFIFO)
@ -116,7 +116,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int ret;
ret = i2c_dw_acquire_lock(dev);
@@ -238,6 +239,17 @@ static int i2c_dw_init_master(struct dw_
@@ -245,6 +246,17 @@ static int i2c_dw_init_master(struct dw_
regmap_write(dev->map, DW_IC_HS_SCL_LCNT, dev->hs_lcnt);
}
@ -134,7 +134,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
/* Write SDA hold time if supported */
if (dev->sda_hold_time)
regmap_write(dev->map, DW_IC_SDA_HOLD, dev->sda_hold_time);
@@ -1050,6 +1062,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
@@ -1057,6 +1069,7 @@ int i2c_dw_probe_master(struct dw_i2c_de
struct i2c_adapter *adap = &dev->adapter;
unsigned long irq_flags;
unsigned int ic_con;
@ -142,7 +142,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int ret;
init_completion(&dev->cmd_complete);
@@ -1084,7 +1097,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
@@ -1091,7 +1104,11 @@ int i2c_dw_probe_master(struct dw_i2c_de
if (ret)
return ret;

View file

@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -5027,6 +5027,17 @@ static const struct macb_config versal_c
@@ -5028,6 +5028,17 @@ static const struct macb_config versal_c
.usrio = &macb_default_usrio,
};
@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
{ .compatible = "cdns,macb" },
@@ -5047,6 +5058,7 @@ static const struct of_device_id macb_dt
@@ -5048,6 +5059,7 @@ static const struct of_device_id macb_dt
{ .compatible = "microchip,mpfs-macb", .data = &mpfs_config },
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
{ .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config },

View file

@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch
#include <linux/uaccess.h>
#include <asm/io.h>
@@ -2227,6 +2229,69 @@ static void b44_adjust_link(struct net_d
@@ -2230,6 +2232,69 @@ static void b44_adjust_link(struct net_d
}
}
@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch
static int b44_register_phy_one(struct b44 *bp)
{
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
@@ -2263,6 +2328,9 @@ static int b44_register_phy_one(struct b
@@ -2266,6 +2331,9 @@ static int b44_register_phy_one(struct b
if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
(sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
dev_info(sdev->dev,
"could not find PHY at %i, use fixed one\n",
bp->phy_addr);
@@ -2457,6 +2525,7 @@ static void b44_remove_one(struct ssb_de
@@ -2460,6 +2528,7 @@ static void b44_remove_one(struct ssb_de
unregister_netdev(dev);
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
b44_unregister_phy_one(bp);

View file

@ -43,7 +43,7 @@
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
return 0;
@@ -2157,6 +2182,8 @@ static int b44_get_invariants(struct b44
@@ -2160,6 +2185,8 @@ static int b44_get_invariants(struct b44
* valid PHY address. */
bp->phy_addr &= 0x1F;

View file

@ -13,7 +13,7 @@ Signed-off-by: Brandon Cheo Fusi <fusibrandon13@gmail.com>
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -104,6 +104,7 @@ static const struct of_device_id allowli
@@ -105,6 +105,7 @@ static const struct of_device_id allowli
*/
static const struct of_device_id blocklist[] __initconst = {
{ .compatible = "allwinner,sun50i-h6", },

View file

@ -26,7 +26,7 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -145,6 +145,29 @@ static inline void __chk_io_ptr(const vo
@@ -158,6 +158,29 @@ static inline void __chk_io_ptr(const vo
#define __has_builtin(x) (0)
#endif

View file

@ -1,75 +0,0 @@
From 56364c910691f6d10ba88c964c9041b9ab777bd6 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 25 Mar 2024 08:40:28 +0100
Subject: [PATCH 1/4] net: Remove conditional threaded-NAPI wakeup based on
task state.
A NAPI thread is scheduled by first setting NAPI_STATE_SCHED bit. If
successful (the bit was not yet set) then the NAPI_STATE_SCHED_THREADED
is set but only if thread's state is not TASK_INTERRUPTIBLE (is
TASK_RUNNING) followed by task wakeup.
If the task is idle (TASK_INTERRUPTIBLE) then the
NAPI_STATE_SCHED_THREADED bit is not set. The thread is no relying on
the bit but always leaving the wait-loop after returning from schedule()
because there must have been a wakeup.
The smpboot-threads implementation for per-CPU threads requires an
explicit condition and does not support "if we get out of schedule()
then there must be something to do".
Removing this optimisation simplifies the following integration.
Set NAPI_STATE_SCHED_THREADED unconditionally on wakeup and rely on it
in the wait path by removing the `woken' condition.
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/core/dev.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4526,13 +4526,7 @@ static inline void ____napi_schedule(str
*/
thread = READ_ONCE(napi->thread);
if (thread) {
- /* Avoid doing set_bit() if the thread is in
- * INTERRUPTIBLE state, cause napi_thread_wait()
- * makes sure to proceed with napi polling
- * if the thread is explicitly woken from here.
- */
- if (READ_ONCE(thread->__state) != TASK_INTERRUPTIBLE)
- set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
+ set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
wake_up_process(thread);
return;
}
@@ -6688,8 +6682,6 @@ static int napi_poll(struct napi_struct
static int napi_thread_wait(struct napi_struct *napi)
{
- bool woken = false;
-
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
@@ -6698,15 +6690,13 @@ static int napi_thread_wait(struct napi_
* Testing SCHED bit is not enough because SCHED bit might be
* set by some other busy poll thread or by napi_disable().
*/
- if (test_bit(NAPI_STATE_SCHED_THREADED, &napi->state) || woken) {
+ if (test_bit(NAPI_STATE_SCHED_THREADED, &napi->state)) {
WARN_ON(!list_empty(&napi->poll_list));
__set_current_state(TASK_RUNNING);
return 0;
}
schedule();
- /* woken being true indicates this thread owns this napi. */
- woken = true;
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);

View file

@ -1,330 +0,0 @@
From dad6b97702639fba27a2bd3e986982ad6f0db3a7 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 25 Mar 2024 08:40:29 +0100
Subject: [PATCH 2/4] net: Allow to use SMP threads for backlog NAPI.
Backlog NAPI is a per-CPU NAPI struct only (with no device behind it)
used by drivers which don't do NAPI them self, RPS and parts of the
stack which need to avoid recursive deadlocks while processing a packet.
The non-NAPI driver use the CPU local backlog NAPI. If RPS is enabled
then a flow for the skb is computed and based on the flow the skb can be
enqueued on a remote CPU. Scheduling/ raising the softirq (for backlog's
NAPI) on the remote CPU isn't trivial because the softirq is only
scheduled on the local CPU and performed after the hardirq is done.
In order to schedule a softirq on the remote CPU, an IPI is sent to the
remote CPU which schedules the backlog-NAPI on the then local CPU.
On PREEMPT_RT interrupts are force-threaded. The soft interrupts are
raised within the interrupt thread and processed after the interrupt
handler completed still within the context of the interrupt thread. The
softirq is handled in the context where it originated.
With force-threaded interrupts enabled, ksoftirqd is woken up if a
softirq is raised from hardirq context. This is the case if it is raised
from an IPI. Additionally there is a warning on PREEMPT_RT if the
softirq is raised from the idle thread.
This was done for two reasons:
- With threaded interrupts the processing should happen in thread
context (where it originated) and ksoftirqd is the only thread for
this context if raised from hardirq. Using the currently running task
instead would "punish" a random task.
- Once ksoftirqd is active it consumes all further softirqs until it
stops running. This changed recently and is no longer the case.
Instead of keeping the backlog NAPI in ksoftirqd (in force-threaded/
PREEMPT_RT setups) I am proposing NAPI-threads for backlog.
The "proper" setup with threaded-NAPI is not doable because the threads
are not pinned to an individual CPU and can be modified by the user.
Additionally a dummy network device would have to be assigned. Also
CPU-hotplug has to be considered if additional CPUs show up.
All this can be probably done/ solved but the smpboot-threads already
provide this infrastructure.
Sending UDP packets over loopback expects that the packet is processed
within the call. Delaying it by handing it over to the thread hurts
performance. It is not beneficial to the outcome if the context switch
happens immediately after enqueue or after a while to process a few
packets in a batch.
There is no need to always use the thread if the backlog NAPI is
requested on the local CPU. This restores the loopback throuput. The
performance drops mostly to the same value after enabling RPS on the
loopback comparing the IPI and the tread result.
Create NAPI-threads for backlog if request during boot. The thread runs
the inner loop from napi_threaded_poll(), the wait part is different. It
checks for NAPI_STATE_SCHED (the backlog NAPI can not be disabled).
The NAPI threads for backlog are optional, it has to be enabled via the boot
argument "thread_backlog_napi". It is mandatory for PREEMPT_RT to avoid the
wakeup of ksoftirqd from the IPI.
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/core/dev.c | 148 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 113 insertions(+), 35 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -78,6 +78,7 @@
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
+#include <linux/smpboot.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
#include <linux/string.h>
@@ -217,6 +218,31 @@ static inline struct hlist_head *dev_ind
return &net->dev_index_head[ifindex & (NETDEV_HASHENTRIES - 1)];
}
+#ifndef CONFIG_PREEMPT_RT
+
+static DEFINE_STATIC_KEY_FALSE(use_backlog_threads_key);
+
+static int __init setup_backlog_napi_threads(char *arg)
+{
+ static_branch_enable(&use_backlog_threads_key);
+ return 0;
+}
+early_param("thread_backlog_napi", setup_backlog_napi_threads);
+
+static bool use_backlog_threads(void)
+{
+ return static_branch_unlikely(&use_backlog_threads_key);
+}
+
+#else
+
+static bool use_backlog_threads(void)
+{
+ return true;
+}
+
+#endif
+
static inline void rps_lock_irqsave(struct softnet_data *sd,
unsigned long *flags)
{
@@ -4494,6 +4520,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
/*************************************************************************
* Receiver routines
*************************************************************************/
+static DEFINE_PER_CPU(struct task_struct *, backlog_napi);
int netdev_max_backlog __read_mostly = 1000;
EXPORT_SYMBOL(netdev_max_backlog);
@@ -4526,12 +4553,16 @@ static inline void ____napi_schedule(str
*/
thread = READ_ONCE(napi->thread);
if (thread) {
+ if (use_backlog_threads() && thread == raw_cpu_read(backlog_napi))
+ goto use_local_napi;
+
set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
wake_up_process(thread);
return;
}
}
+use_local_napi:
list_add_tail(&napi->poll_list, &sd->poll_list);
WRITE_ONCE(napi->list_owner, smp_processor_id());
/* If not called from net_rx_action()
@@ -4777,6 +4808,11 @@ static void napi_schedule_rps(struct sof
#ifdef CONFIG_RPS
if (sd != mysd) {
+ if (use_backlog_threads()) {
+ __napi_schedule_irqoff(&sd->backlog);
+ return;
+ }
+
sd->rps_ipi_next = mysd->rps_ipi_list;
mysd->rps_ipi_list = sd;
@@ -6000,7 +6036,7 @@ static void net_rps_action_and_irq_enabl
#ifdef CONFIG_RPS
struct softnet_data *remsd = sd->rps_ipi_list;
- if (remsd) {
+ if (!use_backlog_threads() && remsd) {
sd->rps_ipi_list = NULL;
local_irq_enable();
@@ -6015,7 +6051,7 @@ static void net_rps_action_and_irq_enabl
static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
{
#ifdef CONFIG_RPS
- return sd->rps_ipi_list != NULL;
+ return !use_backlog_threads() && sd->rps_ipi_list;
#else
return false;
#endif
@@ -6059,7 +6095,7 @@ static int process_backlog(struct napi_s
* We can use a plain write instead of clear_bit(),
* and we dont need an smp_mb() memory barrier.
*/
- napi->state = 0;
+ napi->state &= NAPIF_STATE_THREADED;
again = false;
} else {
skb_queue_splice_tail_init(&sd->input_pkt_queue,
@@ -6725,43 +6761,48 @@ static void skb_defer_free_flush(struct
}
}
-static int napi_threaded_poll(void *data)
+static void napi_threaded_poll_loop(struct napi_struct *napi)
{
- struct napi_struct *napi = data;
struct softnet_data *sd;
- void *have;
+ unsigned long last_qs = jiffies;
- while (!napi_thread_wait(napi)) {
- unsigned long last_qs = jiffies;
+ for (;;) {
+ bool repoll = false;
+ void *have;
- for (;;) {
- bool repoll = false;
+ local_bh_disable();
+ sd = this_cpu_ptr(&softnet_data);
+ sd->in_napi_threaded_poll = true;
- local_bh_disable();
- sd = this_cpu_ptr(&softnet_data);
- sd->in_napi_threaded_poll = true;
-
- have = netpoll_poll_lock(napi);
- __napi_poll(napi, &repoll);
- netpoll_poll_unlock(have);
-
- sd->in_napi_threaded_poll = false;
- barrier();
-
- if (sd_has_rps_ipi_waiting(sd)) {
- local_irq_disable();
- net_rps_action_and_irq_enable(sd);
- }
- skb_defer_free_flush(sd);
- local_bh_enable();
+ have = netpoll_poll_lock(napi);
+ __napi_poll(napi, &repoll);
+ netpoll_poll_unlock(have);
+
+ sd->in_napi_threaded_poll = false;
+ barrier();
+
+ if (sd_has_rps_ipi_waiting(sd)) {
+ local_irq_disable();
+ net_rps_action_and_irq_enable(sd);
+ }
+ skb_defer_free_flush(sd);
+ local_bh_enable();
- if (!repoll)
- break;
+ if (!repoll)
+ break;
- rcu_softirq_qs_periodic(last_qs);
- cond_resched();
- }
+ rcu_softirq_qs_periodic(last_qs);
+ cond_resched();
}
+}
+
+static int napi_threaded_poll(void *data)
+{
+ struct napi_struct *napi = data;
+
+ while (!napi_thread_wait(napi))
+ napi_threaded_poll_loop(napi);
+
return 0;
}
@@ -11346,7 +11387,7 @@ static int dev_cpu_dead(unsigned int old
list_del_init(&napi->poll_list);
if (napi->poll == process_backlog)
- napi->state = 0;
+ napi->state &= NAPIF_STATE_THREADED;
else
____napi_schedule(sd, napi);
}
@@ -11354,12 +11395,14 @@ static int dev_cpu_dead(unsigned int old
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable();
+ if (!use_backlog_threads()) {
#ifdef CONFIG_RPS
- remsd = oldsd->rps_ipi_list;
- oldsd->rps_ipi_list = NULL;
+ remsd = oldsd->rps_ipi_list;
+ oldsd->rps_ipi_list = NULL;
#endif
- /* send out pending IPI's on offline CPU */
- net_rps_send_ipi(remsd);
+ /* send out pending IPI's on offline CPU */
+ net_rps_send_ipi(remsd);
+ }
/* Process offline CPU's input_pkt_queue */
while ((skb = __skb_dequeue(&oldsd->process_queue))) {
@@ -11622,6 +11665,38 @@ static struct pernet_operations __net_in
*
*/
+static int backlog_napi_should_run(unsigned int cpu)
+{
+ struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
+ struct napi_struct *napi = &sd->backlog;
+
+ return test_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
+}
+
+static void run_backlog_napi(unsigned int cpu)
+{
+ struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
+
+ napi_threaded_poll_loop(&sd->backlog);
+}
+
+static void backlog_napi_setup(unsigned int cpu)
+{
+ struct softnet_data *sd = per_cpu_ptr(&softnet_data, cpu);
+ struct napi_struct *napi = &sd->backlog;
+
+ napi->thread = this_cpu_read(backlog_napi);
+ set_bit(NAPI_STATE_THREADED, &napi->state);
+}
+
+static struct smp_hotplug_thread backlog_threads = {
+ .store = &backlog_napi,
+ .thread_should_run = backlog_napi_should_run,
+ .thread_fn = run_backlog_napi,
+ .thread_comm = "backlog_napi/%u",
+ .setup = backlog_napi_setup,
+};
+
/*
* This is called single threaded during boot, so no need
* to take the rtnl semaphore.
@@ -11672,7 +11747,10 @@ static int __init net_dev_init(void)
init_gro_hash(&sd->backlog);
sd->backlog.poll = process_backlog;
sd->backlog.weight = weight_p;
+ INIT_LIST_HEAD(&sd->backlog.poll_list);
}
+ if (use_backlog_threads())
+ smpboot_register_percpu_thread(&backlog_threads);
dev_boot_phase = 0;

View file

@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (pool->p.init_callback)
pool->p.init_callback(page, pool->p.init_arg);
}
@@ -678,7 +686,7 @@ void page_pool_put_page_bulk(struct page
@@ -675,7 +683,7 @@ void page_pool_put_page_bulk(struct page
struct page *page = virt_to_head_page(data[i]);
/* It is not the last user for the page frag case */
@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
continue;
page = __page_pool_put_page(pool, page, -1, false);
@@ -754,8 +762,7 @@ struct page *page_pool_alloc_frag(struct
@@ -751,8 +759,7 @@ struct page *page_pool_alloc_frag(struct
unsigned int max_size = PAGE_SIZE << pool->p.order;
struct page *page = pool->frag_page;

View file

@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2994,13 +2994,25 @@ static void stmmac_tx_timer_arm(struct s
@@ -2995,13 +2995,25 @@ static void stmmac_tx_timer_arm(struct s
{
struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
u32 tx_coal_timer = priv->tx_coal_timer[queue];

View file

@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2542,9 +2542,13 @@ static void stmmac_bump_dma_threshold(st
@@ -2543,9 +2543,13 @@ static void stmmac_bump_dma_threshold(st
* @priv: driver private structure
* @budget: napi budget limiting this functions packet handling
* @queue: TX queue index
@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
{
struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[queue];
@@ -2704,7 +2708,7 @@ static int stmmac_tx_clean(struct stmmac
@@ -2705,7 +2709,7 @@ static int stmmac_tx_clean(struct stmmac
/* We still have pending packets, let's call for a new scheduling */
if (tx_q->dirty_tx != tx_q->cur_tx)
@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
u64_stats_update_begin(&txq_stats->napi_syncp);
u64_stats_add(&txq_stats->napi.tx_packets, tx_packets);
@@ -5609,6 +5613,7 @@ static int stmmac_napi_poll_tx(struct na
@@ -5622,6 +5626,7 @@ static int stmmac_napi_poll_tx(struct na
container_of(napi, struct stmmac_channel, tx_napi);
struct stmmac_priv *priv = ch->priv_data;
struct stmmac_txq_stats *txq_stats;
@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
u32 chan = ch->index;
int work_done;
@@ -5617,7 +5622,7 @@ static int stmmac_napi_poll_tx(struct na
@@ -5630,7 +5635,7 @@ static int stmmac_napi_poll_tx(struct na
u64_stats_inc(&txq_stats->napi.poll);
u64_stats_update_end(&txq_stats->napi_syncp);
@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
work_done = min(work_done, budget);
if (work_done < budget && napi_complete_done(napi, work_done)) {
@@ -5628,6 +5633,10 @@ static int stmmac_napi_poll_tx(struct na
@@ -5641,6 +5646,10 @@ static int stmmac_napi_poll_tx(struct na
spin_unlock_irqrestore(&ch->lock, flags);
}
@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return work_done;
}
@@ -5636,6 +5645,7 @@ static int stmmac_napi_poll_rxtx(struct
@@ -5649,6 +5658,7 @@ static int stmmac_napi_poll_rxtx(struct
struct stmmac_channel *ch =
container_of(napi, struct stmmac_channel, rxtx_napi);
struct stmmac_priv *priv = ch->priv_data;
@ -78,7 +78,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
int rx_done, tx_done, rxtx_done;
struct stmmac_rxq_stats *rxq_stats;
struct stmmac_txq_stats *txq_stats;
@@ -5651,7 +5661,7 @@ static int stmmac_napi_poll_rxtx(struct
@@ -5664,7 +5674,7 @@ static int stmmac_napi_poll_rxtx(struct
u64_stats_inc(&txq_stats->napi.poll);
u64_stats_update_end(&txq_stats->napi_syncp);
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tx_done = min(tx_done, budget);
rx_done = stmmac_rx_zc(priv, budget, chan);
@@ -5676,6 +5686,10 @@ static int stmmac_napi_poll_rxtx(struct
@@ -5689,6 +5699,10 @@ static int stmmac_napi_poll_rxtx(struct
spin_unlock_irqrestore(&ch->lock, flags);
}

View file

@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -3156,6 +3156,33 @@ static void rtl_hw_start_8168g_2(struct
@@ -3153,6 +3153,33 @@ static void rtl_hw_start_8168g_2(struct
rtl_ephy_init(tp, e_info_8168g_2);
}
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void rtl_hw_start_8411_2(struct rtl8169_private *tp)
{
static const struct ephy_info e_info_8411_2[] = {
@@ -3189,117 +3216,7 @@ static void rtl_hw_start_8411_2(struct r
@@ -3186,117 +3213,7 @@ static void rtl_hw_start_8411_2(struct r
mdelay(3);
r8168_mac_ocp_write(tp, 0xFC26, 0x0000);

View file

@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
#define TX_DMA_BURST 7 /* Maximum PCI burst, '7' is unlimited */
#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
@@ -2653,8 +2649,7 @@ static void rtl_set_rx_mode(struct net_d
@@ -2650,8 +2646,7 @@ static void rtl_set_rx_mode(struct net_d
rx_mode |= AcceptAllPhys;
} else if (!(dev->flags & IFF_MULTICAST)) {
rx_mode &= ~AcceptMulticast;

View file

@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
set_bit(flag, tp->wk.flags);
schedule_work(&tp->wk.work);
}
@@ -4526,8 +4529,7 @@ static void rtl_task(struct work_struct
@@ -4523,8 +4526,7 @@ static void rtl_task(struct work_struct
rtnl_lock();

View file

@ -296,7 +296,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type)
{
/* based on RTL8168FP_OOBMAC_BASE in vendor driver */
@@ -5205,6 +5263,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5202,6 +5260,7 @@ static int rtl_init_one(struct pci_dev *
raw_spin_lock_init(&tp->cfg9346_usage_lock);
raw_spin_lock_init(&tp->config25_lock);
raw_spin_lock_init(&tp->mac_ocp_lock);
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev,
struct pcpu_sw_netstats);
@@ -5361,6 +5420,12 @@ static int rtl_init_one(struct pci_dev *
@@ -5358,6 +5417,12 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View file

@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
obj-$(CONFIG_R8169) += r8169.o
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5420,11 +5420,10 @@ static int rtl_init_one(struct pci_dev *
@@ -5417,11 +5417,10 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View file

@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
genphy_soft_reset(tp->phydev);
}
@@ -5122,7 +5097,9 @@ static int r8169_mdio_register(struct rt
@@ -5119,7 +5094,9 @@ static int r8169_mdio_register(struct rt
}
tp->phydev->mac_managed_pm = true;
@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
phy_support_asym_pause(tp->phydev);
/* PHY will be woken up in rtl_open() */
@@ -5257,7 +5234,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5254,7 +5231,6 @@ static int rtl_init_one(struct pci_dev *
tp->dev = dev;
tp->pci_dev = pdev;
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;

View file

@ -128,7 +128,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond_2, 100, 42);
@@ -2822,7 +2833,7 @@ static void rtl_enable_exit_l1(struct rt
@@ -2819,7 +2830,7 @@ static void rtl_enable_exit_l1(struct rt
case RTL_GIGA_MAC_VER_37 ... RTL_GIGA_MAC_VER_38:
rtl_eri_set_bits(tp, 0xd4, 0x0c00);
break;
@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
break;
default:
@@ -2836,7 +2847,7 @@ static void rtl_disable_exit_l1(struct r
@@ -2833,7 +2844,7 @@ static void rtl_disable_exit_l1(struct r
case RTL_GIGA_MAC_VER_34 ... RTL_GIGA_MAC_VER_38:
rtl_eri_clear_bits(tp, 0xd4, 0x1f00);
break;
@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
break;
default:
@@ -2846,6 +2857,8 @@ static void rtl_disable_exit_l1(struct r
@@ -2843,6 +2854,8 @@ static void rtl_disable_exit_l1(struct r
static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
{
@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (tp->mac_version < RTL_GIGA_MAC_VER_32)
return;
@@ -2859,11 +2872,19 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2856,11 +2869,19 @@ static void rtl_hw_aspm_clkreq_enable(st
return;
rtl_mod_config5(tp, 0, ASPM_en);
@ -177,7 +177,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* reset ephy tx/rx disable timer */
r8168_mac_ocp_modify(tp, 0xe094, 0xff00, 0);
/* chip can trigger L1.2 */
@@ -2875,14 +2896,22 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2872,14 +2893,22 @@ static void rtl_hw_aspm_clkreq_enable(st
} else {
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
@ -202,7 +202,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rtl_mod_config5(tp, ASPM_en, 0);
}
}
@@ -3595,10 +3624,15 @@ static void rtl_hw_start_8125_common(str
@@ -3592,10 +3621,15 @@ static void rtl_hw_start_8125_common(str
/* disable new tx descriptor format */
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
@ -220,7 +220,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (tp->mac_version == RTL_GIGA_MAC_VER_63)
r8168_mac_ocp_modify(tp, 0xe63e, 0x0c30, 0x0000);
@@ -3611,6 +3645,10 @@ static void rtl_hw_start_8125_common(str
@@ -3608,6 +3642,10 @@ static void rtl_hw_start_8125_common(str
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
r8168_mac_ocp_modify(tp, 0xe0c0, 0x4f0f, 0x4403);
r8168_mac_ocp_modify(tp, 0xe052, 0x0080, 0x0068);
r8168_mac_ocp_modify(tp, 0xd430, 0x0fff, 0x047f);
@@ -3625,10 +3663,10 @@ static void rtl_hw_start_8125_common(str
@@ -3622,10 +3660,10 @@ static void rtl_hw_start_8125_common(str
rtl_loop_wait_low(tp, &rtl_mac_ocp_e00e_cond, 1000, 10);
@ -245,7 +245,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rtl_disable_rxdvgate(tp);
}
@@ -3672,6 +3710,12 @@ static void rtl_hw_start_8125b(struct rt
@@ -3669,6 +3707,12 @@ static void rtl_hw_start_8125b(struct rt
rtl_hw_start_8125_common(tp);
}
@ -258,7 +258,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void rtl_hw_config(struct rtl8169_private *tp)
{
static const rtl_generic_fct hw_configs[] = {
@@ -3714,6 +3758,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3711,6 +3755,7 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_53] = rtl_hw_start_8117,
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
@ -266,7 +266,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
if (hw_configs[tp->mac_version])
@@ -3724,9 +3769,23 @@ static void rtl_hw_start_8125(struct rtl
@@ -3721,9 +3766,23 @@ static void rtl_hw_start_8125(struct rtl
{
int i;
@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rtl_hw_config(tp);
}
@@ -3804,8 +3863,7 @@ static int rtl8169_change_mtu(struct net
@@ -3801,8 +3860,7 @@ static int rtl8169_change_mtu(struct net
rtl_jumbo_config(tp);
switch (tp->mac_version) {
@ -302,7 +302,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rtl8125_set_eee_txidle_timer(tp);
break;
default:
@@ -3954,7 +4012,7 @@ static void rtl8169_cleanup(struct rtl81
@@ -3951,7 +4009,7 @@ static void rtl8169_cleanup(struct rtl81
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666);
break;
@ -311,7 +311,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rtl_enable_rxdvgate(tp);
fsleep(2000);
break;
@@ -4111,8 +4169,7 @@ static unsigned int rtl_quirk_packet_pad
@@ -4108,8 +4166,7 @@ static unsigned int rtl_quirk_packet_pad
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_34:
@ -321,7 +321,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5149,7 +5206,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5146,7 +5203,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

@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5298,11 +5298,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5295,11 +5295,6 @@ static int rtl_init_one(struct pci_dev *
raw_spin_lock_init(&tp->mac_ocp_lock);
mutex_init(&tp->led_lock);
@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* Get the *optional* external "ether_clk" used on some boards */
tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk");
if (IS_ERR(tp->clk))
@@ -5417,6 +5412,8 @@ static int rtl_init_one(struct pci_dev *
@@ -5414,6 +5409,8 @@ static int rtl_init_one(struct pci_dev *
dev->hw_features |= NETIF_F_RXALL;
dev->hw_features |= NETIF_F_RXFCS;

View file

@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
void r8169_get_led_name(struct rtl8169_private *tp, int idx,
char *buf, int buf_len)
{
@@ -5450,10 +5501,12 @@ static int rtl_init_one(struct pci_dev *
@@ -5447,10 +5498,12 @@ static int rtl_init_one(struct pci_dev *
if (rc)
return rc;

View file

@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe040, 0, BIT(1) | BIT(0));
}
@@ -3879,6 +3890,8 @@ static void rtl_hw_start(struct rtl8169
@@ -3876,6 +3887,8 @@ static void rtl_hw_start(struct rtl8169
rtl_hw_aspm_clkreq_enable(tp, false);
RTL_W16(tp, CPlusCmd, tp->cp_cmd);
@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
rtl_hw_start_8169(tp);
else if (rtl_is_8125(tp))
@@ -3912,14 +3925,7 @@ static int rtl8169_change_mtu(struct net
@@ -3909,14 +3922,7 @@ static int rtl8169_change_mtu(struct net
dev->mtu = new_mtu;
netdev_update_features(dev);
rtl_jumbo_config(tp);

View file

@ -124,7 +124,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 ocp_base;
};
@@ -5076,6 +5078,8 @@ static void rtl_remove_one(struct pci_de
@@ -5073,6 +5075,8 @@ static void rtl_remove_one(struct pci_de
cancel_work_sync(&tp->wk.work);
@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
unregister_netdev(tp->dev);
if (tp->dash_type != RTL_DASH_NONE)
@@ -5535,9 +5539,9 @@ static int rtl_init_one(struct pci_dev *
@@ -5532,9 +5536,9 @@ static int rtl_init_one(struct pci_dev *
if (IS_ENABLED(CONFIG_R8169_LEDS)) {
if (rtl_is_8125(tp))

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
@@ -5078,7 +5078,8 @@ static void rtl_remove_one(struct pci_de
@@ -5075,7 +5075,8 @@ static void rtl_remove_one(struct pci_de
cancel_work_sync(&tp->wk.work);

View file

@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -3952,7 +3952,7 @@ static int rtl8169_change_mtu(struct net
@@ -3949,7 +3949,7 @@ static int rtl8169_change_mtu(struct net
{
struct rtl8169_private *tp = netdev_priv(dev);

View file

@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5119,12 +5119,10 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5116,12 +5116,10 @@ static void rtl_set_irq_mask(struct rtl8
tp->irq_mask = RxOK | RxErr | TxOK | TxErr | LinkChg;
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)

View file

@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond_2, 100, 42);
@@ -2927,7 +2932,7 @@ static void rtl_enable_exit_l1(struct rt
@@ -2924,7 +2929,7 @@ static void rtl_enable_exit_l1(struct rt
case RTL_GIGA_MAC_VER_37 ... RTL_GIGA_MAC_VER_38:
rtl_eri_set_bits(tp, 0xd4, 0x0c00);
break;
@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
break;
default:
@@ -2941,7 +2946,7 @@ static void rtl_disable_exit_l1(struct r
@@ -2938,7 +2943,7 @@ static void rtl_disable_exit_l1(struct r
case RTL_GIGA_MAC_VER_34 ... RTL_GIGA_MAC_VER_38:
rtl_eri_clear_bits(tp, 0xd4, 0x1f00);
break;
@ -131,7 +131,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
break;
default:
@@ -2968,6 +2973,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2965,6 +2970,7 @@ static void rtl_hw_aspm_clkreq_enable(st
rtl_mod_config5(tp, 0, ASPM_en);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_65:
@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val8 = RTL_R8(tp, INT_CFG0_8125) | INT_CFG0_CLKREQEN;
RTL_W8(tp, INT_CFG0_8125, val8);
break;
@@ -2978,7 +2984,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2975,7 +2981,7 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
@ -148,7 +148,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* reset ephy tx/rx disable timer */
r8168_mac_ocp_modify(tp, 0xe094, 0xff00, 0);
/* chip can trigger L1.2 */
@@ -2990,7 +2996,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2987,7 +2993,7 @@ static void rtl_hw_aspm_clkreq_enable(st
} else {
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
@ -157,7 +157,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe092, 0x00ff, 0);
break;
default:
@@ -2999,6 +3005,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2996,6 +3002,7 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_65:
@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val8 = RTL_R8(tp, INT_CFG0_8125) & ~INT_CFG0_CLKREQEN;
RTL_W8(tp, INT_CFG0_8125, val8);
break;
@@ -3718,10 +3725,12 @@ static void rtl_hw_start_8125_common(str
@@ -3715,10 +3722,12 @@ static void rtl_hw_start_8125_common(str
/* disable new tx descriptor format */
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0400);
else if (tp->mac_version == RTL_GIGA_MAC_VER_63)
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0200);
@@ -3739,7 +3748,8 @@ static void rtl_hw_start_8125_common(str
@@ -3736,7 +3745,8 @@ static void rtl_hw_start_8125_common(str
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
@ -190,7 +190,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xea1c, 0x0300, 0x0000);
else
r8168_mac_ocp_modify(tp, 0xea1c, 0x0004, 0x0000);
@@ -3853,6 +3863,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3850,6 +3860,7 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8126a,
@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
if (hw_configs[tp->mac_version])
@@ -3873,6 +3884,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3870,6 +3881,7 @@ static void rtl_hw_start_8125(struct rtl
break;
case RTL_GIGA_MAC_VER_63:
case RTL_GIGA_MAC_VER_65:
@ -206,7 +206,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
for (i = 0xa00; i < 0xa80; i += 4)
RTL_W32(tp, i, 0);
RTL_W16(tp, INT_CFG1_8125, 0x0000);
@@ -4101,7 +4113,7 @@ static void rtl8169_cleanup(struct rtl81
@@ -4098,7 +4110,7 @@ static void rtl8169_cleanup(struct rtl81
RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq);
rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666);
break;
@ -215,7 +215,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_enable_rxdvgate(tp);
fsleep(2000);
break;
@@ -4258,7 +4270,7 @@ static unsigned int rtl_quirk_packet_pad
@@ -4255,7 +4267,7 @@ static unsigned int rtl_quirk_packet_pad
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_34:
@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5296,7 +5308,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5293,7 +5305,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

@ -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
@@ -4778,11 +4778,7 @@ static void r8169_phylink_handler(struct
@@ -4775,11 +4775,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
@@ -5493,11 +5493,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5490,11 +5490,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);
@@ -5508,6 +5503,17 @@ static int rtl_init_one(struct pci_dev *
@@ -5505,6 +5500,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)
@@ -3894,6 +3973,9 @@ static void rtl_hw_start_8125(struct rtl
@@ -3891,6 +3970,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
@@ -4801,10 +4801,8 @@ static void rtl_task(struct work_struct
@@ -4798,10 +4798,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 */
@@ -4813,7 +4811,7 @@ static void rtl_task(struct work_struct
@@ -4810,7 +4808,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>
}
}
@@ -4832,8 +4830,6 @@ reset:
@@ -4829,8 +4827,6 @@ reset:
} else if (test_and_clear_bit(RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE, tp->wk.flags)) {
rtl_reset_work(tp);
}

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;
@@ -3875,6 +3876,12 @@ static void rtl_hw_start_8125b(struct rt
@@ -3872,6 +3873,12 @@ static void rtl_hw_start_8125b(struct rt
rtl_hw_start_8125_common(tp);
}
@ -99,7 +99,7 @@ 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);
@@ -3923,6 +3930,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3920,6 +3927,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,
};
@@ -3940,6 +3948,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3937,6 +3945,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,
};
@@ -3769,8 +3771,8 @@ static void rtl_hw_start_8125_common(str
@@ -3766,8 +3768,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:
@@ -5462,8 +5439,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5459,8 +5436,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
@@ -5238,6 +5238,11 @@ static int r8169_mdio_register(struct rt
@@ -5235,6 +5235,11 @@ static int r8169_mdio_register(struct rt
tp->phydev->supported_eee);
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
};
@@ -4729,8 +4728,6 @@ static void rtl_task(struct work_struct
@@ -4726,8 +4725,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 },
*/
@@ -3806,7 +3805,6 @@ static void rtl_hw_config(struct rtl8169
@@ -3803,7 +3802,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,
@@ -4682,12 +4680,6 @@ static irqreturn_t rtl8169_interrupt(int
@@ -4679,12 +4677,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:
@@ -5108,9 +5100,6 @@ static void rtl_set_irq_mask(struct rtl8
@@ -5105,9 +5097,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)
@@ -5306,7 +5295,6 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5303,7 +5292,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);
@@ -2904,7 +2904,7 @@ static void rtl_enable_exit_l1(struct rt
@@ -2901,7 +2901,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:
@@ -2918,7 +2918,7 @@ static void rtl_disable_exit_l1(struct r
@@ -2915,7 +2915,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:
@@ -2944,8 +2944,8 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2941,8 +2941,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;
@@ -2956,7 +2956,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2953,7 +2953,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 */
@@ -2968,7 +2968,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2965,7 +2965,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:
@@ -2976,8 +2976,8 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2973,8 +2973,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;
@@ -3697,12 +3697,12 @@ static void rtl_hw_start_8125_common(str
@@ -3694,12 +3694,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);
@@ -3720,8 +3720,8 @@ static void rtl_hw_start_8125_common(str
@@ -3717,8 +3717,8 @@ static void rtl_hw_start_8125_common(str
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
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);
@@ -3840,8 +3840,8 @@ static void rtl_hw_config(struct rtl8169
@@ -3837,8 +3837,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])
@@ -3862,8 +3862,8 @@ static void rtl_hw_start_8125(struct rtl
@@ -3859,8 +3859,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);
@@ -4095,7 +4095,7 @@ static void rtl8169_cleanup(struct rtl81
@@ -4092,7 +4092,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;
@@ -4252,7 +4252,7 @@ static unsigned int rtl_quirk_packet_pad
@@ -4249,7 +4249,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:
@@ -5276,7 +5276,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5273,7 +5273,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. */
@@ -3840,6 +3844,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3837,6 +3841,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,
};
@@ -3858,6 +3863,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3855,6 +3860,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 },
@@ -3845,6 +3873,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3842,6 +3870,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,
};
@@ -3864,6 +3893,7 @@ static void rtl_hw_start_8125(struct rtl
@@ -3861,6 +3890,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

@ -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
@@ -5209,6 +5209,33 @@ static int r8169_mdio_write_reg(struct m
@@ -5206,6 +5206,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;
@@ -5239,6 +5266,11 @@ static int r8169_mdio_register(struct rt
@@ -5236,6 +5263,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;
@@ -5369,6 +5370,9 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5366,6 +5367,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

@ -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
@@ -5407,7 +5407,7 @@ done:
@@ -5404,7 +5404,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

@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2856,6 +2856,32 @@ static u32 rtl_csi_read(struct rtl8169_p
@@ -2853,6 +2853,32 @@ static u32 rtl_csi_read(struct rtl8169_p
RTL_R32(tp, CSIDR) : ~0;
}
@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void rtl_set_aspm_entry_latency(struct rtl8169_private *tp, u8 val)
{
struct pci_dev *pdev = tp->pci_dev;
@@ -3828,6 +3854,7 @@ static void rtl_hw_start_8125d(struct rt
@@ -3825,6 +3851,7 @@ static void rtl_hw_start_8125d(struct rt
static void rtl_hw_start_8126a(struct rtl8169_private *tp)
{

View file

@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2856,10 +2856,23 @@ static u32 rtl_csi_read(struct rtl8169_p
@@ -2853,10 +2853,23 @@ static u32 rtl_csi_read(struct rtl8169_p
RTL_R32(tp, CSIDR) : ~0;
}
@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int rc;
u8 val;
@@ -2876,16 +2889,12 @@ static void rtl_disable_zrxdc_timeout(st
@@ -2873,16 +2886,12 @@ static void rtl_disable_zrxdc_timeout(st
}
}
@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* According to Realtek the value at config space address 0x070f
* controls the L0s/L1 entrance latency. We try standard ECAM access
@@ -2897,10 +2906,7 @@ static void rtl_set_aspm_entry_latency(s
@@ -2894,10 +2903,7 @@ static void rtl_set_aspm_entry_latency(s
pci_write_config_byte(pdev, 0x070f, val) == PCIBIOS_SUCCESSFUL)
return;

View file

@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static void rtl_release_firmware(struct rtl8169_private *tp)
@@ -5449,9 +5381,9 @@ static bool rtl_aspm_is_safe(struct rtl8
@@ -5446,9 +5378,9 @@ static bool rtl_aspm_is_safe(struct rtl8
static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
@ -364,7 +364,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct net_device *dev;
u32 txconfig;
u16 xid;
@@ -5502,12 +5434,13 @@ static int rtl_init_one(struct pci_dev *
@@ -5499,12 +5431,13 @@ static int rtl_init_one(struct pci_dev *
xid = (txconfig >> 20) & 0xfcf;
/* Identify chip attached to board */
@ -381,7 +381,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable ASPM L1 as that cause random device stop working
* problems as well as full system hangs for some PCIe devices users.
@@ -5611,8 +5544,6 @@ static int rtl_init_one(struct pci_dev *
@@ -5608,8 +5541,6 @@ static int rtl_init_one(struct pci_dev *
rtl_set_irq_mask(tp);
@ -390,7 +390,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters),
&tp->counters_phys_addr,
GFP_KERNEL);
@@ -5637,7 +5568,7 @@ static int rtl_init_one(struct pci_dev *
@@ -5634,7 +5565,7 @@ static int rtl_init_one(struct pci_dev *
}
netdev_info(dev, "%s, %pM, XID %03x, IRQ %d\n",

View file

@ -85,7 +85,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);
@@ -2902,7 +2902,7 @@ static void rtl_enable_exit_l1(struct rt
@@ -2899,7 +2899,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;
@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0, 0x1f80);
break;
default:
@@ -2916,7 +2916,7 @@ static void rtl_disable_exit_l1(struct r
@@ -2913,7 +2913,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;
@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xc0ac, 0x1f80, 0);
break;
default:
@@ -2954,7 +2954,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2951,7 +2951,7 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
@ -112,7 +112,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 */
@@ -2966,7 +2966,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2963,7 +2963,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:
@ -121,7 +121,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe092, 0x00ff, 0);
break;
default:
@@ -4098,7 +4098,7 @@ static void rtl8169_cleanup(struct rtl81
@@ -4095,7 +4095,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;
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_enable_rxdvgate(tp);
fsleep(2000);
break;
@@ -4255,7 +4255,7 @@ static unsigned int rtl_quirk_packet_pad
@@ -4252,7 +4252,7 @@ static unsigned int rtl_quirk_packet_pad
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_34:
@ -139,7 +139,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
padto = max_t(unsigned int, padto, ETH_ZLEN);
break;
default:
@@ -5311,7 +5311,7 @@ static void rtl_hw_initialize(struct rtl
@@ -5308,7 +5308,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;
@ -148,7 +148,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_hw_init_8125(tp);
break;
default:
@@ -5336,7 +5336,7 @@ static int rtl_jumbo_max(struct rtl8169_
@@ -5333,7 +5333,7 @@ static int rtl_jumbo_max(struct rtl8169_
case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_24:
return JUMBO_6K;
/* RTL8125/8126 */

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
@@ -5048,10 +5048,8 @@ static void rtl_shutdown(struct pci_dev
@@ -5045,10 +5045,8 @@ static void rtl_shutdown(struct pci_dev
/* Restore original MAC address */
rtl_rar_set(tp, tp->dev->perm_addr);

View file

@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{ 0x7cf, 0x649, RTL_GIGA_MAC_VER_70, "RTL8126A", FIRMWARE_8126A_2 },
/* 8125BP family. */
@@ -2943,7 +2943,6 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2940,7 +2940,6 @@ static void rtl_hw_aspm_clkreq_enable(st
rtl_mod_config5(tp, 0, ASPM_en);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_70:
@ -45,7 +45,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;
@@ -2975,7 +2974,6 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2972,7 +2971,6 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_70:
@ -53,7 +53,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;
@@ -3695,12 +3693,10 @@ static void rtl_hw_start_8125_common(str
@@ -3692,12 +3690,10 @@ static void rtl_hw_start_8125_common(str
/* disable new tx descriptor format */
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
@ -68,7 +68,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);
@@ -3718,8 +3714,7 @@ static void rtl_hw_start_8125_common(str
@@ -3715,8 +3711,7 @@ static void rtl_hw_start_8125_common(str
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
@ -78,7 +78,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);
@@ -3842,7 +3837,6 @@ static void rtl_hw_config(struct rtl8169
@@ -3839,7 +3834,6 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_70] = rtl_hw_start_8126a,
@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
if (hw_configs[tp->mac_version])
@@ -3866,7 +3860,6 @@ static void rtl_hw_start_8125(struct rtl
@@ -3863,7 +3857,6 @@ static void rtl_hw_start_8125(struct rtl
break;
case RTL_GIGA_MAC_VER_63:
case RTL_GIGA_MAC_VER_70:

View file

@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{ 0x7cf, 0x688, RTL_GIGA_MAC_VER_64, "RTL8125D", FIRMWARE_8125D_1 },
/* 8125B family. */
@@ -3834,7 +3834,6 @@ static void rtl_hw_config(struct rtl8169
@@ -3831,7 +3831,6 @@ 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,
@ -45,7 +45,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_70] = rtl_hw_start_8126a,
};
@@ -3853,7 +3852,6 @@ static void rtl_hw_start_8125(struct rtl
@@ -3850,7 +3849,6 @@ 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

@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rtl_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 42);
rtl_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42);
break;
@@ -3830,7 +3828,6 @@ static void rtl_hw_config(struct rtl8169
@@ -3827,7 +3825,6 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_48] = rtl_hw_start_8168h_1,
[RTL_GIGA_MAC_VER_51] = rtl_hw_start_8168ep_3,
[RTL_GIGA_MAC_VER_52] = rtl_hw_start_8117,
@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[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,
@@ -5294,7 +5291,7 @@ static void rtl_hw_init_8125(struct rtl8
@@ -5291,7 +5288,7 @@ static void rtl_hw_init_8125(struct rtl8
static void rtl_hw_initialize(struct rtl8169_private *tp)
{
switch (tp->mac_version) {

View file

@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static inline struct device *tp_to_dev(struct rtl8169_private *tp)
{
@@ -2941,6 +2948,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2938,6 +2945,7 @@ static void rtl_hw_aspm_clkreq_enable(st
rtl_mod_config5(tp, 0, ASPM_en);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_70:
@ -72,7 +72,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;
@@ -2972,6 +2980,7 @@ static void rtl_hw_aspm_clkreq_enable(st
@@ -2969,6 +2977,7 @@ static void rtl_hw_aspm_clkreq_enable(st
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_70:
@ -80,7 +80,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val8 = RTL_R8(tp, INT_CFG0_8125) & ~INT_CFG0_CLKREQEN;
RTL_W8(tp, INT_CFG0_8125, val8);
break;
@@ -3691,10 +3700,13 @@ static void rtl_hw_start_8125_common(str
@@ -3688,10 +3697,13 @@ static void rtl_hw_start_8125_common(str
/* disable new tx descriptor format */
r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000);
@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0400);
else if (tp->mac_version == RTL_GIGA_MAC_VER_63)
r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0200);
@@ -3712,7 +3724,8 @@ static void rtl_hw_start_8125_common(str
@@ -3709,7 +3721,8 @@ static void rtl_hw_start_8125_common(str
r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
@ -106,7 +106,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);
@@ -3790,6 +3803,12 @@ static void rtl_hw_start_8126a(struct rt
@@ -3787,6 +3800,12 @@ static void rtl_hw_start_8126a(struct rt
rtl_hw_start_8125_common(tp);
}
@ -119,7 +119,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void rtl_hw_config(struct rtl8169_private *tp)
{
static const rtl_generic_fct hw_configs[] = {
@@ -3833,6 +3852,7 @@ static void rtl_hw_config(struct rtl8169
@@ -3830,6 +3849,7 @@ static void rtl_hw_config(struct rtl8169
[RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_70] = rtl_hw_start_8126a,
@ -127,7 +127,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
};
if (hw_configs[tp->mac_version])
@@ -3850,8 +3870,11 @@ static void rtl_hw_start_8125(struct rtl
@@ -3847,8 +3867,11 @@ 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_66:

View file

@ -123,7 +123,7 @@ Signed-off-by: Justin Stitt <justinstitt@google.com>
#endif /* _LINUX_ETHTOOL_H */
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1994,6 +1994,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
@@ -1997,6 +1997,13 @@ __printf(2, 3) void ethtool_sprintf(u8 *
}
EXPORT_SYMBOL(ethtool_sprintf);

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
@@ -875,7 +875,8 @@ static void page_pool_release_retry(stru
@@ -876,7 +876,8 @@ 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);
@ -26,7 +26,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.
@@ -887,6 +888,21 @@ static void page_pool_release_retry(stru
@@ -888,6 +889,21 @@ static void page_pool_release_retry(stru
if (inflight <= 0)
return;

View file

@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2895,6 +2895,8 @@ static const struct seq_operations locks
@@ -2903,6 +2903,8 @@ static const struct seq_operations locks
static int __init proc_locks_init(void)
{
@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe)
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -4458,6 +4458,8 @@ static const struct seq_operations vmall
@@ -4456,6 +4456,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void)
{
@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -3015,11 +3015,13 @@ static const struct seq_operations fib_r
@@ -3016,11 +3016,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;
@@ -3030,17 +3032,21 @@ int __net_init fib_proc_init(struct net
@@ -3031,17 +3033,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3:

View file

@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4485,6 +4485,7 @@ int wake_up_state(struct task_struct *p,
@@ -4486,6 +4486,7 @@ int wake_up_state(struct task_struct *p,
{
return try_to_wake_up(p, state, 0);
}

View file

@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#endif
/*
* Get just the first code, look it up in the token table,
* and return the first char from this token.
* and return the first char from this token. If MSB of length
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -62,6 +62,7 @@ static struct addr_range percpu_range =

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
@@ -2762,6 +2762,7 @@ static const char *const rtn_type_names[
@@ -2763,6 +2763,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW",
[RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE",
@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__rcuref = RCUREF_INIT(1),
@@ -1077,6 +1091,7 @@ static const int fib6_prop[RTN_MAX + 1]
@@ -1086,6 +1100,7 @@ static const int fib6_prop[RTN_MAX + 1]
[RTN_BLACKHOLE] = -EINVAL,
[RTN_UNREACHABLE] = -EHOSTUNREACH,
[RTN_PROHIBIT] = -EACCES,
@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
[RTN_THROW] = -EAGAIN,
[RTN_NAT] = -EINVAL,
[RTN_XRESOLVE] = -EINVAL,
@@ -1112,6 +1127,10 @@ static void ip6_rt_init_dst_reject(struc
@@ -1121,6 +1136,10 @@ static void ip6_rt_init_dst_reject(struc
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
@@ -4588,6 +4607,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -4598,6 +4617,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -5079,7 +5109,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -5089,7 +5119,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -6349,6 +6380,8 @@ static int ip6_route_dev_notify(struct n
@@ -6359,6 +6390,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -6360,6 +6393,7 @@ static int ip6_route_dev_notify(struct n
@@ -6370,6 +6403,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -6560,6 +6594,8 @@ static int __net_init ip6_route_net_init
@@ -6570,6 +6604,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
@@ -6570,11 +6606,21 @@ static int __net_init ip6_route_net_init
@@ -6580,11 +6616,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -6601,6 +6647,8 @@ out:
@@ -6611,6 +6657,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -6620,6 +6668,7 @@ static void __net_exit ip6_route_net_exi
@@ -6630,6 +6678,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6703,6 +6752,9 @@ void __init ip6_route_init_special_entri
@@ -6713,6 +6762,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View file

@ -59,7 +59,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
}
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
@@ -485,47 +485,14 @@ static struct nft_expr_type nft_flow_off
@@ -492,47 +492,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE,
};

View file

@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -8463,7 +8463,7 @@ static int nft_register_flowtable_net_ho
@@ -8465,7 +8465,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);

View file

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
@@ -367,6 +367,7 @@ static void nft_flow_offload_eval(const
@@ -374,6 +374,7 @@ static void nft_flow_offload_eval(const
if (tcph)
flow_offload_ct_tcp(ct);

View file

@ -13,7 +13,7 @@ Signed-off-by: Robert Marko <robert.marko@sartura.hr>
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2398,7 +2398,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
@@ -2401,7 +2401,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
static const struct sdhci_ops sdhci_msm_ops = {
.reset = sdhci_and_cqhci_reset,

View file

@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1833,49 +1833,49 @@ static unsigned int sdhci_msm_get_min_cl
@@ -1835,50 +1835,50 @@ static unsigned int sdhci_msm_get_min_cl
return SDHCI_MSM_MIN_CLOCK;
}
@ -48,6 +48,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-{
- struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
- struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
- struct mmc_ios ios = host->mmc->ios;
-
- if (!clock) {
- host->mmc->actual_clock = msm_host->clk_rate = 0;
@ -56,7 +57,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-
- sdhci_msm_hc_select_mode(host);
-
- msm_set_clock_rate_for_bus_mode(host, clock);
- msm_set_clock_rate_for_bus_mode(host, ios.clock, ios.timing);
-out:
- __sdhci_msm_set_clock(host, clock);
-}
@ -91,7 +92,8 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+// {
+// struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+// struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
+
+// struct mmc_ios ios = host->mmc->ios;
+//
+// if (!clock) {
+// host->mmc->actual_clock = msm_host->clk_rate = 0;
+// goto out;
@ -99,7 +101,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+
+// sdhci_msm_hc_select_mode(host);
+
+// msm_set_clock_rate_for_bus_mode(host, clock);
+// msm_set_clock_rate_for_bus_mode(host, ios.clock, ios.timing);
+// out:
+// __sdhci_msm_set_clock(host, clock);
+// }

View file

@ -1181,9 +1181,9 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
- }
-
- buf = (u32 *)nvmem_cell_read(cell, &len);
- nvmem_cell_put(cell);
- if (IS_ERR(buf))
- return PTR_ERR(buf);
- nvmem_cell_put(cell);
-
- if (!buf[0] || !buf[1] || !buf[2] || !buf[3] || len < 4 * sizeof(u32)) {
- phydev_err(phydev, "invalid efuse data\n");
@ -2890,9 +2890,9 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
+ }
+
+ buf = (u32 *)nvmem_cell_read(cell, &len);
+ nvmem_cell_put(cell);
+ if (IS_ERR(buf))
+ return PTR_ERR(buf);
+ nvmem_cell_put(cell);
+
+ if (!buf[0] || !buf[1] || !buf[2] || !buf[3] || len < 4 * sizeof(u32)) {
+ phydev_err(phydev, "invalid efuse data\n");

View file

@ -25,7 +25,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -178,6 +178,7 @@ static const struct of_device_id blockli
@@ -179,6 +179,7 @@ static const struct of_device_id blockli
{ .compatible = "ti,am625", },
{ .compatible = "ti,am62a7", },

View file

@ -25,7 +25,7 @@ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -180,6 +180,7 @@ static const struct of_device_id blockli
@@ -181,6 +181,7 @@ static const struct of_device_id blockli
{ .compatible = "qcom,ipq6018", },
{ .compatible = "qcom,ipq8064", },

View file

@ -25,7 +25,7 @@ Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
@@ -86,6 +87,9 @@
#define TCSR_WCSS_CLK_ENABLE 0x14
#define MAX_HALT_REG 3
#define MAX_HALT_REG 4
+
+#define WCNSS_PAS_ID 6
+

View file

@ -13,15 +13,6 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -86,7 +86,7 @@
#define TCSR_WCSS_CLK_MASK 0x1F
#define TCSR_WCSS_CLK_ENABLE 0x14
-#define MAX_HALT_REG 3
+#define MAX_HALT_REG 4
#define WCNSS_PAS_ID 6
@@ -154,6 +154,7 @@ struct wcss_data {
u32 version;
bool aon_reset_required;
@ -48,19 +39,6 @@ Signed-off-by: Sricharan R <sricharan@codeaurora.org>
}
return 0;
@@ -928,9 +932,9 @@ static int q6v5_wcss_init_mmio(struct q6
return -EINVAL;
}
- wcss->halt_q6 = halt_reg[0];
- wcss->halt_wcss = halt_reg[1];
- wcss->halt_nc = halt_reg[2];
+ wcss->halt_q6 = halt_reg[1];
+ wcss->halt_wcss = halt_reg[2];
+ wcss->halt_nc = halt_reg[3];
return 0;
}
@@ -1176,6 +1180,7 @@ static const struct wcss_data wcss_ipq80
.crash_reason_smem = WCSS_CRASH_REASON,
.aon_reset_required = true,

View file

@ -1,6 +1,6 @@
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -481,6 +481,12 @@ static int dwc2_driver_probe(struct plat
@@ -484,6 +484,12 @@ static int dwc2_driver_probe(struct plat
if (retval)
return retval;

View file

@ -23,7 +23,7 @@ Submitted-by: Markus Stockhausen <markus.stockhausen@gmx.de>
source "drivers/clk/rockchip/Kconfig"
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -112,6 +112,7 @@ obj-$(CONFIG_COMMON_CLK_PISTACHIO) += pi
@@ -111,6 +111,7 @@ obj-$(CONFIG_COMMON_CLK_PISTACHIO) += pi
obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/
obj-y += ralink/

View file

@ -29,7 +29,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
&cpu_b0 {
cpu-supply = <&vdd_cpu_big0_s0>;
};
@@ -734,3 +738,7 @@
@@ -735,3 +739,7 @@
&usb_host1_ohci {
status = "okay";
};

View file

@ -15,7 +15,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
@@ -698,6 +698,14 @@
@@ -699,6 +699,14 @@
};
};
@ -30,7 +30,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
&u2phy2 {
status = "okay";
};
@@ -721,6 +729,11 @@
@@ -722,6 +730,11 @@
status = "okay";
};
@ -42,7 +42,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
&usb_host0_ehci {
status = "okay";
pinctrl-names = "default";
@@ -731,6 +744,11 @@
@@ -732,6 +745,11 @@
status = "okay";
};

View file

@ -23,7 +23,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
@@ -376,6 +376,19 @@
@@ -377,6 +377,19 @@
status = "okay";
};

View file

@ -80,7 +80,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
&combphy2_psu {
status = "okay";
};
@@ -292,6 +308,14 @@
@@ -293,6 +309,14 @@
};
};
@ -95,7 +95,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
&pinctrl {
leds {
io_led: io-led {
@@ -299,6 +323,12 @@
@@ -300,6 +324,12 @@
};
};

Some files were not shown because too many files have changed in this diff Show more