Re: [PATCH 2/5] platform/x86: x86-android-tablets: Fix EBUSY error when requesting IOAPIC IRQs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 2/23/22 15:56, Andy Shevchenko wrote:
> On Wed, Feb 23, 2022 at 02:31:50PM +0100, Hans de Goede wrote:
>> Sometimes IRQs used by GPIOs in direct-IRQ mode are already registered
>> because they are used as ACPI "Interrupt () {}" resource for one of the
>> many bogus I2C devices present in the broken DSDTs of Android x86 tablets.
>>
>> This is an issue if the existing (bogus) ACPI resource uses different
>> trigger settings then what is being requested, leading to an -EBUSY
>> error return of acpi_register_gsi().
>>
>> Fix this by calling acpi_unregister_gsi() first, so that
>> the acpi_register_gsi() is allowed to change the trigger settings.
>>
>> In cases where the GSI has not been registered yet
>> the acpi_unregister_gsi() is a no-op.
> 
> ...
> 
>>  	case X86_ACPI_IRQ_TYPE_APIC:
>> +		/*
>> +		 * The DSDT may already reference the GSI in a device skipped by
>> +		 * acpi_quirk_skip_i2c_client_enumeration(). Unregister the GSI
>> +		 * to avoid EBUSY errors in this case.
>> +		 */
>> +		acpi_unregister_gsi(data->index);
> 
> Perhaps a warning (or at least debug) message?

The function returns void, so we cannot check if it did anything or not.

Regards,

Hans




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux