if (Cmnd->use_sg) {
sg = (struct scatterlist *) Cmnd->request_buffer;
- sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg, Cmnd->sc_data_direction);
cmd->segment_cnt = cpu_to_le16(sg_count);
ds = cmd->dataseg;
/* fill in first two sg entries: */
dma_addr_t busaddr = pci_map_page(hostdata->pci_dev,
page, offset,
Cmnd->request_bufflen,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
Cmnd->SCp.dma_handle = busaddr;
cmd->dataseg[0].d_base = cpu_to_le32(pci64_dma_lo32(busaddr));
cmd->segment_cnt = cpu_to_le16(1); /* Shouldn't this be 0? */
}
- if (Cmnd->sc_data_direction == SCSI_DATA_WRITE)
+ if (Cmnd->sc_data_direction == DMA_TO_DEVICE)
cmd->control_flags = cpu_to_le16(CFLAG_WRITE);
else
cmd->control_flags = cpu_to_le16(CFLAG_READ);
pci_unmap_sg(hostdata->pci_dev,
(struct scatterlist *)Cmnd->buffer,
Cmnd->use_sg,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
else if (Cmnd->request_bufflen &&
Cmnd->sc_data_direction != PCI_DMA_NONE) {
pci_unmap_page(hostdata->pci_dev,
Cmnd->SCp.dma_handle,
Cmnd->request_bufflen,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
}
hostdata->handle_ptrs[i]->result = DID_SOFT_ERROR << 16;
pci_unmap_sg(hostdata->pci_dev,
(struct scatterlist *)Cmnd->buffer,
Cmnd->use_sg,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
else if (Cmnd->request_bufflen &&
Cmnd->sc_data_direction != PCI_DMA_NONE)
pci_unmap_page(hostdata->pci_dev,
Cmnd->SCp.dma_handle,
Cmnd->request_bufflen,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
Cmnd->result = 0x0;
(*Cmnd->scsi_done) (Cmnd);
} else
if (Cmnd->use_sg)
pci_unmap_sg(hostdata->pci_dev,
(struct scatterlist *)Cmnd->buffer, Cmnd->use_sg,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
else if (Cmnd->request_bufflen && Cmnd->sc_data_direction != PCI_DMA_NONE)
pci_unmap_page(hostdata->pci_dev,
Cmnd->SCp.dma_handle,
Cmnd->request_bufflen,
- scsi_to_pci_dma_dir(Cmnd->sc_data_direction));
+ Cmnd->sc_data_direction);
/*
* if any of the following are true we do not