acrn-kernel/drivers/pnp
Hans de Goede 62a0ec9dc1 PNP: Do not disable devices on suspend when they cannot be re-enabled on resume
On an Advantech MICA-071 tablet, with a builtin barcode scanner connected
to ttyS0, the following message is shown on suspend:

serial 00:02: disabled

And after suspend/resume trying to use the barcode scanner / ttyS0 shows:

serial 00:02: LSR safety check engaged!

Indicating that the UARTs io-ports are no longer reachable.

This is caused by __pnp_bus_suspend() calling pnp_stop_dev() on the "00:02"
pnp device on suspend (this outputs the disabled message).

The problem is that pnp_can_write() returns false for the "00:02" pnp
device, so after disabling it (disabling its decoding of IO addresses)
during suspend, it cannot be re-enabled.

Add a pnp_can_write() check to the suspend path and only disable devices
which can actually be re-enabled on resume.

This fixes the Advantech MICA-071's ttyS0 no longer working after
a suspend/resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-11-25 19:36:52 +01:00
..
isapnp
pnpacpi ACPI: resources: Add wake_capable parameter to acpi_dev_irq_flags 2022-10-04 15:41:12 +02:00
pnpbios
Kconfig
Makefile
base.h
card.c
core.c PNP: fix name memory leak in pnp_alloc_dev() 2022-11-22 20:37:21 +01:00
driver.c PNP: Do not disable devices on suspend when they cannot be re-enabled on resume 2022-11-25 19:36:52 +01:00
interface.c
manager.c
quirks.c
resource.c
support.c
system.c