2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers/ata
Shawn Guo e783c51cce ahci: imx: software workaround for phy reset issue in resume
When suspending imx6q systems which have rootfs on SATA, the following
error will likely be seen in resume.  The SATA link will fail to come
up, and it results in an unusable system across the suspend/resume
cycle.

$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
PM: Entering mem sleep
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
PM: suspend of devices complete after 61.914 msecs
PM: suspend devices took 0.070 seconds
PM: late suspend of devices complete after 4.906 msecs
PM: noirq suspend of devices complete after 4.521 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Enabling non-boot CPUs ...
CPU1: Booted secondary processor
CPU1 is up
CPU2: Booted secondary processor
CPU2 is up
CPU3: Booted secondary processor
CPU3 is up
PM: noirq resume of devices complete after 10.486 msecs
PM: early resume of devices complete after 4.679 msecs
sd 0:0:0:0: [sda] Starting disk
PM: resume of devices complete after 22.674 msecs
PM: resume devices took 0.030 seconds
PM: Finishing wakeup.
Restarting tasks ... done.
$ ata1: SATA link down (SStatus 1 SControl 300)
ata1: SATA link down (SStatus 1 SControl 300)
ata1: limiting SATA link speed to 1.5 Gbps
ata1: SATA link down (SStatus 1 SControl 310)
ata1.00: disabled
ata1: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen t4
ata1: irq_stat 0x00000040, connection status changed
ata1: SError: { CommWake DevExch }
ata1: hard resetting link
sd 0:0:0:0: rejecting I/O to offline device
sd 0:0:0:0: killing request
sd 0:0:0:0: rejecting I/O to offline device
Aborting journal on device sda2-8.
sd 0:0:0:0: rejecting I/O to offline device
EXT4-fs warning (device sda2): ext4_end_bio:317: I/O error writing to inode 132577 (offset 0 size 0 starting block 26235)
Buffer I/O error on device sda2, logical block 10169
...

It's caused by a silicon issue that SATA phy does not get reset by
controller when coming back from LPM.  The patch adds a software
workaround for this issue.  It enforces a software reset on SATA phy
in imx_sata_enable() function, so that we can ensure SATA link will
come up properly in both power-on and resume.

The software reset is implemented by writing phy reset register through
the phy control register bus interface.  Functions
imx_phy_reg_[addressing|write|read]() implement this bus interface, while
imx_sata_phy_reset() performs the actually reset operation.

Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2014-05-04 15:04:36 -04:00
..
acard-ahci.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
ahci_da850.c ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller 2014-03-25 15:17:13 -04:00
ahci_imx.c ahci: imx: software workaround for phy reset issue in resume 2014-05-04 15:04:36 -04:00
ahci_platform.c ata: move library code from ahci_platform.c to libahci_platform.c 2014-03-25 15:17:13 -04:00
ahci_st.c ata: ahci_st: remove deprecated struct ahci_platform_data usage 2014-03-14 14:26:29 -04:00
ahci_sunxi.c ata: ahci_sunxi: fix code formatting 2014-03-17 10:46:54 -04:00
ahci_xgene.c ata: Fix compiler warning with APM X-Gene host controller driver 2014-03-18 16:01:04 -04:00
ahci.c ahci: disable DEVSLP for Intel Valleyview 2014-04-24 10:26:26 -04:00
ahci.h ahci: disable DEVSLP for Intel Valleyview 2014-04-24 10:26:26 -04:00
ata_generic.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
ata_piix.c ata_piix: minor typo and a printk fix 2013-10-13 16:17:48 -04:00
Kconfig ata: fix i.MX AHCI driver dependencies 2014-04-08 08:31:48 -04:00
libahci_platform.c ata: move library code from ahci_platform.c to libahci_platform.c 2014-03-25 15:17:13 -04:00
libahci.c ahci: disable DEVSLP for Intel Valleyview 2014-04-24 10:26:26 -04:00
libata-acpi.c ACPI and power management updates for 3.15-rc1 2014-04-01 12:48:54 -07:00
libata-core.c libata/ahci: accommodate tag ordered controllers 2014-04-18 15:56:03 -04:00
libata-eh.c libata, libsas: kill pm_result and related cleanup 2014-03-18 16:08:38 -04:00
libata-pmp.c ata: enable quirk from jmicron JMB350 for JMB394 2014-01-31 07:05:44 -05:00
libata-scsi.c Merge branch 'for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-01-21 18:16:08 -08:00
libata-sff.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-transport.c libata: Fix display of sata speed 2013-10-27 07:43:25 -04:00
libata-transport.h [libata] Add ATA transport class 2010-10-21 20:21:03 -04:00
libata-zpodd.c libata: zpodd: eliminate odd_can_poweroff 2014-03-14 11:23:47 -04:00
libata.h ATA / ACPI: remove power dependent device handling 2013-10-17 15:38:53 +02:00
Makefile ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller 2014-03-25 15:17:13 -04:00
pata_acpi.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ali.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
pata_amd.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_arasan_cf.c pata_arasan_cf: fix ata_host_activate() failure handling 2014-04-14 13:50:03 -04:00
pata_artop.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_at32.c ata: use dev_get_platdata() 2013-07-30 08:59:24 -04:00
pata_at91.c pata_at91: fix ata_host_activate() failure handling 2014-04-02 13:17:31 -04:00
pata_atiixp.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_atp867x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_bf54x.c ata: use platform_{get,set}_drvdata() 2013-05-24 10:26:13 +09:00
pata_cmd64x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cmd640.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5520.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5530.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5535.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5536.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cypress.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_efar.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ep93xx.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt3x2n.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt3x3.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt37x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt366.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_icside.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_imx.c Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-03-31 15:27:37 -07:00
pata_isapnp.c pata_isapnp: Don't use invalid I/O ports 2013-10-07 15:17:32 -04:00
pata_it821x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_it8213.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ixp4xx_cf.c DMA-API: others: use dma_set_coherent_mask() 2013-10-31 14:49:07 +00:00
pata_jmicron.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_legacy.c pata_legacy: Remove dead code 2014-03-11 08:30:53 -04:00
pata_macio.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
pata_marvell.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_mpc52xx.c ata: use platform_{get,set}_drvdata() 2013-05-24 10:26:13 +09:00
pata_mpiix.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_netcell.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ninja32.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ns87410.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ns87415.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_octeon_cf.c DMA-API: ata: pata_octeon_cf: convert to use dma_coerce_mask_and_coherent() 2013-10-31 14:48:49 +00:00
pata_of_platform.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_oldpiix.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_opti.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_optidma.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_palmld.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_pcmcia.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pdc202xx_old.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pdc2027x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_piccolo.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_platform.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pxa.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_radisys.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_rb532_cf.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_rdc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_rz1000.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_samsung_cf.c pata_samsung_cf: fix ata_host_activate() failure handling 2014-04-15 08:48:56 -04:00
pata_sc1200.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_scc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sch.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_serverworks.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sil680.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sis.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sl82c105.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_triflex.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_via.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pdc_adma.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_dwc_460ex.c ata: remove superfluous casts 2014-03-26 12:36:53 -04:00
sata_fsl.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
sata_highbank.c ata: sata_highbank: remove superfluous cast 2014-03-26 11:42:01 -04:00
sata_inic162x.c libata: make it clear that sata_inic162x is experimental 2013-07-22 17:11:14 -04:00
sata_mv.c Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-02-20 12:04:15 -08:00
sata_nv.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_promise.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_promise.h libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_qstor.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_rcar.c sata_rcar: Add R-Car Gen2 SATA PHY support 2013-11-29 15:41:17 -05:00
sata_sil24.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
sata_sil.c Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-03-31 15:27:37 -07:00
sata_sis.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_svw.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_sx4.c ata: remove superfluous casts 2014-03-26 12:36:53 -04:00
sata_uli.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_via.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_vsc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sis.h libata: PATA-mode fixes for sis_sata 2007-07-02 10:17:42 -04:00