Hi All,
My mouse and keyboard don't work anymore with the latest git kernel on my X5000. My X1000 isn't affected.
I figured out that the
devicetree updates are responsible for this issue.
After reverting the
devicetree updates with the command
Code: Select all
git revert 86c87bea6b42100c67418af690919c44de6ede6e -m 1
Code: Select all
Removing drivers/of/unittest-data/overlay_20.dts
Removing drivers/of/unittest-data/overlay_19.dts
Removing drivers/of/unittest-data/overlay_18.dts
Removing drivers/of/unittest-data/overlay_17.dts
Removing drivers/of/unittest-data/overlay_16.dts
Auto-merging drivers/of/platform.c
Auto-merging MAINTAINERS
Auto-merging Documentation/devicetree/bindings/vendor-prefixes.yaml
Removing Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
Removing Documentation/devicetree/bindings/timer/rda,8810pl-timer.yaml
Removing Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml
Removing Documentation/devicetree/bindings/spi/qcom,spi-qup.yaml
Removing Documentation/devicetree/bindings/sound/arm,pl041.yaml
Removing Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml
Removing Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml
Removing Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.yaml
Removing Documentation/devicetree/bindings/soc/fsl/fsl,layerscape-scfg.yaml
Removing Documentation/devicetree/bindings/soc/fsl/fsl,layerscape-dcfg.yaml
Removing Documentation/devicetree/bindings/serio/arm,pl050.yaml
Removing Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
Removing Documentation/devicetree/bindings/perf/spe-pmu.yaml
Removing Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml
Removing Documentation/devicetree/bindings/net/smsc,lan91c111.yaml
Removing Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
Removing Documentation/devicetree/bindings/net/asix,ax88178.yaml
Removing Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml
Removing Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
Removing Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml
Removing Documentation/devicetree/bindings/i2c/qcom,i2c-qup.yaml
Removing Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
Removing Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml
Removing Documentation/devicetree/bindings/gnss/mediatek.yaml
Removing Documentation/devicetree/bindings/gnss/brcm,bcm4751.yaml
Removing Documentation/devicetree/bindings/display/arm,pl11x.yaml
Removing Documentation/devicetree/bindings/display/arm,malidp.yaml
Removing Documentation/devicetree/bindings/display/arm,komeda.yaml
Removing Documentation/devicetree/bindings/display/arm,hdlcd.yaml
Removing Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml
Removing Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml
Removing Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
Removing Documentation/devicetree/bindings/arm/vexpress-config.yaml
Removing Documentation/devicetree/bindings/arm/sp810.yaml
Removing Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml
hint: Waiting for your editor to close the file...
Revert "Merge tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux"
This reverts commit 86c87bea6b42100c67418af690919c44de6ede6e, reversing
changes made to d223575e50f8da0de358c0098defd560069ecf66.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
# modified: Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt
# new file: Documentation/devicetree/bindings/arm/freescale/fsl,layerscape-dcfg.txt
# new file: Documentation/devicetree/bindings/arm/freescale/fsl,layerscape-scfg.txt
# modified: Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
# new file: Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
# new file: Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
# deleted: Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml
# new file: Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
# new file: Documentation/devicetree/bindings/arm/sp810.txt
# deleted: Documentation/devicetree/bindings/arm/sp810.yaml
# new file: Documentation/devicetree/bindings/arm/spe-pmu.txt
# deleted: Documentation/devicetree/bindings/arm/vexpress-config.yaml
# new file: Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
# deleted: Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
# deleted: Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml
# deleted: Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml
# modified: Documentation/devicetree/bindings/clock/samsung,exynos4412-isp-clock.yaml
# modified: Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml
# modified: Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml
# new file: Documentation/devicetree/bindings/display/arm,hdlcd.txt
# deleted: Documentation/devicetree/bindings/display/arm,hdlcd.yaml
# new file: Documentation/devicetree/bindings/display/arm,komeda.txt
# deleted: Documentation/devicetree/bindings/display/arm,komeda.yaml
# new file: Documentation/devicetree/bindings/display/arm,malidp.txt
# deleted: Documentation/devicetree/bindings/display/arm,malidp.yaml
# new file: Documentation/devicetree/bindings/display/arm,pl11x.txt
# deleted: Documentation/devicetree/bindings/display/arm,pl11x.yaml
# modified: Documentation/devicetree/bindings/display/bridge/google,cros-ec-anx7688.yaml
# modified: Documentation/devicetree/bindings/display/bridge/ps8640.yaml
# modified: Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
# modified: Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml
# modified: Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
# modified: Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml
[master 11c544686437] Revert "Merge tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux"
188 files changed, 1997 insertions(+), 4364 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,layerscape-dcfg.txt
create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,layerscape-scfg.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
create mode 100644 Documentation/devicetree/bindings/arm/sp810.txt
delete mode 100644 Documentation/devicetree/bindings/arm/sp810.yaml
create mode 100644 Documentation/devicetree/bindings/arm/spe-pmu.txt
delete mode 100644 Documentation/devicetree/bindings/arm/vexpress-config.yaml
create mode 100644 Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
delete mode 100644 Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
delete mode 100644 Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml
delete mode 100644 Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml
create mode 100644 Documentation/devicetree/bindings/display/arm,hdlcd.txt
delete mode 100644 Documentation/devicetree/bindings/display/arm,hdlcd.yaml
create mode 100644 Documentation/devicetree/bindings/display/arm,komeda.txt
delete mode 100644 Documentation/devicetree/bindings/display/arm,komeda.yaml
create mode 100644 Documentation/devicetree/bindings/display/arm,malidp.txt
delete mode 100644 Documentation/devicetree/bindings/display/arm,malidp.yaml
create mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.txt
delete mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.yaml
create mode 100644 Documentation/devicetree/bindings/eeprom/at24.txt
delete mode 100644 Documentation/devicetree/bindings/gnss/brcm,bcm4751.yaml
create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
delete mode 100644 Documentation/devicetree/bindings/gnss/mediatek.yaml
create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt
delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml
delete mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-qup.txt
delete mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-qup.yaml
create mode 100644 Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.txt
delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml
create mode 100644 Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt
delete mode 100644 Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml
delete mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml
create mode 100644 Documentation/devicetree/bindings/mtd/common.txt
delete mode 100644 Documentation/devicetree/bindings/net/asix,ax88178.yaml
delete mode 100644 Documentation/devicetree/bindings/net/microchip,lan95xx.yaml
delete mode 100644 Documentation/devicetree/bindings/net/smsc,lan91c111.yaml
create mode 100644 Documentation/devicetree/bindings/net/smsc-lan91c111.txt
delete mode 100644 Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml
create mode 100644 Documentation/devicetree/bindings/pci/uniphier-pcie.txt
delete mode 100644 Documentation/devicetree/bindings/perf/spe-pmu.yaml
create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt
create mode 100644 Documentation/devicetree/bindings/rtc/rtc.txt
create mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
delete mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
delete mode 100644 Documentation/devicetree/bindings/serio/arm,pl050.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/fsl/fsl,layerscape-dcfg.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/fsl/fsl,layerscape-scfg.yaml
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt
delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.yaml
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/ti/wkup-m3-ipc.yaml
create mode 100644 Documentation/devicetree/bindings/soc/ti/wkup_m3_ipc.txt
delete mode 100644 Documentation/devicetree/bindings/sound/arm,pl041.yaml
create mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
delete mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qup.yaml
create mode 100644 Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
delete mode 100644 Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml
create mode 100644 Documentation/devicetree/bindings/timer/rda,8810pl-timer.txt
delete mode 100644 Documentation/devicetree/bindings/timer/rda,8810pl-timer.yaml
delete mode 100644 Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
create mode 100644 Documentation/devicetree/bindings/timer/ti,timer.txt
delete mode 100644 drivers/of/unittest-data/overlay_16.dts
delete mode 100644 drivers/of/unittest-data/overlay_17.dts
delete mode 100644 drivers/of/unittest-data/overlay_18.dts
delete mode 100644 drivers/of/unittest-data/overlay_19.dts
delete mode 100644 drivers/of/unittest-data/overlay_20.dts
my keyboard and mouse work without any problems.
I figured out that the issue is somewhere in the following files:
Code: Select all
-rw-r--r-- drivers/of/fdt.c 3
-rw-r--r-- drivers/of/irq.c 15
-rw-r--r-- drivers/of/overlay.c 339
-rw-r--r-- drivers/of/platform.c 14
-rw-r--r-- drivers/of/property.c 5
-rw-r--r-- drivers/of/unittest-data/Makefile 10
-rw-r--r-- drivers/of/unittest-data/overlay_16.dts 15
-rw-r--r-- drivers/of/unittest-data/overlay_17.dts 15
-rw-r--r-- drivers/of/unittest-data/overlay_18.dts 15
-rw-r--r-- drivers/of/unittest-data/overlay_19.dts 15
-rw-r--r-- drivers/of/unittest-data/overlay_20.dts 15
-rw-r--r-- drivers/of/unittest.c
OK, new result. The issue is in the file
a/drivers/of/platform.c. The following patch is responsible for the issue:
platform.c.
This patch is in the
devicetree updates.
I created a patch for reverting the problematic code:
of.patch:
Code: Select all
--- a/drivers/of/platform.c 2022-05-26 18:46:15.551656025 +0200
+++ b/drivers/of/platform.c 2022-05-22 21:52:31.000000000 +0200
@@ -114,31 +114,35 @@ struct platform_device *of_device_alloc(
struct device *parent)
{
struct platform_device *dev;
- int rc, i, num_reg = 0;
+ int rc, i, num_reg = 0, num_irq;
struct resource *res, temp_res;
dev = platform_device_alloc("", PLATFORM_DEVID_NONE);
if (!dev)
return NULL;
- /* count the io resources */
+ /* count the io and irq resources */
while (of_address_to_resource(np, num_reg, &temp_res) == 0)
num_reg++;
+ num_irq = of_irq_count(np);
/* Populate the resource table */
- if (num_reg) {
- res = kcalloc(num_reg, sizeof(*res), GFP_KERNEL);
+ if (num_irq || num_reg) {
+ res = kcalloc(num_irq + num_reg, sizeof(*res), GFP_KERNEL);
if (!res) {
platform_device_put(dev);
return NULL;
}
- dev->num_resources = num_reg;
+ dev->num_resources = num_reg + num_irq;
dev->resource = res;
for (i = 0; i < num_reg; i++, res++) {
rc = of_address_to_resource(np, i, res);
WARN_ON(rc);
}
+ if (of_irq_to_resource_table(np, res, num_irq) != num_irq)
+ pr_debug("not all legacy IRQ resources mapped for %pOFn\n",
+ np);
}
dev->dev.of_node = of_node_get(np);
Cheers,
Christian