aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qlogicfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qlogicfc.c')
-rw-r--r--drivers/scsi/qlogicfc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c
index 24c1174b0c2f..ddf0f4277ee8 100644
--- a/drivers/scsi/qlogicfc.c
+++ b/drivers/scsi/qlogicfc.c
@@ -1261,7 +1261,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
1261 1261
1262 if (Cmnd->use_sg) { 1262 if (Cmnd->use_sg) {
1263 sg = (struct scatterlist *) Cmnd->request_buffer; 1263 sg = (struct scatterlist *) Cmnd->request_buffer;
1264 sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1264 sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, Cmnd->sc_data_direction);
1265 cmd->segment_cnt = cpu_to_le16(sg_count); 1265 cmd->segment_cnt = cpu_to_le16(sg_count);
1266 ds = cmd->dataseg; 1266 ds = cmd->dataseg;
1267 /* fill in first two sg entries: */ 1267 /* fill in first two sg entries: */
@@ -1307,7 +1307,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
1307 dma_addr_t busaddr = pci_map_page(hostdata->pci_dev, 1307 dma_addr_t busaddr = pci_map_page(hostdata->pci_dev,
1308 page, offset, 1308 page, offset,
1309 Cmnd->request_bufflen, 1309 Cmnd->request_bufflen,
1310 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1310 Cmnd->sc_data_direction);
1311 Cmnd->SCp.dma_handle = busaddr; 1311 Cmnd->SCp.dma_handle = busaddr;
1312 1312
1313 cmd->dataseg[0].d_base = cpu_to_le32(pci64_dma_lo32(busaddr)); 1313 cmd->dataseg[0].d_base = cpu_to_le32(pci64_dma_lo32(busaddr));
@@ -1320,7 +1320,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
1320 cmd->segment_cnt = cpu_to_le16(1); /* Shouldn't this be 0? */ 1320 cmd->segment_cnt = cpu_to_le16(1); /* Shouldn't this be 0? */
1321 } 1321 }
1322 1322
1323 if (Cmnd->sc_data_direction == SCSI_DATA_WRITE) 1323 if (Cmnd->sc_data_direction == DMA_TO_DEVICE)
1324 cmd->control_flags = cpu_to_le16(CFLAG_WRITE); 1324 cmd->control_flags = cpu_to_le16(CFLAG_WRITE);
1325 else 1325 else
1326 cmd->control_flags = cpu_to_le16(CFLAG_READ); 1326 cmd->control_flags = cpu_to_le16(CFLAG_READ);
@@ -1405,13 +1405,13 @@ static void redo_port_db(unsigned long arg)
1405 pci_unmap_sg(hostdata->pci_dev, 1405 pci_unmap_sg(hostdata->pci_dev,
1406 (struct scatterlist *)Cmnd->buffer, 1406 (struct scatterlist *)Cmnd->buffer,
1407 Cmnd->use_sg, 1407 Cmnd->use_sg,
1408 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1408 Cmnd->sc_data_direction);
1409 else if (Cmnd->request_bufflen && 1409 else if (Cmnd->request_bufflen &&
1410 Cmnd->sc_data_direction != PCI_DMA_NONE) { 1410 Cmnd->sc_data_direction != PCI_DMA_NONE) {
1411 pci_unmap_page(hostdata->pci_dev, 1411 pci_unmap_page(hostdata->pci_dev,
1412 Cmnd->SCp.dma_handle, 1412 Cmnd->SCp.dma_handle,
1413 Cmnd->request_bufflen, 1413 Cmnd->request_bufflen,
1414 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1414 Cmnd->sc_data_direction);
1415 } 1415 }
1416 1416
1417 hostdata->handle_ptrs[i]->result = DID_SOFT_ERROR << 16; 1417 hostdata->handle_ptrs[i]->result = DID_SOFT_ERROR << 16;
@@ -1515,13 +1515,13 @@ void isp2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs)
1515 pci_unmap_sg(hostdata->pci_dev, 1515 pci_unmap_sg(hostdata->pci_dev,
1516 (struct scatterlist *)Cmnd->buffer, 1516 (struct scatterlist *)Cmnd->buffer,
1517 Cmnd->use_sg, 1517 Cmnd->use_sg,
1518 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1518 Cmnd->sc_data_direction);
1519 else if (Cmnd->request_bufflen && 1519 else if (Cmnd->request_bufflen &&
1520 Cmnd->sc_data_direction != PCI_DMA_NONE) 1520 Cmnd->sc_data_direction != PCI_DMA_NONE)
1521 pci_unmap_page(hostdata->pci_dev, 1521 pci_unmap_page(hostdata->pci_dev,
1522 Cmnd->SCp.dma_handle, 1522 Cmnd->SCp.dma_handle,
1523 Cmnd->request_bufflen, 1523 Cmnd->request_bufflen,
1524 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1524 Cmnd->sc_data_direction);
1525 Cmnd->result = 0x0; 1525 Cmnd->result = 0x0;
1526 (*Cmnd->scsi_done) (Cmnd); 1526 (*Cmnd->scsi_done) (Cmnd);
1527 } else 1527 } else
@@ -1569,12 +1569,12 @@ void isp2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs)
1569 if (Cmnd->use_sg) 1569 if (Cmnd->use_sg)
1570 pci_unmap_sg(hostdata->pci_dev, 1570 pci_unmap_sg(hostdata->pci_dev,
1571 (struct scatterlist *)Cmnd->buffer, Cmnd->use_sg, 1571 (struct scatterlist *)Cmnd->buffer, Cmnd->use_sg,
1572 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1572 Cmnd->sc_data_direction);
1573 else if (Cmnd->request_bufflen && Cmnd->sc_data_direction != PCI_DMA_NONE) 1573 else if (Cmnd->request_bufflen && Cmnd->sc_data_direction != PCI_DMA_NONE)
1574 pci_unmap_page(hostdata->pci_dev, 1574 pci_unmap_page(hostdata->pci_dev,
1575 Cmnd->SCp.dma_handle, 1575 Cmnd->SCp.dma_handle,
1576 Cmnd->request_bufflen, 1576 Cmnd->request_bufflen,
1577 scsi_to_pci_dma_dir(Cmnd->sc_data_direction)); 1577 Cmnd->sc_data_direction);
1578 1578
1579 /* 1579 /*
1580 * if any of the following are true we do not 1580 * if any of the following are true we do not