firewire: sbp2: give correct DMA device to scsi framework
authorClemens Ladisch <clemens@ladisch.de>
Fri, 18 May 2012 16:39:39 +0000 (18:39 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 21 May 2012 19:42:51 +0000 (21:42 +0200)
The sbp2 driver does DMA not on the unit but on the card device.

The driver worked even with the wrong device because at the moment, it
happens to reimplement the DMA functions of the SCSI framework.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/sbp2.c

index b7e65d7..2e202d3 100644 (file)
@@ -1163,7 +1163,8 @@ static int sbp2_probe(struct device *dev)
 
        shost->max_cmd_len = SBP2_MAX_CDB_SIZE;
 
-       if (scsi_add_host(shost, &unit->device) < 0)
+       if (scsi_add_host_with_dma(shost, &unit->device,
+                                  device->card->device) < 0)
                goto fail_shost_put;
 
        /* implicit directory ID */