1
0
Fork 0
remarkable-linux/drivers/firewire
Hector Martin 4a5d70332d firewire-ohci: work around oversized DMA reads on JMicron controllers
[ Upstream commit 188775181b ]

At least some JMicron controllers issue buggy oversized DMA reads when
fetching context descriptors, always fetching 0x20 bytes at once for
descriptors which are only 0x10 bytes long. This is often harmless, but
can cause page faults on modern systems with IOMMUs:

DMAR: [DMA Read] Request device [05:00.0] fault addr fff56000 [fault reason 06] PTE Read access is not set
firewire_ohci 0000:05:00.0: DMA context IT0 has stopped, error code: evt_descriptor_read

This works around the problem by always leaving 0x10 padding bytes at
the end of descriptor buffer pages, which should be harmless to do
unconditionally for controllers in case others have the same behavior.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 11:02:03 +02:00
..
Kconfig firewire: IEEE 1394 (FireWire) support should depend on HAS_DMA 2014-07-13 20:53:25 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
core-card.c IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
core-cdev.c idr: Return the deleted entry from idr_remove 2017-02-13 21:44:03 -05:00
core-device.c scripts/spelling.txt: add "intialization" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
core-iso.c firewire: core: fix multichannel IR with buffers larger than 2 GB 2012-06-17 19:35:26 +02:00
core-topology.c drivers, firewire: convert fw_node.ref_count from atomic_t to refcount_t 2017-03-23 13:57:19 +01:00
core-transaction.c firewire: core: use correct vendor/model IDs 2015-02-02 21:56:03 +01:00
core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
init_ohci1394_dma.c various: Fix spelling of "asynchronous" in comments. 2012-11-19 14:32:13 +01:00
net.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
nosy-user.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nosy.c firewire: nosy: do not ignore errors in ioremap_nocache() 2016-10-09 11:38:11 +02:00
nosy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ohci.c firewire-ohci: work around oversized DMA reads on JMicron controllers 2018-04-26 11:02:03 +02:00
ohci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sbp2.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00