Re: [PATCH v2] i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus

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

 



On Thu, Aug 30, 2018 at 11:50:13AM +0300, Mika Westerberg wrote:
> Commit 7ae81952cda ("i2c: i801: Allow ACPI SystemIO OpRegion to conflict
> with PCI BAR") made it possible for AML code to access SMBus I/O ports
> by installing custom SystemIO OpRegion handler and blocking i80i driver
> access upon first AML read/write to this OpRegion.
> 
> However, while ThinkPad T560 does have SystemIO OpRegion declared under
> the SMBus device, it does not access any of the SMBus registers:
> 
>     Device (SMBU)
>     {
>         ...
> 
>         OperationRegion (SMBP, PCI_Config, 0x50, 0x04)
>         Field (SMBP, DWordAcc, NoLock, Preserve)
>         {
>             ,   5,
>             TCOB,   11,
>             Offset (0x04)
>         }
> 
>         Name (TCBV, 0x00)
>         Method (TCBS, 0, NotSerialized)
>         {
>             If ((TCBV == 0x00))
>             {
>             TCBV = (\_SB.PCI0.SMBU.TCOB << 0x05)
>             }
> 
>             Return (TCBV) /* \_SB_.PCI0.SMBU.TCBV */
>         }
> 
>         OperationRegion (TCBA, SystemIO, TCBS (), 0x10)
>         Field (TCBA, ByteAcc, NoLock, Preserve)
>         {
>             Offset (0x04),
>             ,   9,
>             CPSC,   1
>         }
>     }
> 
> Problem with the current approach is that it blocks all I/O port access
> and because this system has touchpad connected to the SMBus controller
> after first AML access (happens during suspend/resume cycle) the
> touchpad fails to work anymore.
> 
> Fix this so that we allow ACPI AML I/O port access if it does not touch
> the region reserved for the SMBus.
> 
> Fixes: 7ae81952cda ("i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=200737
> Reported-by: Yussuf Khalil <dev@xxxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> Reviewed-by: Jean Delvare <jdelvare@xxxxxxx>

Applied to for-current, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux