linux/drivers/i2c/busses
Sebastian Reichel 5165da5923 i2c: i2c-tiny-usb: fix buffer not being DMA capable
Since v4.9 i2c-tiny-usb generates the below call trace
and longer works, since it can't communicate with the
USB device. The reason is, that since v4.9 the USB
stack checks, that the buffer it should transfer is DMA
capable. This was a requirement since v2.2 days, but it
usually worked nevertheless.

[   17.504959] ------------[ cut here ]------------
[   17.505488] WARNING: CPU: 0 PID: 93 at drivers/usb/core/hcd.c:1587 usb_hcd_map_urb_for_dma+0x37c/0x570
[   17.506545] transfer buffer not dma capable
[   17.507022] Modules linked in:
[   17.507370] CPU: 0 PID: 93 Comm: i2cdetect Not tainted 4.11.0-rc8+ #10
[   17.508103] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   17.509039] Call Trace:
[   17.509320]  ? dump_stack+0x5c/0x78
[   17.509714]  ? __warn+0xbe/0xe0
[   17.510073]  ? warn_slowpath_fmt+0x5a/0x80
[   17.510532]  ? nommu_map_sg+0xb0/0xb0
[   17.510949]  ? usb_hcd_map_urb_for_dma+0x37c/0x570
[   17.511482]  ? usb_hcd_submit_urb+0x336/0xab0
[   17.511976]  ? wait_for_completion_timeout+0x12f/0x1a0
[   17.512549]  ? wait_for_completion_timeout+0x65/0x1a0
[   17.513125]  ? usb_start_wait_urb+0x65/0x160
[   17.513604]  ? usb_control_msg+0xdc/0x130
[   17.514061]  ? usb_xfer+0xa4/0x2a0
[   17.514445]  ? __i2c_transfer+0x108/0x3c0
[   17.514899]  ? i2c_transfer+0x57/0xb0
[   17.515310]  ? i2c_smbus_xfer_emulated+0x12f/0x590
[   17.515851]  ? _raw_spin_unlock_irqrestore+0x11/0x20
[   17.516408]  ? i2c_smbus_xfer+0x125/0x330
[   17.516876]  ? i2c_smbus_xfer+0x125/0x330
[   17.517329]  ? i2cdev_ioctl_smbus+0x1c1/0x2b0
[   17.517824]  ? i2cdev_ioctl+0x75/0x1c0
[   17.518248]  ? do_vfs_ioctl+0x9f/0x600
[   17.518671]  ? vfs_write+0x144/0x190
[   17.519078]  ? SyS_ioctl+0x74/0x80
[   17.519463]  ? entry_SYSCALL_64_fastpath+0x1e/0xad
[   17.519959] ---[ end trace d047c04982f5ac50 ]---

Cc: <stable@vger.kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Till Harbaum <till@harbaum.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-05-22 10:33:42 +02:00
..
i2c-acorn.c
i2c-ali15x3.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-ali1535.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-ali1563.c i2c: ali1563: fix checkpatch.pl issues 2014-05-22 10:09:21 +02:00
i2c-amd756-s4882.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-amd756.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-amd8111.c
i2c-at91.c i2c: at91: ensure state is restored after suspending 2017-02-20 19:23:52 +01:00
i2c-au1550.c i2c: au1550: Convert to devm_kzalloc and devm_ioremap_resource 2015-10-23 23:31:11 +02:00
i2c-axxia.c i2c: constify i2c_adapter_quirks structures 2016-11-18 02:05:03 +01:00
i2c-bcm2835.c i2c: bcm2835: Avoid possible NULL ptr dereference 2017-02-20 19:19:54 +01:00
i2c-bcm-iproc.c i2c: constify i2c_adapter_quirks structures 2016-11-18 02:05:03 +01:00
i2c-bcm-kona.c Merge branch 'i2c/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-10-07 14:12:21 -07:00
i2c-bfin-twi.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-brcmstb.c i2c: brcmstb: Fix START and STOP conditions 2017-03-08 18:00:49 +01:00
i2c-cadence.c i2c: i2c-cadence: Initialize configuration before probing devices 2017-01-25 22:07:40 +01:00
i2c-cbus-gpio.c i2c: busses: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c-cpm.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-cros-ec-tunnel.c i2c: i2c-cros-ec-tunnel: Reduce logging noise 2017-01-28 22:16:38 +01:00
i2c-davinci.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-designware-baytrail.c i2c: designware-baytrail: fix potential null pointer dereference on dev 2017-04-19 21:00:13 +02:00
i2c-designware-core.c i2c: designware: Never suspend i2c-busses used for accessing the system PMIC 2017-03-22 09:53:24 +01:00
i2c-designware-core.h i2c: designware: Never suspend i2c-busses used for accessing the system PMIC 2017-03-22 09:53:24 +01:00
i2c-designware-pcidrv.c i2c: designware-baytrail: Add support for cherrytrail 2017-03-02 15:46:34 +01:00
i2c-designware-platdrv.c i2c: designware: don't infer timings described by ACPI from clock rate 2017-05-19 14:36:24 +02:00
i2c-digicolor.c i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare 2016-11-18 01:48:01 +01:00
i2c-diolan-u2c.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-dln2.c i2c: constify i2c_adapter_quirks structures 2016-11-18 02:05:03 +01:00
i2c-efm32.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-eg20t.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-elektor.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-emev2.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-exynos5.c i2c: exynos5: use core helper to get driver data 2017-04-21 14:02:41 +02:00
i2c-gpio.c i2c: busses: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c-highlander.c i2c: busses: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c-hix5hd2.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-hydra.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-i801.c i2c: i801: Add support for Intel Gemini Lake 2017-02-09 17:39:16 +01:00
i2c-ibm_iic.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
i2c-ibm_iic.h
i2c-img-scb.c i2c: img-scb: use setup_timer 2017-04-16 21:51:30 +02:00
i2c-imx-lpi2c.c Merge branch 'i2c/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-02-25 14:21:18 -08:00
i2c-imx.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-iop3xx.c i2c: iop3xx: use new 8 bit address helper function 2016-04-11 18:54:59 +02:00
i2c-iop3xx.h i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-isch.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-ismt.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-jz4780.c i2c: jz4780: Fix module autoload 2016-10-25 11:48:58 +02:00
i2c-kempld.c i2c: busses: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c-lpc2k.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-meson.c i2c: meson: improve and simplify interrupt handler 2017-03-30 17:31:29 +02:00
i2c-mlxcpld.c i2c: mlxcpld: add master driver for mellanox systems 2016-11-24 16:21:42 +01:00
i2c-mpc.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
i2c-mt65xx.c i2c: m65xx: drop superfluous quirk structure 2017-03-08 18:03:41 +01:00
i2c-mv64xxx.c i2c: mv64xxx: don't override deferred probing when getting irq 2017-05-16 23:19:00 +02:00
i2c-mxs.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-nforce2-s4985.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-nforce2.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-nomadik.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-ocores.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-octeon-core.c i2c: octeon: thunderx: Limit register access retries 2016-12-17 19:27:44 +01:00
i2c-octeon-core.h i2c: thunderx: Replace pci_enable_msix() 2017-02-23 13:03:56 +01:00
i2c-octeon-platdrv.c i2c: octeon: Sort include files alphabetically 2016-08-26 00:41:58 +02:00
i2c-omap.c i2c: omap: constify dev_pm_ops structures 2017-01-25 22:17:24 +01:00
i2c-opal.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
i2c-parport-light.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-parport.c i2c: parport: start using pr_fmt 2015-08-10 08:37:28 +02:00
i2c-parport.h i2c: parport: Add VCT-jig adapter 2015-08-10 08:37:34 +02:00
i2c-pasemi.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-pca-isa.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-pca-platform.c i2c: pca-platform: fix broken email address 2015-04-23 19:35:30 +02:00
i2c-piix4.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-pmcmsp.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-pnx.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-powermac.c i2c: powermac: use new 8 bit address helper function 2016-04-11 18:54:59 +02:00
i2c-puv3.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-pxa-pci.c i2c: i2c-pxa-pci; make explicitly non-modular 2016-11-18 01:44:38 +01:00
i2c-pxa.c i2c: pxa: Add support for the I2C units found in Armada 3700 2016-12-01 23:34:33 +01:00
i2c-qup.c i2c: qup: support SMBus block read 2016-11-29 22:43:38 +01:00
i2c-rcar.c i2c: rcar: clarify PM handling with more comments 2017-04-21 14:08:57 +02:00
i2c-riic.c i2c: riic: fix restart condition 2017-03-08 17:54:59 +01:00
i2c-rk3x.c i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings 2016-10-25 11:11:46 +02:00
i2c-robotfuzz-osif.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-s3c2410.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-scmi.c i2c: i2c-scmi: add a MS HID 2017-04-16 21:48:06 +02:00
i2c-sh7760.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-sh_mobile.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-sibyte.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-simtec.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
i2c-sirf.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-sis96x.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-sis630.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-sis5595.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-st.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
i2c-stm32f4.c i2c: stm32f4: add driver 2017-01-25 22:16:59 +01:00
i2c-stu300.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-sun6i-p2wi.c i2c: busses: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
i2c-taos-evm.c i2c: taos-evm: replace simple_strtoul by kstrtou8 2015-11-30 18:37:22 +01:00
i2c-tegra-bpmp.c i2c: tegra: fix spelling mistake: "contoller" -> "controller" 2017-04-21 14:04:57 +02:00
i2c-tegra.c i2c: tegra: Fix assignment of boolean variables 2016-09-08 22:36:18 +02:00
i2c-thunderx-pcidrv.c i2c: thunderx: Enable HWMON class probing 2017-04-21 18:05:22 +02:00
i2c-tiny-usb.c i2c: i2c-tiny-usb: fix buffer not being DMA capable 2017-05-22 10:33:42 +02:00
i2c-uniphier-f.c i2c: uniphier-f: rename jump label to follow coding style guideline 2016-11-18 02:16:08 +01:00
i2c-uniphier.c i2c: uniphier: rename jump label to follow coding style guideline 2016-11-18 02:13:11 +01:00
i2c-versatile.c i2c: versatile: Convert to use resource managed devm_* APIs 2016-07-14 21:21:56 +09:00
i2c-via.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-viapro.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-viperboard.c i2c: constify i2c_adapter_quirks structures 2016-11-18 02:05:03 +01:00
i2c-wmt.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-xgene-slimpro.c i2c: xgene: Set ACPI_COMPANION_I2C 2017-05-17 09:21:06 +02:00
i2c-xiic.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-xlp9xx.c i2c: xlp9xx: update for ARCH_THUNDER2 2017-03-23 21:44:21 +01:00
i2c-xlr.c i2c: busses: constify i2c_algorithm structures 2017-02-09 17:06:52 +01:00
Kconfig i2c: xlp9xx: update for ARCH_THUNDER2 2017-03-23 21:44:21 +01:00
Makefile i2c: Add Tegra BPMP I2C proxy driver 2017-02-20 19:12:38 +01:00
scx200_acb.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00