aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic94xx/aic94xx_task.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_task.c')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_task.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index 6c12c0f19f39..d5d8caba3560 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -76,7 +76,7 @@ static inline int asd_map_scatterlist(struct sas_task *task,
76 76
77 /* STP tasks come from libata which has already mapped 77 /* STP tasks come from libata which has already mapped
78 * the SG list */ 78 * the SG list */
79 if (task->task_proto == SAS_PROTOCOL_STP) 79 if (sas_protocol_ata(task->task_proto))
80 num_sg = task->num_scatter; 80 num_sg = task->num_scatter;
81 else 81 else
82 num_sg = pci_map_sg(asd_ha->pcidev, task->scatter, 82 num_sg = pci_map_sg(asd_ha->pcidev, task->scatter,
@@ -125,7 +125,7 @@ static inline int asd_map_scatterlist(struct sas_task *task,
125 125
126 return 0; 126 return 0;
127err_unmap: 127err_unmap:
128 if (task->task_proto != SAS_PROTOCOL_STP) 128 if (sas_protocol_ata(task->task_proto))
129 pci_unmap_sg(asd_ha->pcidev, task->scatter, task->num_scatter, 129 pci_unmap_sg(asd_ha->pcidev, task->scatter, task->num_scatter,
130 task->data_dir); 130 task->data_dir);
131 return res; 131 return res;