]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serdev: Fix detection of UART devices on Apple machines.
authorRonald Tschalär <ronald@innovation.ch>
Tue, 11 Feb 2020 19:47:23 +0000 (11:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:33 +0000 (07:18 +0100)
commit317dee815ca04683663ba848ce7d1a5b7c48ff3a
treea40563e0ec952ecc19e48bd6f9f0a91297576273
parent21c8ea95658dc12f2c6238721039cf8da26687a6
serdev: Fix detection of UART devices on Apple machines.

commit 35d4670aaec7206b5ef19c842ca33076bde562e4 upstream.

On Apple devices the _CRS method returns an empty resource template, and
the resource settings are instead provided by the _DSM method. But
commit 33364d63c75d6182fa369cea80315cf1bb0ee38e (serdev: Add ACPI
devices by ResourceSource field) changed the search for serdev devices
to require valid, non-empty resource template, thereby breaking Apple
devices and causing bluetooth devices to not be found.

This expands the check so that if we don't find a valid template, and
we're on an Apple machine, then just check for the device being an
immediate child of the controller and having a "baud" property.

Cc: <stable@vger.kernel.org> # 5.5
Fixes: 33364d63c75d ("serdev: Add ACPI devices by ResourceSource field")
Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
Link: https://lore.kernel.org/r/20200211194723.486217-1-ronald@innovation.ch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c