From: Greg Kroah-Hartman Date: Mon, 19 Dec 2022 12:21:31 +0000 (+0100) Subject: 6.0-stable patches X-Git-Tag: v5.10.161~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93e9f7ab9fd3a02cfe857f38a64ab410647e0c7c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.0-stable patches added patches: pci-mt7621-add-sentinel-to-quirks-table.patch series --- diff --git a/queue-6.0/pci-mt7621-add-sentinel-to-quirks-table.patch b/queue-6.0/pci-mt7621-add-sentinel-to-quirks-table.patch new file mode 100644 index 00000000000..23a1e70211e --- /dev/null +++ b/queue-6.0/pci-mt7621-add-sentinel-to-quirks-table.patch @@ -0,0 +1,43 @@ +From 19098934f910b4d47cb30251dd39ffa57bef9523 Mon Sep 17 00:00:00 2001 +From: John Thomson +Date: Tue, 6 Dec 2022 06:46:45 +1000 +Subject: PCI: mt7621: Add sentinel to quirks table + +From: John Thomson + +commit 19098934f910b4d47cb30251dd39ffa57bef9523 upstream. + +Current driver is missing a sentinel in the struct soc_device_attribute +array, which causes an oops when assessed by the +soc_device_match(mt7621_pcie_quirks_match) call. + +This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr +was fixed to register the SOC as a device, in: + +commit 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early") + +Fix it by adding the required sentinel. + +Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com +Link: https://lore.kernel.org/r/20221205204645.301301-1-git@johnthomson.fastmail.com.au +Fixes: b483b4e4d3f6 ("staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'") +Signed-off-by: John Thomson +Signed-off-by: Lorenzo Pieralisi +Acked-by: Sergio Paracuellos +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/controller/pcie-mt7621.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/pci/controller/pcie-mt7621.c ++++ b/drivers/pci/controller/pcie-mt7621.c +@@ -471,7 +471,8 @@ static int mt7621_pcie_register_host(str + } + + static const struct soc_device_attribute mt7621_pcie_quirks_match[] = { +- { .soc_id = "mt7621", .revision = "E2" } ++ { .soc_id = "mt7621", .revision = "E2" }, ++ { /* sentinel */ } + }; + + static int mt7621_pcie_probe(struct platform_device *pdev) diff --git a/queue-6.0/series b/queue-6.0/series new file mode 100644 index 00000000000..65112145bce --- /dev/null +++ b/queue-6.0/series @@ -0,0 +1 @@ +pci-mt7621-add-sentinel-to-quirks-table.patch