From 140a8e1ffb7ecc65ce854a92e0777260941f4791 Mon Sep 17 00:00:00 2001 From: sbwml Date: Sat, 18 May 2024 00:45:26 +0800 Subject: [PATCH] rockchip: patches-6.6: refresh patches Signed-off-by: sbwml --- patches-6.6/007-rockchip-p3phy-fw.patch | 6 +++--- ...2-rk356x-add-dwc3-xhci-usb-trb-quirk.patch | 16 +++++++------- ...gic-v3-add-hackaround-for-rk3568-its.patch | 10 ++++----- ...d-support-for-modifying-IRQ-affinity.patch | 21 +++++++++---------- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/patches-6.6/007-rockchip-p3phy-fw.patch b/patches-6.6/007-rockchip-p3phy-fw.patch index 4d9fecd..5f3895e 100644 --- a/patches-6.6/007-rockchip-p3phy-fw.patch +++ b/patches-6.6/007-rockchip-p3phy-fw.patch @@ -25,7 +25,7 @@ Change-Id: I6624b6af2ede3c2fca61c0f753a08a33ce69a6d2 #define GRF_PCIE30PHY_CON6 0x18 #define GRF_PCIE30PHY_CON9 0x24 #define GRF_PCIE30PHY_DA_OCM (BIT(15) | BIT(31)) -@@ -64,6 +65,10 @@ struct rockchip_p3phy_ops { +@@ -66,6 +67,10 @@ struct rockchip_p3phy_ops { int (*phy_init)(struct rockchip_p3phy_priv *priv); }; @@ -36,7 +36,7 @@ Change-Id: I6624b6af2ede3c2fca61c0f753a08a33ce69a6d2 static int rockchip_p3phy_set_mode(struct phy *phy, enum phy_mode mode, int submode) { struct rockchip_p3phy_priv *priv = phy_get_drvdata(phy); -@@ -88,13 +93,14 @@ static int rockchip_p3phy_rk3568_init(st +@@ -90,13 +95,14 @@ static int rockchip_p3phy_rk3568_init(st { struct phy *phy = priv->phy; bool bifurcation = false; @@ -52,7 +52,7 @@ Change-Id: I6624b6af2ede3c2fca61c0f753a08a33ce69a6d2 dev_info(&phy->dev, "lane number %d, val %d\n", i, priv->lanes[i]); if (priv->lanes[i] > 1) bifurcation = true; -@@ -113,16 +119,35 @@ static int rockchip_p3phy_rk3568_init(st +@@ -115,16 +121,35 @@ static int rockchip_p3phy_rk3568_init(st GRF_PCIE30PHY_WR_EN & ~RK3568_BIFURCATION_LANE_0_1); } diff --git a/patches-6.6/012-rk356x-add-dwc3-xhci-usb-trb-quirk.patch b/patches-6.6/012-rk356x-add-dwc3-xhci-usb-trb-quirk.patch index 9f5d377..ca8f2e1 100644 --- a/patches-6.6/012-rk356x-add-dwc3-xhci-usb-trb-quirk.patch +++ b/patches-6.6/012-rk356x-add-dwc3-xhci-usb-trb-quirk.patch @@ -18,7 +18,7 @@ --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -1574,6 +1574,8 @@ static void dwc3_get_properties(struct d +@@ -1560,6 +1560,8 @@ static void dwc3_get_properties(struct d "snps,dis-del-phy-power-chg-quirk"); dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev, "snps,dis-tx-ipgap-linecheck-quirk"); @@ -49,7 +49,7 @@ unsigned parkmode_disable_ss_quirk:1; --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c -@@ -94,6 +94,9 @@ int dwc3_host_init(struct dwc3 *dwc) +@@ -115,6 +115,9 @@ int dwc3_host_init(struct dwc3 *dwc) if (dwc->usb3_lpm_capable) props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable"); @@ -73,7 +73,7 @@ } --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3605,6 +3605,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3606,6 +3606,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * bool more_trbs_coming = true; bool need_zero_pkt = false; bool first_trb = true; @@ -81,7 +81,7 @@ unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; -@@ -3641,6 +3642,13 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3642,6 +3643,13 @@ int xhci_queue_bulk_tx(struct xhci_hcd * if (urb->transfer_flags & URB_ZERO_PACKET && urb_priv->num_tds > 1) need_zero_pkt = true; @@ -95,7 +95,7 @@ td = &urb_priv->td[0]; /* -@@ -3669,6 +3677,13 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3670,6 +3678,13 @@ int xhci_queue_bulk_tx(struct xhci_hcd * first_trb = false; if (start_cycle == 0) field |= TRB_CYCLE; @@ -109,7 +109,7 @@ } else field |= ring->cycle_state; -@@ -3677,6 +3692,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3678,6 +3693,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * */ if (enqd_len + trb_buff_len < full_len) { field |= TRB_CHAIN; @@ -120,7 +120,7 @@ &trb_buff_len, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1528,7 +1528,11 @@ static inline const char *xhci_trb_type_ +@@ -1530,7 +1530,11 @@ static inline const char *xhci_trb_type_ #define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16) #define TRB_SEGMENT_SHIFT (ilog2(TRB_SEGMENT_SIZE)) /* TRB buffer pointers can't cross 64KB boundaries */ @@ -132,7 +132,7 @@ #define TRB_MAX_BUFF_SIZE (1 << TRB_MAX_BUFF_SHIFT) /* How much data is left before the 64KB boundary? */ #define TRB_BUFF_LEN_UP_TO_BOUNDARY(addr) (TRB_MAX_BUFF_SIZE - \ -@@ -1849,6 +1853,7 @@ struct xhci_hcd { +@@ -1854,6 +1858,7 @@ struct xhci_hcd { #define XHCI_STATE_HALTED (1 << 1) #define XHCI_STATE_REMOVING (1 << 2) unsigned long long quirks; diff --git a/patches-6.6/111-irqchip-gic-v3-add-hackaround-for-rk3568-its.patch b/patches-6.6/111-irqchip-gic-v3-add-hackaround-for-rk3568-its.patch index d1c7063..b1e7cd5 100644 --- a/patches-6.6/111-irqchip-gic-v3-add-hackaround-for-rk3568-its.patch +++ b/patches-6.6/111-irqchip-gic-v3-add-hackaround-for-rk3568-its.patch @@ -138,7 +138,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its if (alloc_lpis) { lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis); if (lpi_map) -@@ -4779,6 +4816,13 @@ static bool its_set_non_coherent(void *d +@@ -4774,6 +4811,13 @@ static bool its_set_non_coherent(void *d return true; } @@ -152,7 +152,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its static const struct gic_quirk its_quirks[] = { #ifdef CONFIG_CAVIUM_ERRATUM_22375 { -@@ -4833,6 +4877,14 @@ static const struct gic_quirk its_quirks +@@ -4828,6 +4872,14 @@ static const struct gic_quirk its_quirks .init = its_enable_rk3588001, }, #endif @@ -167,7 +167,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its { .desc = "ITS: non-coherent attribute", .property = "dma-noncoherent", -@@ -5094,6 +5146,7 @@ static int __init its_probe_one(struct i +@@ -5089,6 +5141,7 @@ static int __init its_probe_one(struct i struct page *page; u32 ctlr; int err; @@ -175,7 +175,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its its_enable_quirks(its); -@@ -5127,7 +5180,9 @@ static int __init its_probe_one(struct i +@@ -5122,7 +5175,9 @@ static int __init its_probe_one(struct i } } @@ -186,7 +186,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its get_order(ITS_CMD_QUEUE_SZ)); if (!page) { err = -ENOMEM; -@@ -5153,6 +5208,9 @@ static int __init its_probe_one(struct i +@@ -5148,6 +5203,9 @@ static int __init its_probe_one(struct i gits_write_cbaser(baser, its->base + GITS_CBASER); tmp = gits_read_cbaser(its->base + GITS_CBASER); diff --git a/patches-6.6/950-nvme-pci-add-support-for-modifying-IRQ-affinity.patch b/patches-6.6/950-nvme-pci-add-support-for-modifying-IRQ-affinity.patch index 4eb158a..c4fe663 100644 --- a/patches-6.6/950-nvme-pci-add-support-for-modifying-IRQ-affinity.patch +++ b/patches-6.6/950-nvme-pci-add-support-for-modifying-IRQ-affinity.patch @@ -9,12 +9,12 @@ Modify the nvme pci controller to allow users to modify interrupt affinity accor Signed-off-by: sbwml --- - drivers/nvme/host/pci.c | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) + drivers/nvme/host/pci.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c -@@ -456,10 +456,8 @@ static void nvme_pci_map_queues(struct b +@@ -456,10 +456,7 @@ static void nvme_pci_map_queues(struct b * affinity), so use the regular blk-mq cpu mapping */ map->queue_offset = qoff; @@ -23,25 +23,24 @@ Signed-off-by: sbwml - else - blk_mq_map_queues(map); + blk_mq_map_queues(map); -+ qoff += map->nr_queues; offset += map->nr_queues; } -@@ -2216,6 +2214,8 @@ static int nvme_setup_irqs(struct nvme_d - .priv = dev, +@@ -2217,6 +2214,8 @@ static int nvme_setup_irqs(struct nvme_d }; unsigned int irq_queues, poll_queues; + unsigned int flags = PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY; + unsigned int affvecs; + int nr_irqs; /* * Poll queues don't need interrupts, but we need at least one I/O queue -@@ -2239,8 +2239,19 @@ static int nvme_setup_irqs(struct nvme_d - irq_queues = 1; - if (!(dev->ctrl.quirks & NVME_QUIRK_SINGLE_VECTOR)) +@@ -2242,8 +2241,19 @@ static int nvme_setup_irqs(struct nvme_d irq_queues += (nr_io_queues - poll_queues); -- return pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues, -- PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY, &affd); + if (dev->ctrl.quirks & NVME_QUIRK_BROKEN_MSI) + flags &= ~PCI_IRQ_MSI; +- return pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues, flags, +- &affd); + + nr_irqs = pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues, PCI_IRQ_ALL_TYPES, NULL); +