ieee1394: sbp2: enforce 32bit DMA mapping
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 4 Feb 2007 19:25:43 +0000 (20:25 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 29 Apr 2007 22:00:27 +0000 (00:00 +0200)
In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
ORBs, and response buffers have to reside within the first 4 GB of the
FireWire controller's physical address space.  Set the correct mask for
DMA mappings.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/sbp2.c

index 4edfff46b1e60a8801ef4a1a87a7598a758fd0cd..e15b5d7b9a026ac9e8db0619b496f5c3fe217e79 100644 (file)
@@ -757,6 +757,11 @@ static struct sbp2_lu *sbp2_alloc_device(struct unit_directory *ud)
                        SBP2_ERR("failed to register lower 4GB address range");
                        goto failed_alloc;
                }
+#else
+               if (dma_set_mask(hi->host->device.parent, DMA_32BIT_MASK)) {
+                       SBP2_ERR("failed to set 4GB DMA mask");
+                       goto failed_alloc;
+               }
 #endif
        }