Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2fe2023

Browse files
author
Stefan Richter
committed
firewire: revert to 4 GB RDMA, fix protocols using Memory Space
Undo a feature introduced in v3.14 by commit fcd46b3 "firewire: Enable remote DMA above 4 GB". That change raised the minimum address at which protocol drivers and user programs can register for request reception from 0x0001'0000'0000 to 0x8000'0000'0000. It turned out that at least one vendor-specific protocol exists which uses lower addresses: https://bugzilla.kernel.org/show_bug.cgi?id=76921 For the time being, revert most of commit fcd46b3 so that affected protocols work like with kernel v3.13 and before. Just keep the valid documentation parts from the regressing commit, and the ability to identify controllers which could be programmed to accept >32 bit physical DMA addresses. The rest of fcd46b3 should probably be brought back as an optional instead of default feature. Reported-by: Fabien Spindler <[email protected]> Cc: <[email protected]> # 3.14+ Signed-off-by: Stefan Richter <[email protected]>
1 parent c720816 commit 2fe2023

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Documentation/debugging-via-ohci1394.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ using data transfer rates in the order of 10MB/s or more.
2525
With most FireWire controllers, memory access is limited to the low 4 GB
2626
of physical address space. This can be a problem on IA64 machines where
2727
memory is located mostly above that limit, but it is rarely a problem on
28-
more common hardware such as x86, x86-64 and PowerPC. However, at least
29-
Agere/LSI FW643e and FW643e2 controllers are known to support access to
30-
physical addresses above 4 GB.
28+
more common hardware such as x86, x86-64 and PowerPC.
29+
30+
At least LSI FW643e and FW643e2 controllers are known to support access to
31+
physical addresses above 4 GB, but this feature is currently not enabled by
32+
Linux.
3133

3234
Together with a early initialization of the OHCI-1394 controller for debugging,
3335
this facility proved most useful for examining long debugs logs in the printk
@@ -101,8 +103,9 @@ Step-by-step instructions for using firescope with early OHCI initialization:
101103
compliant, they are based on TI PCILynx chips and require drivers for Win-
102104
dows operating systems.
103105

104-
The mentioned kernel log message contains ">4 GB phys DMA" in case of
105-
OHCI-1394 controllers which support accesses above this limit.
106+
The mentioned kernel log message contains the string "physUB" if the
107+
controller implements a writable Physical Upper Bound register. This is
108+
required for physical DMA above 4 GB (but not utilized by Linux yet).
106109

107110
2) Establish a working FireWire cable connection:
108111

drivers/firewire/core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ static inline bool is_next_generation(int new_generation, int old_generation)
237237

238238
#define LOCAL_BUS 0xffc0
239239

240-
/* arbitrarily chosen maximum range for physical DMA: 128 TB */
241-
#define FW_MAX_PHYSICAL_RANGE (128ULL << 40)
240+
/* OHCI-1394's default upper bound for physical DMA: 4 GB */
241+
#define FW_MAX_PHYSICAL_RANGE (1ULL << 32)
242242

243243
void fw_core_handle_request(struct fw_card *card, struct fw_packet *request);
244244
void fw_core_handle_response(struct fw_card *card, struct fw_packet *packet);

drivers/firewire/ohci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3716,7 +3716,7 @@ static int pci_probe(struct pci_dev *dev,
37163716
version >> 16, version & 0xff, ohci->card.index,
37173717
ohci->n_ir, ohci->n_it, ohci->quirks,
37183718
reg_read(ohci, OHCI1394_PhyUpperBound) ?
3719-
", >4 GB phys DMA" : "");
3719+
", physUB" : "");
37203720

37213721
return 0;
37223722

0 commit comments

Comments
 (0)