aic94xx: fix DMA data direction for SMP requests
authorJeff Garzik <jeff@garzik.org>
Tue, 2 Oct 2007 17:16:10 +0000 (13:16 -0400)
committerJeff Garzik <jeff@garzik.org>
Tue, 2 Oct 2007 17:16:10 +0000 (13:16 -0400)
DMA-mapped SMP (scsi management protocol) requests going /to/ the device
need the PCI DMA data direction to indicate such.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/scsi/aic94xx/aic94xx_task.c

index d5d8caba35605f3643b165211d84aa583f29bbd4..ab13824df856594ec140ce9c23bb9888b71b4523 100644 (file)
@@ -451,7 +451,7 @@ static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
        struct scb *scb;
 
        pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1,
-                  PCI_DMA_FROMDEVICE);
+                  PCI_DMA_TODEVICE);
        pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1,
                   PCI_DMA_FROMDEVICE);
 
@@ -486,7 +486,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
 
        BUG_ON(!task);
        pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1,
-                    PCI_DMA_FROMDEVICE);
+                    PCI_DMA_TODEVICE);
        pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1,
                     PCI_DMA_FROMDEVICE);
 }