This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / qla1280.c
index 6dfc187..ae98131 100644 (file)
 #else
 #include <linux/blk.h>
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include "sd.h"
 #endif
 
@@ -3119,6 +3119,7 @@ qla1280_marker(struct scsi_qla_host *ha, int bus, int id, int lun, u8 type)
  * Returns:
  *      0 = success, was able to issue command.
  */
+#ifdef QLA_64BIT_PTR
 static int
 qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 {
@@ -3371,6 +3372,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        sp->flags |= SRB_SENT;
        ha->actthreads++;
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
+       (void) RD_REG_WORD(&reg->mailbox4); /* PCI posted write flush */
 
  out:
        if (status)
@@ -3380,9 +3382,8 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 
        return status;
 }
+#else /* !QLA_64BIT_PTR */
 
-
-#ifndef QLA_64BIT_PTR
 /*
  * qla1280_32bit_start_scsi
  *      The start SCSI is responsible for building request packets on
@@ -3639,6 +3640,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        sp->flags |= SRB_SENT;
        ha->actthreads++;
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
+       (void) RD_REG_WORD(&reg->mailbox4); /* PCI posted write flush */
 
 out:
        if (status)
@@ -3750,6 +3752,7 @@ qla1280_isp_cmd(struct scsi_qla_host *ha)
 
        /* Set chip new ring index. */
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
+       (void) RD_REG_WORD(&reg->mailbox4); /* PCI posted write flush */
 
        LEAVE("qla1280_isp_cmd");
 }
@@ -3788,7 +3791,7 @@ qla1280_isr(struct scsi_qla_host *ha, struct list_head *done_q)
 
        /* Check for mailbox interrupt. */
 
-       mailbox[0] = RD_REG_WORD(&reg->semaphore);
+       mailbox[0] = RD_REG_WORD_dmasync(&reg->semaphore);
 
        if (mailbox[0] & BIT_0) {
                /* Get mailbox data. */