linux/drivers/misc/cardreader
Shuah Khan eb7f8e2842 misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
rtsx_usb driver allocates coherent dma buffer for urb transfers.
This buffer is passed to usb_bulk_msg() and usb core tries to
map already mapped buffer running into a dma mapping error.

xhci_hcd 0000:01:00.0: rejecting DMA map of vmalloc memory
WARNING: CPU: 1 PID: 279 at include/linux/dma-mapping.h:326 usb_ hcd_map_urb_for_dma+0x7d6/0x820

...

xhci_map_urb_for_dma+0x291/0x4e0
usb_hcd_submit_urb+0x199/0x12b0
...
usb_submit_urb+0x3b8/0x9e0
usb_start_wait_urb+0xe3/0x2d0
usb_bulk_msg+0x115/0x240
rtsx_usb_transfer_data+0x185/0x1a8 [rtsx_usb]
rtsx_usb_send_cmd+0xbb/0x123 [rtsx_usb]
rtsx_usb_write_register+0x12c/0x143 [rtsx_usb]
rtsx_usb_probe+0x226/0x4b2 [rtsx_usb]

Fix it to use kmalloc() to get DMA-able memory region instead.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/667d627d502e1ba9ff4f9b94966df3299d2d3c0d.1656642167.git.skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-01 08:53:23 +02:00
..
alcor_pci.c misc: alcor_pci: set NULL intfdata and clear pci master 2022-05-19 18:57:17 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile misc: rtsx: Add support new chip rts5228 mmc: rtsx: Add support MMC_CAP2_NO_MMC 2020-07-10 14:58:47 +02:00
rtl8411.c misc: rtsx: Quiesce rts5249 on system suspend 2022-01-26 18:53:28 +01:00
rts5209.c misc: rtsx: Quiesce rts5249 on system suspend 2022-01-26 18:53:28 +01:00
rts5227.c misc: rtsx: rts522a rts5228 rts5261 support Runtime PM 2022-02-25 12:11:16 +01:00
rts5228.c misc: rtsx: clean up one inconsistent indenting 2022-03-18 13:52:30 +01:00
rts5228.h misc: rtsx: Add support new chip rts5228 mmc: rtsx: Add support MMC_CAP2_NO_MMC 2020-07-10 14:58:47 +02:00
rts5229.c misc: rtsx: Quiesce rts5249 on system suspend 2022-01-26 18:53:28 +01:00
rts5249.c misc: rtsx: Quiesce rts5249 on system suspend 2022-01-26 18:53:28 +01:00
rts5260.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5260.h
rts5261.c misc: rtsx: Fix clang -Wsometimes-uninitialized in rts5261_init_from_hw() 2022-06-10 15:29:17 +02:00
rts5261.h misc: rtsx: Check mmc support for RTS5261 2020-11-16 11:59:30 +01:00
rtsx_pcr.c misc: rtsx: conditionally build rtsx_pm_power_saving() 2022-02-25 12:10:45 +01:00
rtsx_pcr.h misc: rtsx: rts522a rts5228 rts5261 support Runtime PM 2022-02-25 12:11:16 +01:00
rtsx_usb.c misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer 2022-07-01 08:53:23 +02:00