2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers
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
..
accessibility
acpi PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
amba
ata ahci: imx: software workaround for phy reset issue in resume 2014-05-04 15:04:36 -04:00
atm
auxdisplay
base Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
bcma
block Merge branch 'for-3.15/drivers' of git://git.kernel.dk/linux-block 2014-04-01 19:43:53 -07:00
bluetooth
bus
cdrom
char
clk Single fix for a clock driver merged in 3.14-rc1. Without this fix the 2014-03-08 10:51:30 -08:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-01 11:00:07 -07:00
connector
cpufreq ACPI and power management updates for 3.15-rc1 2014-04-01 12:48:54 -07:00
cpuidle Merge branch 'for-3.15/core' of git://git.kernel.dk/linux-block 2014-04-01 19:19:15 -07:00
crypto
dca
devfreq PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs 2014-03-21 11:16:30 +09:00
dio
dma
edac A bunch of EDAC updates all over the place: 2014-04-01 13:54:00 -07:00
eisa
extcon extcon: Move OF helper function to extcon core and change function name 2014-03-19 14:41:58 +09:00
firewire Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2014-03-08 11:51:13 -08:00
firmware Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
fmc
gpio
gpu Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
hid USB patches for 3.15-rc1 2014-04-01 17:06:09 -07:00
hsi
hv Char/Misc driver patches for 3.15-rc1 2014-04-01 16:13:21 -07:00
hwmon hwmon: (pmbus/ltc2978) Add support for LTM4676 2014-03-19 18:59:40 -07:00
hwspinlock
i2c i2c: cpm: Fix build by adding of_address.h and of_irq.h 2014-03-24 14:54:21 +01:00
ide
idle
iio Staging driver pull request for 3.15-rc1 2014-04-01 16:45:00 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-03-09 13:50:14 -07:00
input ACPI and power management updates for 3.15-rc1 2014-04-01 12:48:54 -07:00
iommu PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
ipack
irqchip irqchip: sun7i/sun6i: Disable NMI before registering the handler 2014-03-31 11:12:57 +02:00
isdn isdn/capi: Make Middleware depend on CAPI2.0 2014-03-18 15:02:57 -04:00
leds
lguest
macintosh
mailbox
mcb drivers: mcb: Fix build error discovered by 0-day bot 2014-03-09 10:22:46 -07:00
md Merge branch 'for-3.15/drivers' of git://git.kernel.dk/linux-block 2014-04-01 19:43:53 -07:00
media Staging driver pull request for 3.15-rc1 2014-04-01 16:45:00 -07:00
memory
memstick
message PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
mfd regulator: Updates for v3.15 2014-04-01 13:17:46 -07:00
misc Staging driver pull request for 3.15-rc1 2014-04-01 16:45:00 -07:00
mmc workqueue: remove deprecated WQ_NON_REENTRANT 2014-03-29 09:33:03 -04:00
mtd Char/Misc driver patches for 3.15-rc1 2014-04-01 16:13:21 -07:00
net Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2014-03-31 15:08:51 -07:00
nfc
ntb
nubus
of Staging driver pull request for 3.15-rc1 2014-04-01 16:45:00 -07:00
oprofile
parisc
parport
pci Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
pcmcia PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
phy PHY: add APM X-Gene SoC 15Gbps Multi-purpose PHY driver 2014-03-09 12:45:13 +05:30
pinctrl Pin control bulk changes for the v3.15 series, no new core 2014-04-01 13:10:49 -07:00
platform sound updates for 3.15-rc1 2014-04-01 15:38:47 -07:00
pnp Merge branch 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-03-31 14:13:25 -07:00
power
powercap
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branches 'regulator/topic/tps65218', 'regulator/topic/tps6524x', 'regulator/topic/tps6586x', 'regulator/topic/tps65910', 'regulator/topic/tps80031', 'regulator/topic/wm831x', 'regulator/topic/wm8350' and 'regulator/topic/wm8994' into regulator-next 2014-03-26 16:58:25 +00:00
remoteproc
reset
rpmsg
rtc
s390 Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
sbus
scsi Merge branch 'for-3.15/core' of git://git.kernel.dk/linux-block 2014-04-01 19:19:15 -07:00
sfi
sh
sn
spi Merge remote-tracking branches 'spi/topic/xilinx' and 'spi/topic/xtfpga' into spi-next 2014-03-30 00:51:48 +00:00
spmi spmi: pm: drop bus-level PM suspend/resume routines 2014-03-08 22:15:52 -08:00
ssb
staging Staging driver pull request for 3.15-rc1 2014-04-01 16:45:00 -07:00
target
tc
thermal
tty TTY/Serial driver update for 3.15-rc1 2014-04-01 16:55:57 -07:00
uio
usb USB patches for 3.15-rc1 2014-04-01 17:06:09 -07:00
uwb
vfio PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
vhost vhost: validate vhost_get_vq_desc return value 2014-03-28 16:10:35 -04:00
video Char/Misc driver patches for 3.15-rc1 2014-04-01 16:13:21 -07:00
virt
virtio
vlynq
vme
w1
watchdog watchdog: Fix Elan SC520 dependencies 2014-03-31 13:36:12 +02:00
xen ACPI and power management updates for 3.15-rc1 2014-04-01 12:48:54 -07:00
zorro
Kconfig
Makefile