]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
usb: typec: ucsi: acpi: add quirk for ASUS Zenbook UM325
authorSamuel Čavoj <samuel@cavoj.net>
Wed, 5 Apr 2023 13:44:56 +0000 (16:44 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:37:58 +0000 (11:37 +0200)
commitdbbcf2b650f86a4a8cecaeafed6cd548e3a287bc
treedf20d12ea4036b48e4691aa24777bdb6d22c8116
parent67a7b353c6c4c17a846fc107493fe12e30a6fc29
usb: typec: ucsi: acpi: add quirk for ASUS Zenbook UM325

BugLink: https://bugs.launchpad.net/bugs/2028808
[ Upstream commit 326e1c208f3f24d14b93f910b8ae32c94923d22c ]

On some ACPI platforms (namely the ASUS Zenbook UM325) the _DSM method must
not be called after a notification is received but instead the mailbox
should be read immediately from RAM. This is because the ACPI interrupt
handler destroys the CCI in ERAM after copying to system memory, and when
_DSM is later called to perform a second copy, it retrieves a garbage
value.

Instead, the _DSM(read) method should only be called when necessary, i.e.
for polling the state after reset and for retrieving the version. Other
reads should not call _DSM and only peek into the RAM region.

This adds a separate read operation for the Zenbook that syncs the
ACPI mailbox only with polled commands.

Link: https://lore.kernel.org/linux-usb/20210823180626.tb6m7h5tp6adhvt2@fastboi.localdomain/
Signed-off-by: Samuel Čavoj <samuel@cavoj.net>
[ heikki : handling everything in ucsi_acpi.c with DMI quirk ]
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230405134456.49607-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/typec/ucsi/ucsi_acpi.c