linux-stable/drivers
Martin Povišer 84837f43e5 i2c: pasemi: Wait for write xfers to finish
commit bd8963e602 upstream.

Wait for completion of write transfers before returning from the driver.
At first sight it may seem advantageous to leave write transfers queued
for the controller to carry out on its own time, but there's a couple of
issues with it:

 * Driver doesn't check for FIFO space.

 * The queued writes can complete while the driver is in its I2C read
   transfer path which means it will get confused by the raising of
   XEN (the 'transaction ended' signal). This can cause a spurious
   ENODATA error due to premature reading of the MRXFIFO register.

Adding the wait fixes some unreliability issues with the driver. There's
some efficiency cost to it (especially with pasemi_smb_waitready doing
its polling), but that will be alleviated once the driver receives
interrupt support.

Fixes: beb58aa39e ("i2c: PA Semi SMBus driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:23:30 +02:00
..
accessibility
acpi ACPI: processor idle: Check for architectural support for LPI 2022-04-20 09:23:09 +02:00
amba
android
ata ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs 2022-04-20 09:23:22 +02:00
atm
auxdisplay
base PM: core: keep irq flags in device_pm_check_callbacks() 2022-04-08 14:40:32 +02:00
bcma
block drbd: Fix five use after free bugs in get_initial_state 2022-04-13 21:01:06 +02:00
bluetooth Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt 2022-04-08 14:40:22 +02:00
bus mips: cdmm: Fix refcount leak in mips_cdmm_phys_base 2022-04-08 14:40:20 +02:00
cdrom
char virtio_console: eliminate anonymous module_init & module_exit 2022-04-13 21:01:02 +02:00
clk clk: Enforce that disjoints limits are invalid 2022-04-13 21:01:02 +02:00
clocksource
connector
counter
cpufreq cpufreq: qcom-cpufreq-nvmem: fix reading of PVS Valid fuse 2022-04-08 14:40:24 +02:00
cpuidle
crypto
dax
dca
devfreq
dio
dma dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error" 2022-04-13 21:01:10 +02:00
dma-buf
edac
eisa
extcon
firewire
firmware firmware: arm_scmi: Fix sorting of retrieved clock rates 2022-04-20 09:23:10 +02:00
fpga
fsi fsi: Aspeed: Fix a potential double free 2022-04-08 14:40:23 +02:00
gnss
gpio gpiolib: acpi: use correct format characters 2022-04-20 09:23:11 +02:00
gpu drm/amdgpu: Enable gfxoff quirk on MacBook Pro 2022-04-20 09:23:28 +02:00
greybus
hid
hsi
hv Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer 2022-04-20 09:23:20 +02:00
hwmon
hwspinlock
hwtracing
i2c i2c: pasemi: Wait for write xfers to finish 2022-04-20 09:23:30 +02:00
i3c
ide
idle
iio iio: adc: Add check for devm_request_threaded_irq 2022-04-08 14:40:25 +02:00
infiniband scsi: iscsi: Rel ref after iscsi_lookup_endpoint() 2022-04-20 09:23:16 +02:00
input
interconnect
iommu iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-13 21:01:07 +02:00
ipack
irqchip irqchip/gic, gic-v3: Prevent GSI to SGI translations 2022-04-13 21:01:11 +02:00
isdn
leds
lightnvm
macintosh
mailbox mailbox: imx: fix wakeup failure from freeze mode 2022-04-08 14:40:41 +02:00
mcb
md dm integrity: fix memory corruption when tag_size is less than digest size 2022-04-20 09:23:29 +02:00
media media: rockchip/rga: do proper error checking in probe 2022-04-20 09:23:10 +02:00
memory memory: renesas-rpc-if: fix platform-device leak in error path 2022-04-20 09:23:26 +02:00
memstick
message
mfd mfd: asic3: Add missing iounmap() on error asic3_mfd_probe 2022-04-08 14:40:23 +02:00
misc kgdbts: fix return value of __setup handler 2022-04-08 14:40:28 +02:00
mmc mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete 2022-04-13 21:01:07 +02:00
most
mtd ubi: fastmap: Return error code if memory allocation fails in add_aeb() 2022-04-08 14:40:43 +02:00
mux
net ath9k: Fix usage of driver-private space in tx_info 2022-04-20 09:23:26 +02:00
nfc
ntb
nubus
nvdimm nvdimm/region: Fix default alignment for small regions 2022-04-08 14:40:26 +02:00
nvme nvme-tcp: lockdep: annotate in-kernel sockets 2022-04-08 14:40:32 +02:00
nvmem
of
opp
oprofile
parisc parisc: Fix CPU affinity for Lasi, WAX and Dino chips 2022-04-13 21:01:03 +02:00
parport
pci PCI: endpoint: Fix misused goto label 2022-04-13 21:00:59 +02:00
pcmcia
perf perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant 2022-04-20 09:23:24 +02:00
phy phy: amlogic: meson8b-usb2: Use dev_err_probe() 2022-04-13 21:01:01 +02:00
pinctrl pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() 2022-04-08 14:40:41 +02:00
platform platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:40:42 +02:00
pnp
power power: supply: axp288-charger: Set Vhold to 4.4V 2022-04-13 21:00:57 +02:00
powercap
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-04-13 21:00:55 +02:00
pwm pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add() 2022-04-08 14:40:23 +02:00
rapidio
ras
regulator regulator: wm8994: Add an off-on delay for WM8994 variant 2022-04-20 09:23:22 +02:00
remoteproc remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region 2022-04-08 14:40:26 +02:00
reset
rpmsg
rtc rtc: wm8350: Handle error for wm8350_register_irq 2022-04-13 21:00:54 +02:00
s390
sbus
scsi scsi: megaraid_sas: Target with invalid LUN ID is deleted during scan 2022-04-20 09:23:24 +02:00
sfi
sh
siox
slimbus
soc
soundwire soundwire: intel: fix wrong register name in intel_shim_wake 2022-04-08 14:40:24 +02:00
spi spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op() 2022-04-13 21:01:06 +02:00
spmi
ssb
staging staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 21:01:01 +02:00
target scsi: target: tcmu: Fix possible page UAF 2022-04-20 09:23:21 +02:00
tc
tee
thermal
thunderbolt
tty serial: samsung_tty: do not unlock port->lock for uart_write_wakeup() 2022-04-13 21:01:02 +02:00
uio
usb usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm 2022-04-13 21:01:00 +02:00
vdpa
vfio
vhost tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 21:00:59 +02:00
video video: fbdev: sm712fb: Fix crash in smtcfb_write() 2022-04-08 14:40:36 +02:00
virt
virtio
visorbus
vlynq
vme
w1 w1: w1_therm: fixes w1_seq for ds28ea00 sensors 2022-04-13 21:01:01 +02:00
watchdog watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function 2022-04-08 14:40:41 +02:00
xen
zorro
Kconfig
Makefile