patch-2.3.47 linux/drivers/scsi/qlogicpti.c

Next file: linux/drivers/scsi/scsi.c
Previous file: linux/drivers/scsi/qlogicisp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/scsi/qlogicpti.c linux/drivers/scsi/qlogicpti.c
@@ -1036,7 +1036,7 @@
 		int sg_count;
 
 		sg = (struct scatterlist *) Cmnd->buffer;
-		sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg);
+		sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg, scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
 
 		ds = cmd->dataseg;
 		cmd->segment_cnt = sg_count;
@@ -1078,7 +1078,8 @@
 		Cmnd->SCp.ptr = (char *)(unsigned long)
 			sbus_map_single(qpti->sdev,
 					Cmnd->request_buffer,
-					Cmnd->request_bufflen);
+					Cmnd->request_bufflen,
+					scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
 
 		cmd->dataseg[0].d_base = (u32) ((unsigned long)Cmnd->SCp.ptr);
 		cmd->dataseg[0].d_count = Cmnd->request_bufflen;
@@ -1413,11 +1414,13 @@
 		if (Cmnd->use_sg) {
 			sbus_unmap_sg(qpti->sdev,
 				      (struct scatterlist *)Cmnd->buffer,
-				      Cmnd->use_sg);
+				      Cmnd->use_sg,
+				      scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
 		} else {
 			sbus_unmap_single(qpti->sdev,
 					  (__u32)((unsigned long)Cmnd->SCp.ptr),
-					  Cmnd->request_bufflen);
+					  Cmnd->request_bufflen,
+					  scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
 		}
 		qpti->cmd_count[Cmnd->target]--;
 		sbus_writew(out_ptr, qpti->qregs + MBOX5);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)