remarkable-linux/drivers/pci
Zhang Rui 91f15fb30c PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI
On multi-function JMicron SATA/PATA/AHCI devices, the PATA controller at
function 1 doesn't work if it is powered on before the SATA controller at
function 0.  The result is that PATA doesn't work after resume, and we
print messages like this:

  pata_jmicron 0000:02:00.1: Refused to change power state, currently in D3
  irq 17: nobody cared (try booting with the "irqpoll" option)

Async resume was introduced in v3.15 by 76569faa62 ("PM / sleep:
Asynchronous threads for resume_noirq").  Prior to that, we powered on
the functions in order, so this problem shouldn't happen.

e6b7e41cdd ("ata: Disabling the async PM for JMicron chip 363/361")
solved the problem for JMicron 361 and 363 devices.  With async suspend
disabled, we always power on function 0 before function 1.

Barto then reported the same problem with a JMicron 368 (see comment #57 in
the bugzilla).

Rather than extending the blacklist piecemeal, disable async suspend for
all JMicron multi-function SATA/PATA/AHCI devices.

This quirk could stay in the ahci and pata_jmicron drivers, but it's likely
the problem will occur even if pata_jmicron isn't loaded until after the
suspend/resume.  Making it a PCI quirk ensures that we'll preserve the
power-on order even if the drivers aren't loaded.

[bhelgaas: changelog, limit to multi-function, limit to IDE/ATA]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81551
Reported-and-tested-by: Barto <mister.freeman@laposte.net>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org	# v3.15+
2015-08-24 15:27:11 -05:00
..
host Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
hotplug PCI: pciehp: Inline the "handle event" functions into the ISR 2015-06-18 16:14:49 -05:00
pcie PCI: Fix pcie_port_device_resume() comment 2015-07-14 13:41:04 -05:00
access.c PCI: Add dev_flags bit to access VPD through function 0 2015-07-21 13:11:53 -05:00
ats.c
bus.c PCI: Add pci_bus_addr_t 2015-05-29 17:21:45 -05:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c PCI: Add pcibios_iov_resource_alignment() interface 2015-03-31 13:02:36 +11:00
irq.c
Kconfig PCI: Add pci_bus_addr_t 2015-05-29 17:21:45 -05:00
Makefile PCI: Remove PCI ioapic driver 2014-12-16 14:08:14 +01:00
msi.c PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI 2015-05-07 09:52:21 -05:00
of.c
pci-acpi.c PCI / ACPI: Fix pci_acpi_optimize_delay() comment 2015-07-15 15:11:50 -05:00
pci-driver.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
pci-label.c PCI: Make a shareable UUID for PCI firmware ACPI _DSM 2015-04-08 14:39:30 -05:00
pci-stub.c
pci-sysfs.c PCI: Don't read past the end of sysfs "driver_override" buffer 2015-02-24 17:35:37 -06:00
pci.c PCI: Remove useless redundant code 2015-07-14 23:35:37 -05:00
pci.h PCI: Move PCI_FIND_CAP_TTL to pci.h and use it in quirks 2015-07-14 23:35:36 -05:00
probe.c PCI: Shift PCI_CLASS_NOT_DEFINED consistently with other classes 2015-07-14 13:40:39 -05:00
proc.c
quirks.c PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI 2015-08-24 15:27:11 -05:00
remove.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
rom.c PCI: Fix infinite loop with ROM image of size 0 2015-01-23 17:42:59 -06:00
search.c
setup-bus.c PCI: Preserve resource size during alignment reordering 2015-06-01 17:56:32 -05:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Mark invalid BARs as unassigned 2015-03-12 18:52:12 -05:00
slot.c
syscall.c
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c
xen-pcifront.c xen: features and cleanups for 4.2-rc0 2015-07-01 11:53:46 -07:00