linux/drivers
Michael Schmitz 39581715d6 block: ataflop: more blk-mq refactoring fixes
[ Upstream commit d28e4dff08 ]

As it turns out, my earlier patch in commit 86d46fdaa1 (block:
ataflop: fix breakage introduced at blk-mq refactoring) was
incomplete. This patch fixes any remaining issues found during
more testing and code review.

Requests exceeding 4 k are handled in 4k segments but
__blk_mq_end_request() is never called on these (still
sectors outstanding on the request). With redo_fd_request()
removed, there is no provision to kick off processing of the
next segment, causing requests exceeding 4k to hang. (By
setting /sys/block/fd0/queue/max_sectors_k <= 4 as workaround,
this behaviour can be avoided).

Instead of reintroducing redo_fd_request(), requeue the remainder
of the request by calling blk_mq_requeue_request() on incomplete
requests (i.e. when blk_update_request() still returns true), and
rely on the block layer to queue the residual as new request.

Both error handling and formatting needs to release the
ST-DMA lock, so call finish_fdc() on these (this was previously
handled by redo_fd_request()). finish_fdc() may be called
legitimately without the ST-DMA lock held - make sure we only
release the lock if we actually held it. In a similar way,
early exit due to errors in ataflop_queue_rq() must release
the lock.

After minor errors, fd_error sets up to recalibrate the drive
but never re-runs the current operation (another task handled by
redo_fd_request() before). Call do_fd_action() to get the next
steps (seek, retry read/write) underway.

Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Fixes: 6ec3938cff (ataflop: convert to blk-mq)
CC: linux-block@vger.kernel.org
Link: https://lore.kernel.org/r/20211024002013.9332-1-schmitzmic@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 19:16:41 +01:00
..
accessibility
acpi ACPI: PM: Fix sharing of wakeup power resources 2021-11-18 19:16:35 +01:00
amba ARM: 9120/1: Revert "amba: make use of -1 IRQs warn" 2021-11-06 14:13:31 +01:00
android binder: don't detect sender/target during buffer cleanup 2021-11-12 15:05:49 +01:00
ata libata: fix checking of DMA state 2021-11-18 19:16:00 +01:00
atm
auxdisplay
base component: do not leave master devres group open after bind 2021-11-18 19:16:08 +01:00
bcma Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
block block: ataflop: more blk-mq refactoring fixes 2021-11-18 19:16:41 +01:00
bluetooth Bluetooth: hci_h5: Fix (runtime)suspend issues on RTL8723BS HCIs 2021-11-18 19:16:25 +01:00
bus Driver core fixes for 5.15-rc6 2021-10-17 17:17:28 -10:00
cdrom
char hwrng: mtk - Force runtime pm ops for sleep ops 2021-11-18 19:16:31 +01:00
clk One fix for the composite clk that broke when we changed this clk type 2021-10-30 09:55:46 -07:00
clocksource clocksource/drivers/timer-ti-dm: Select TIMER_OF 2021-11-18 19:16:39 +01:00
comedi comedi: vmk80xx: fix bulk and interrupt message timeouts 2021-11-12 15:05:51 +01:00
connector
counter
cpufreq cpufreq: Make policy min/max hard requirements 2021-11-18 19:16:14 +01:00
cpuidle cpuidle: Fix kobject memory leaks in error paths 2021-11-18 19:16:29 +01:00
crypto crypto: octeontx2 - set assoclen in aead_do_fallback() 2021-11-18 19:16:33 +01:00
cxl cxl/pci: Fix NULL vs ERR_PTR confusion 2021-11-18 19:16:04 +01:00
dax libnvdimm for v5.15 2021-09-09 11:39:57 -07:00
dca
devfreq devfreq: use HZ macros 2021-09-08 11:50:26 -07:00
dio
dma dmaengine updates for v5.15-rc1 2021-09-09 11:07:47 -07:00
dma-buf dma-buf: WARN on dmabuf release with pending attachments 2021-11-18 19:16:08 +01:00
edac EDAC/amd64: Handle three rank interleaving mode 2021-11-18 19:16:30 +01:00
eisa
extcon
firewire FireWire (IEEE 1394) subsystem updates: 2021-09-11 09:47:33 -07:00
firmware firmware/psci: fix application of sizeof to pointer 2021-11-18 19:15:53 +01:00
fpga fpga: ice40-spi: Add SPI device ID table 2021-09-27 14:00:41 -07:00
fsi
gnss
gpio gpio: mlxbf2.c: Add check for bgpio_init failure 2021-10-25 10:15:05 +02:00
gpu drm/msm/dsi: fix wrong type in msm_dsi_host 2021-11-18 19:16:39 +01:00
greybus
hid HID: surface-hid: Allow driver matching for target ID 1 devices 2021-11-18 19:15:59 +01:00
hsi
hv hyperv-fixes for 5.15 2021-10-22 10:31:32 -10:00
hwmon hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff 2021-11-18 19:16:32 +01:00
hwspinlock
hwtracing coresight: trbe: Defer the probe on offline CPUs 2021-11-18 19:16:06 +01:00
i2c i2c: mlxcpld: Modify register setting for 400KHz frequency 2021-10-04 21:56:20 +02:00
i3c
idle
iio iio: ad5770r: make devicetree property reading consistent 2021-11-18 19:16:07 +01:00
infiniband RDMA/qedr: Fix NULL deref for query_qp on the GSI QP 2021-11-18 19:16:01 +01:00
input Input: i8042 - Add quirk for Fujitsu Lifebook T725 2021-11-18 19:15:51 +01:00
interconnect interconnect: qcom: sdm660: Add missing a2noc qos clocks 2021-09-13 15:49:55 +03:00
iommu iommu/arm: fix ARM_SMMU_QCOM compilation 2021-10-13 21:28:44 +02:00
ipack ipack: ipoctal: fix module reference leak 2021-09-27 17:38:49 +02:00
irqchip irq: mips: avoid nested irq_enter() 2021-11-18 19:16:40 +01:00
isdn mISDN: Fix return values of the probe function 2021-10-19 13:09:28 +01:00
leds
macintosh memblock: introduce saner 'memblock_free_ptr()' interface 2021-09-14 13:23:22 -07:00
mailbox mailbox: mtk-cmdq: Fix local clock ID usage 2021-11-18 19:16:35 +01:00
mcb mcb: fix error handling in mcb_alloc_bus() 2021-09-14 11:22:26 +02:00
md md: update superblock after changing rdev flags in state_store 2021-11-18 19:16:16 +01:00
media media: ir_toy: assignment to be16 should be of correct type 2021-11-18 19:16:34 +01:00
memory memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode 2021-11-18 19:16:01 +01:00
memstick memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host() 2021-11-18 19:16:32 +01:00
message
mfd mfd: simple-mfd-i2c: Select MFD_CORE to fix build error 2021-11-18 19:16:06 +01:00
misc eeprom: 93xx46: fix MODULE_DEVICE_TABLE 2021-10-15 10:54:02 +02:00
mmc mmc: mxs-mmc: disable regulator on error and in the remove function 2021-11-18 19:16:34 +01:00
most most: fix control-message timeouts 2021-11-18 19:16:08 +01:00
mtd mtd: rawnand: socrates: Keep the driver compatible with on-die ECC engines 2021-11-18 19:16:02 +01:00
mux
net ath10k: fix module load regression with iram-recovery feature 2021-11-18 19:16:41 +01:00
nfc nfc: port100: fix using -ERRNO as command type mask 2021-10-26 13:42:00 +01:00
ntb Bug fixes and clean-ups for Linux v5.15 2021-09-07 13:05:02 -07:00
nubus
nvdimm nvdimm/pmem: stop using q_usage_count as external pgmap refcount 2021-10-25 16:12:32 -07:00
nvme nvme-rdma: fix error code in nvme_rdma_setup_ctrl 2021-11-18 19:16:38 +01:00
nvmem nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells 2021-10-13 15:09:58 +02:00
of memblock: exclude MEMBLOCK_NOMAP regions from kmemleak 2021-10-21 18:30:49 -10:00
opp Merge branches 'pm-pci', 'pm-sleep', 'pm-domains' and 'powercap' 2021-08-30 19:25:42 +02:00
parisc parisc: Move pci_dev_is_behind_card_dino to where it is used 2021-09-09 12:44:31 +02:00
parport parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated bridge 2021-11-18 19:16:05 +01:00
pcmcia
perf KVM: arm64: Fix PMU probe ordering 2021-09-20 12:43:34 +01:00
phy Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
pinctrl pinctrl: core: fix possible memory leak in pinctrl_enable() 2021-11-18 19:16:06 +01:00
platform platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning 2021-11-18 19:16:34 +01:00
pnp
power power: supply: max17042_battery: Clear status bits in interrupt handler 2021-11-18 19:16:08 +01:00
powercap powercap: Add Power Limit4 support for Alder Lake SoC 2021-08-25 20:12:16 +02:00
pps
ps3
ptp ptp: free 'vclock_index' in ptp_clock_release() 2021-10-21 12:50:38 +01:00
pwm pwm: mtk-disp: Implement atomic API .get_state() 2021-09-02 22:27:46 +02:00
rapidio
ras
regulator regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled 2021-11-18 19:15:57 +01:00
remoteproc
reset reset: socfpga: add empty driver allowing consumers to probe 2021-10-05 12:23:16 +02:00
rpmsg
rtc rtc: cmos: Disable irq around direct invocation of cmos_interrupt() 2021-09-14 10:20:19 +02:00
s390 s390 updates for 5.15-rc4 2021-10-01 14:45:23 -07:00
sbus
scsi qed: Don't ignore devlink allocation failures 2021-11-18 19:16:25 +01:00
sh
siox
slimbus Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
soc soc: fsl: dpio: use the combined functions to protect critical zone 2021-11-18 19:16:01 +01:00
soundwire sound updates for 5.15-rc1 2021-09-01 10:29:29 -07:00
spi spi: Fixed division by zero warning 2021-11-18 19:16:24 +01:00
spmi
ssb
staging media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info 2021-11-18 19:16:14 +01:00
target scsi: target: Fix spelling mistake "CONFLIFT" -> "CONFLICT" 2021-09-22 00:17:29 -04:00
tc
tee tee: optee: Fix missing devices unregister during optee_remove 2021-10-12 13:24:39 +02:00
thermal thermal/drivers/qcom/lmh: make QCOM_LMH depends on QCOM_SCM 2021-11-18 19:16:34 +01:00
thunderbolt thunderbolt: build kunit tests without structleak plugin 2021-10-06 17:53:49 -06:00
tty Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field" 2021-11-18 19:16:08 +01:00
uio
usb USB: chipidea: fix interrupt deadlock 2021-11-18 19:16:08 +01:00
vdpa vduse: Fix race condition between resetting and irq injecting 2021-10-22 06:49:14 -04:00
vfio vfio/pci: add missing identifier name in argument of function prototype 2021-09-23 14:12:36 -06:00
vhost virtio,vdpa: fixes 2021-10-17 18:17:19 -10:00
video fbdev/efifb: Release PCI device's runtime PM ref during FB destroy 2021-11-18 19:16:22 +01:00
virt
virtio virtio-ring: fix DMA metadata flags 2021-10-27 15:54:34 -04:00
visorbus
vlynq
vme
w1
watchdog watchdog: Fix OMAP watchdog early handling 2021-10-26 20:22:51 +02:00
xen xen/balloon: add late_initcall_sync() for initial ballooning done 2021-11-18 19:16:04 +01:00
zorro
Kconfig firmware: include drivers/firmware/Kconfig unconditionally 2021-10-07 16:51:26 +02:00
Makefile