Bug 151681

Summary: pata_legacy causes interrupt conflict on IRQ 14, breaking GPIO/I2C
Product: Drivers Reporter: Reuben D'Netto (rdnetto)
Component: ParallelAssignee: drivers_parallel
Status: RESOLVED INSUFFICIENT_DATA    
Severity: normal CC: andy.shevchenko
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.4+ Subsystem:
Regression: No Bisected commit-id:

Description Reuben D'Netto 2016-08-07 05:21:29 UTC
Summary:
I2C trackpad doesn't work on Lenovo Yoga 700-11ISK, due to an interrupt conflict between pata_legacy and sunrisepoint-pinctrl.

Kernel log (excerpts):
    [  +0.000209] genirq: Flags mismatch irq 14. 00000080 (INT344B:00) vs. 00000000 (platform[pata_legacy.0])

    [  +0.000079] sunrisepoint-pinctrl INT344B:00: failed to request interrupt
    [  +0.020469] sunrisepoint-pinctrl: probe of INT344B:00 failed with error -16

    [  +0.226303] i2c_hid i2c-ITE8350:00: Failed to get GPIO interrupt
    [  +0.009366] i2c_hid: probe of i2c-ITE8350:00 failed with error -2
    [  +0.019873] i2c_hid i2c-SYNA2B23:00: Failed to get GPIO interrupt
    [  +0.012687] i2c_hid: probe of i2c-SYNA2B23:00 failed with error -2

Analysis:
- pata_legacy acquires IRQ 14 without IRQF_SHARED.
- the pin controller (sunrise point) is therefore unable to initialise the GPIO chip
- i2c_hid then fails on calling gpiod_get()
- trackpad is connected via I2C, and therefore unusable

Workaround:
pata_legacy is an IDE driver, and therefore not needed on a modern laptop. Since it's included in the initrd, blacklisting via modprobe.d is insufficient - it needs to be either blacklisted via a kernel parameter or removed from the initrd completely (how to best do this is distro-specific).

Possible fix:
pata_legacy should release the interrupt after it has established there are no IDE devices present.

Additional notes:
This affects kernel 4.4 and later. 4.3 is unaffected.
Tested under Sabayon amd64.

Since Sunrise Point is the chipset used with Intel Skylake CPUs, other Skylake devices may be affected.
Comment 1 Andy Shevchenko 2022-09-07 09:19:19 UTC
Is there any news about the issue? Does it appear on v5.19.y kernel versions?
Comment 2 Andy Shevchenko 2022-11-24 12:01:06 UTC
Closed for now as no additional information provided. Feel free to reopen if bug still present on newest vanilla kernels (v6.2-rc6 as of today, for example).