linux-stable/drivers
Guilherme G. Piccoli b5a10c5f75 nvme: apply DELAY_BEFORE_CHK_RDY quirk at probe time too
Commit 54adc01055 ("nvme/quirk: Add a delay before checking for adapter
readiness") introduced a quirk to adapters that cannot read the bit
NVME_CSTS_RDY right after register NVME_REG_CC is set; these adapters
need a delay or else the action of reading the bit NVME_CSTS_RDY could
somehow corrupt adapter's registers state and it never recovers.

When this quirk was added, we checked ctrl->tagset in order to avoid
quirking in probe time, supposing we would never require such delay
during probe. Well, it was too optimistic; we in fact need this quirk
at probe time in some cases, like after a kexec.

In some experiments, after abnormal shutdown of machine (aka power cord
unplug), we booted into our bootloader in Power, which is a Linux kernel,
and kexec'ed into another distro. If this kexec is too quick, we end up
reaching the probe of NVMe adapter in that distro when adapter is in
bad state (not fully initialized on our bootloader). What happens next
is that nvme_wait_ready() is unable to complete, except if the quirk is
enabled.

So, this patch removes the original ctrl->tagset verification in order
to enable the quirk even on probe time.

Fixes: 54adc01055 ("nvme/quirk: Add a delay before checking for adapter readiness")
Reported-by: Andrew Byrne <byrneadw@ie.ibm.com>
Reported-by: Jaime A. H. Gomez <jahgomez@mx1.ibm.com>
Reported-by: Zachary D. Myers <zdmyers@us.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Acked-by: Jeffrey Lien <Jeff.Lien@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-01-11 17:21:35 +01:00
..
accessibility
acpi Merge branches 'acpi-scan', 'acpi-sysfs', 'acpi-wdat' and 'acpi-tables' 2017-01-06 14:36:30 +01:00
amba
android
ata
atm
auxdisplay
base PM / domains: Fix 'may be used uninitialized' build warning 2016-12-31 21:52:07 +01:00
bcma
block virtio_blk: fix panic in initialization error path 2017-01-10 13:30:50 -07:00
bluetooth
bus cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
cdrom
char clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
clk One fix for a broken driver on Renesas RZ/A1 SoCs with bootloaders that don't 2017-01-06 15:35:27 -08:00
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
connector
cpufreq Merge branch 'pm-cpufreq' 2017-01-06 14:34:52 +01:00
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-12-27 17:51:36 -08:00
dax
dca
devfreq PM / devfreq: exynos-bus: Fix the wrong return value 2017-01-03 00:21:45 +01:00
dio
dma ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware PSCI fixes for v4.10 2017-01-04 16:38:39 +01:00
fmc
fpga
gpio
gpu VFIO fixes for v4.10-rc3 2017-01-06 11:19:03 -08:00
hid HID: sensor-hub: Move the memset to sensor_hub_get_feature() 2017-01-02 14:01:30 +01:00
hsi
hv clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
hwmon hwmon: (lm90) fix temp1_max_alarm attribute 2017-01-02 10:15:28 -08:00
hwspinlock
hwtracing coresight/etm3/4x: Consolidate hotplug state space 2016-12-25 10:47:44 +01:00
i2c
ide
idle
iio First round of IIO fixes for the 4.10 cycle. 2017-01-02 16:59:44 +01:00
infiniband net/mlx4_core: Fix raw qp flow steering rules under SRIOV 2016-12-29 14:17:40 -05:00
input ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
iommu IOMMU Fixes for Linux v4.10-rc2 2017-01-06 10:49:36 -08:00
ipack
irqchip Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
isdn
leds cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
lguest
lightnvm
macintosh
mailbox ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
mcb
md
media ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
memory
memstick
message
mfd
misc mei: move write cb to completion on credentials failures 2017-01-04 18:22:44 +01:00
mmc
mtd
net sh_eth: enable RX descriptor word 0 shift on SH7734 2017-01-04 16:12:14 -05:00
nfc
ntb
nubus
nvdimm
nvme nvme: apply DELAY_BEFORE_CHK_RDY quirk at probe time too 2017-01-11 17:21:35 +01:00
nvmem nvmem: fix nvmem_cell_read() return type doc 2017-01-04 18:22:47 +01:00
of
oprofile
parisc
parport
pci ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
pcmcia
perf cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
phy
pinctrl pinctrl: samsung: Fix the width of PINCFG_TYPE_DRV bitfields for Exynos5433 2016-12-30 14:27:42 +01:00
platform platform/x86: fujitsu-laptop: use brightness_set_blocking for LED-setting callbacks 2016-12-28 12:38:10 +02:00
pnp
power ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
s390 ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
sbus
scsi Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
sfi
sh
sn
soc
spi
spmi
ssb
staging staging: octeon: Call SET_NETDEV_DEV() 2017-01-03 17:11:50 +01:00
target
tc
thermal
thunderbolt
tty
uio
usb USB: fix problems with duplicate endpoint addresses 2017-01-05 19:38:40 +01:00
uwb
vfio vfio-pci: Handle error from pci_iomap 2017-01-04 08:34:39 -07:00
vhost
video video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap 2017-01-04 12:58:45 +01:00
virt
virtio
vlynq
vme
w1
watchdog
xen Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2017-01-06 10:53:21 -08:00
zorro
Kconfig
Makefile