alistair23-linux/drivers/ata
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
..
acard-ahci.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
ahci.c PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI 2015-08-24 15:27:11 -05:00
ahci.h ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
ahci_brcmstb.c ata: add Broadcom AHCI SATA3 driver for STB chips 2015-05-24 20:11:25 -04:00
ahci_ceva.c drivers: ata: add support for Ceva sata host controller 2015-06-10 11:15:17 +09:00
ahci_da850.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_imx.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_mvebu.c Merge branch 'for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-06-25 16:49:21 -07:00
ahci_platform.c ata: ahci_platform: Add ACPI _CLS matching 2015-07-07 01:55:21 +02:00
ahci_st.c ata: ahci_st: fixup layering violations / drvdata errors 2015-04-20 13:36:38 -04:00
ahci_sunxi.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_tegra.c ata: ahci_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
ahci_xgene.c ata: ahci_xgene: potential NULL dereference in probe 2015-05-18 16:43:23 -04:00
ata_generic.c
ata_piix.c
Kconfig ata: ahci_platform: Add ACPI _CLS matching 2015-07-07 01:55:21 +02:00
libahci.c Merge branch 'for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-06-25 16:49:21 -07:00
libahci_platform.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
libata-acpi.c
libata-core.c Merge branch 'for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-06-25 16:49:21 -07:00
libata-eh.c Merge branch 'for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-06-25 16:49:21 -07:00
libata-pmp.c
libata-scsi.c libata-eh: Set 'information' field for autosense 2015-03-27 11:59:22 -04:00
libata-sff.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
libata-trace.c libata: Add tracepoints 2015-03-27 11:59:22 -04:00
libata-transport.c libata: Expose TRIM capability in sysfs 2015-05-05 09:30:18 -04:00
libata-transport.h
libata-zpodd.c
libata.h libata-eh: Set 'information' field for autosense 2015-03-27 11:59:22 -04:00
Makefile drivers: ata: add support for Ceva sata host controller 2015-06-10 11:15:17 +09:00
pata_acpi.c
pata_ali.c
pata_amd.c
pata_arasan_cf.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_artop.c
pata_at32.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_at91.c ata: at91: use syscon to configure the smc 2015-05-20 16:36:50 +02:00
pata_atiixp.c
pata_atp867x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_bf54x.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_cs5530.c ata: Delete unnecessary checks before the function call "pci_dev_put" 2015-02-03 07:04:44 -05:00
pata_cs5535.c
pata_cs5536.c
pata_cypress.c
pata_efar.c
pata_ep93xx.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_hpt3x2n.c
pata_hpt3x3.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_hpt37x.c
pata_hpt366.c ata: hpt366: fix constant cast warning 2015-05-21 17:37:51 -04:00
pata_icside.c
pata_imx.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_isapnp.c PNP: ata/pata_isapnp: Use module_pnp_driver to register driver 2015-03-18 22:39:17 +01:00
pata_it821x.c
pata_it8213.c
pata_ixp4xx_cf.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_jmicron.c PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI 2015-08-24 15:27:11 -05:00
pata_legacy.c
pata_macio.c powerpc: Move Power Macintosh drivers to generic byteswappers 2015-03-23 14:29:40 +11:00
pata_marvell.c
pata_mpc52xx.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_mpiix.c
pata_netcell.c
pata_ninja32.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_ns87410.c
pata_ns87415.c
pata_octeon_cf.c pata_octeon_cf: fix broken build 2015-06-08 18:03:04 +09:00
pata_of_platform.c ata: pata_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_palmld.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_pcmcia.c
pata_pdc202xx_old.c
pata_pdc2027x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_piccolo.c
pata_platform.c ata: pata_platform: fix owner module reference mismatch for scsi host 2015-01-28 18:45:23 -05:00
pata_pxa.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_radisys.c
pata_rb532_cf.c ata: drop owner assignment from platform_drivers 2014-10-20 16:20:17 +02:00
pata_rdc.c
pata_rz1000.c
pata_samsung_cf.c libata: samsung_cf: Constify platform_device_id 2015-05-02 22:04:43 -04:00
pata_sc1200.c
pata_sch.c
pata_serverworks.c
pata_sil680.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
pata_sis.c
pata_sl82c105.c
pata_triflex.c
pata_via.c
pdc_adma.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_dwc_460ex.c sata_dwc_460ex: indent an if statement 2015-03-30 13:14:40 -04:00
sata_fsl.c sata-fsl: Apply link speed limits 2015-03-02 12:08:43 -05:00
sata_highbank.c ahci: Store irq number in struct ahci_host_priv 2015-06-03 01:37:49 -04:00
sata_inic162x.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_mv.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_nv.c ata:sata_nv - Change 1 to true for bool type variable. 2015-05-25 20:06:55 -04:00
sata_promise.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_promise.h
sata_qstor.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_rcar.c sata_rcar: extend PM methods 2015-01-19 09:04:37 -05:00
sata_sil.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_sil24.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_sis.c
sata_svw.c powerpc updates for 4.1 2015-04-16 13:53:32 -05:00
sata_sx4.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_uli.c
sata_via.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sata_vsc.c ata: remove deprecated use of pci api 2015-04-08 10:55:05 -04:00
sis.h