kernel-fxtec-pro1x/drivers/i2c/busses
Atsushi Nemoto 2133e30fc2 i2c: altera: Fix race between xfer_msg and isr thread
[ Upstream commit 5d4c7977499a736f3f80826bdc9744344ad55589 ]

Use a mutex to protect access to idev->msg_len, idev->buf, etc. which
are modified by both altr_i2c_xfer_msg() and altr_i2c_isr().

This is the minimal fix for easy backporting. A cleanup to remove the
spinlock will be added later.

Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
Acked-by: Thor Thayer <thor.thayer@linux.intel.com>
[wsa: updated commit message]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-07 13:17:56 +02:00
..
i2c-acorn.c i2c: acorn: fix i2c warning 2019-06-19 08:18:00 +02:00
i2c-ali15x3.c
i2c-ali1535.c
i2c-ali1563.c
i2c-altera.c i2c: altera: Fix race between xfer_msg and isr thread 2020-06-07 13:17:56 +02:00
i2c-amd756-s4882.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-amd756.c
i2c-amd8111.c i2c: amd8111: Mark expected switch fall-through 2018-08-08 22:28:46 +02:00
i2c-aspeed.c i2c: aspeed: fix invalid clock parameters for very large divisors 2019-11-20 18:47:22 +01:00
i2c-at91.c i2c: at91: fix clk_offset for sama5d2 2019-09-16 08:22:22 +02:00
i2c-au1550.c
i2c-axxia.c i2c-axxia: check for error conditions first 2019-02-12 19:47:09 +01:00
i2c-bcm-iproc.c
i2c-bcm-kona.c
i2c-bcm2835.c i2c: bcm2835: Clear current buffer pointers and counts after a transfer 2019-03-23 20:09:47 +01:00
i2c-brcmstb.c i2c: remove i2c_lock_adapter and use i2c_lock_bus directly 2018-07-13 00:09:37 +02:00
i2c-cadence.c i2c: cadence: Fix the hold bit setting 2019-03-23 20:09:46 +01:00
i2c-cbus-gpio.c
i2c-cht-wc.c i2c-cht-wc: Fix lockdep warning 2019-10-07 18:57:08 +02:00
i2c-cpm.c
i2c-cros-ec-tunnel.c
i2c-davinci.c Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-08-21 17:40:46 -07:00
i2c-designware-baytrail.c i2c: designware: Add SPDX license tag 2018-08-20 10:45:45 +02:00
i2c-designware-common.c i2c: designware: Add SPDX license tag 2018-08-20 10:45:45 +02:00
i2c-designware-core.h i2c: designware: Add SPDX license tag 2018-08-20 10:45:45 +02:00
i2c-designware-master.c i2c: designware: Call i2c_dw_clk_rate() only when calculating timings 2018-10-05 13:40:05 +02:00
i2c-designware-pcidrv.c i2c: designware: Add SPDX license tag 2018-08-20 10:45:45 +02:00
i2c-designware-platdrv.c i2c: designware: Re-init controllers with pm_disabled set on resume 2018-08-30 23:02:13 +02:00
i2c-designware-slave.c i2c: designware: Synchronize IRQs when unregistering slave client 2019-09-21 07:17:06 +02:00
i2c-digicolor.c
i2c-diolan-u2c.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-dln2.c
i2c-efm32.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-eg20t.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-elektor.c
i2c-emev2.c i2c: emev2: avoid race when unregistering slave client 2019-09-06 10:21:59 +02:00
i2c-exynos5.c i2c: exynos5: Describe the hardware variant for readability 2018-07-21 00:15:22 +02:00
i2c-fsi.c i2c: fsi: Add bus recovery 2018-07-21 00:07:09 +02:00
i2c-gpio.c i2c: gpio: suppress error on probe defer 2020-03-18 07:14:23 +01:00
i2c-highlander.c i2c: use SPDX identifier for Renesas drivers 2018-08-24 14:49:36 +02:00
i2c-hix5hd2.c i2c: hix5hd2: add missed clk_disable_unprepare in remove 2020-04-02 15:28:16 +02:00
i2c-hydra.c
i2c-i801.c i2c: i801: Add support for Intel Comet Lake 2019-05-04 09:20:15 +02:00
i2c-ibm_iic.c i2c: ibm_iic: don't check number of messages in the driver 2018-05-24 22:05:54 +02:00
i2c-ibm_iic.h
i2c-img-scb.c
i2c-imx-lpi2c.c i2c: imx-lpi2c: Remove mx8dv compatible entry 2018-09-02 23:50:43 +02:00
i2c-imx.c i2c: imx: don't print error message on probe defer 2019-12-13 08:51:57 +01:00
i2c-iop3xx.c
i2c-iop3xx.h
i2c-isch.c i2c: i2c-isch: fix spelling mistake "unitialized" -> "uninitialized" 2018-09-25 00:14:04 +02:00
i2c-ismt.c
i2c-jz4780.c i2c: jz4780: silence log flood on txabrt 2020-03-05 16:42:19 +01:00
i2c-kempld.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-lpc2k.c
i2c-meson.c
i2c-mlxcpld.c i2c: mlxcpld: Fix wrong initialization order in probe 2019-06-09 09:17:18 +02:00
i2c-mpc.c
i2c-mt65xx.c i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf() 2019-11-24 08:19:08 +01:00
i2c-mv64xxx.c
i2c-mxs.c i2c: mxs: use core to detect 'no zero length' quirk 2018-08-04 23:25:06 +02:00
i2c-nforce2-s4985.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-nforce2.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-nomadik.c i2c: busses: remove superfluous ignoring of children for RPM 2018-05-08 23:19:02 +02:00
i2c-ocores.c i2c: ocores: update my email address 2018-08-24 14:46:43 +02:00
i2c-octeon-core.c
i2c-octeon-core.h
i2c-octeon-platdrv.c
i2c-omap.c i2c: omap: use core to detect 'no zero length' quirk 2019-11-24 08:20:26 +01:00
i2c-opal.c i2c: opal: don't check number of messages in the driver 2018-05-24 22:06:17 +02:00
i2c-owl.c i2c: Add Actions Semiconductor Owl family S900 I2C driver 2018-08-04 22:56:02 +02:00
i2c-parport-light.c
i2c-parport.c
i2c-parport.h
i2c-pasemi.c i2c: pasemi: remove hardcoded bus numbers on smbus 2018-08-20 11:01:13 +02:00
i2c-pca-isa.c
i2c-pca-platform.c i2c: pca-platform: Fix GPIO lookup code 2019-07-10 09:53:39 +02:00
i2c-piix4.c i2c: piix4: Fix port selection for AMD Family 16h Model 30h 2019-09-06 10:22:23 +02:00
i2c-pmcmsp.c i2c: pmcmsp: use core to detect 'no zero length' quirk 2018-08-04 23:25:06 +02:00
i2c-pnx.c i2c: pnx: move header into the driver 2018-05-17 16:27:59 +02:00
i2c-powermac.c
i2c-puv3.c
i2c-pxa-pci.c
i2c-pxa.c
i2c-qcom-geni.c i2c: qcom-geni: Fix runtime PM mismatch with child devices 2018-11-27 16:13:06 +01:00
i2c-qup.c i2c: qup: use core to detect 'no zero length' quirk 2019-11-24 08:20:27 +01:00
i2c-rcar.c i2c: rcar: avoid race when unregistering slave client 2019-09-06 10:21:58 +02:00
i2c-riic.c i2c: riic: Clear NACK in tend isr 2019-10-05 13:10:12 +02:00
i2c-rk3x.c i2c: rk3x: Don't print visible virtual mapping MMIO address 2018-05-24 22:09:05 +02:00
i2c-robotfuzz-osif.c i2c: robotfuzz-osif: drop pointless test 2018-05-24 22:13:04 +02:00
i2c-s3c2410.c i2c: remove i2c_lock_adapter and use i2c_lock_bus directly 2018-07-13 00:09:37 +02:00
i2c-scmi.c i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node 2018-12-21 14:15:24 +01:00
i2c-sh7760.c
i2c-sh_mobile.c i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E) 2019-02-12 19:47:11 +01:00
i2c-sibyte.c
i2c-simtec.c
i2c-sirf.c
i2c-sis96x.c
i2c-sis630.c
i2c-sis5595.c
i2c-sprd.c i2c: remove i2c_lock_adapter and use i2c_lock_bus directly 2018-07-13 00:09:37 +02:00
i2c-st.c i2c: st: fix missing struct parameter description 2020-04-17 10:48:38 +02:00
i2c-stm32.c i2c: stm32f7: report dma error during probe 2020-01-27 14:51:21 +01:00
i2c-stm32.h i2c: i2c-stm32: Add generic DMA API 2018-04-30 10:39:27 +02:00
i2c-stm32f4.c
i2c-stm32f7.c i2c: stm32f7: report dma error during probe 2020-01-27 14:51:21 +01:00
i2c-stu300.c i2c: stu300: use core to detect 'no zero length' quirk 2018-08-04 23:25:07 +02:00
i2c-sun6i-p2wi.c
i2c-synquacer.c i2c: synquacer: fix synquacer_i2c_doxfer() return value 2019-06-09 09:17:19 +02:00
i2c-taos-evm.c
i2c-tegra-bpmp.c
i2c-tegra.c i2c: tegra: use core to detect 'no zero length' quirk 2019-11-24 08:20:27 +01:00
i2c-thunderx-pcidrv.c
i2c-tiny-usb.c
i2c-uniphier-f.c i2c: uniphier-f: fix timeout error after reading 8 bytes 2019-12-01 09:17:34 +01:00
i2c-uniphier.c i2c: uniphier: fix violation of tLOW requirement for Fast-mode 2018-12-21 14:15:24 +01:00
i2c-versatile.c
i2c-via.c
i2c-viapro.c
i2c-viperboard.c i2c: viperboard: return message count on master_xfer success 2018-05-15 09:31:26 +02:00
i2c-wmt.c
i2c-xgene-slimpro.c
i2c-xiic.c i2c: xiic: Add max_read_len quirk 2019-06-11 12:20:53 +02:00
i2c-xlp9xx.c i2c: xlp9xx: Fix case where SSIF read transaction completes early 2018-08-09 17:41:13 +02:00
i2c-xlr.c i2c: xlr: use core to detect 'no zero length' quirk 2018-08-04 23:25:08 +02:00
i2c-zx2967.c i2c: zx2967: use core to detect 'no zero length' quirk 2019-11-24 08:20:27 +01:00
Kconfig i2c: brcmstb: Allow enabling the driver on DSL SoCs 2019-11-24 08:20:23 +01:00
Makefile i2c: Add Actions Semiconductor Owl family S900 I2C driver 2018-08-04 22:56:02 +02:00
scx200_acb.c