#else
#include <linux/blk.h>
#include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
#include "sd.h"
#endif
* 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)
{
sp->flags |= SRB_SENT;
ha->actthreads++;
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
out:
if (status)
return status;
}
+#else /* !QLA_64BIT_PTR */
-
-#ifndef QLA_64BIT_PTR
/*
* qla1280_32bit_start_scsi
* The start SCSI is responsible for building request packets on
sp->flags |= SRB_SENT;
ha->actthreads++;
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
out:
if (status)
qla1280_req_pkt(struct scsi_qla_host *ha)
{
struct device_reg *reg = ha->iobase;
- request_t *pkt = 0;
+ request_t *pkt = NULL;
int cnt;
uint32_t timer;
/* Set chip new ring index. */
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
LEAVE("qla1280_isp_cmd");
}
{
struct device_reg *reg = ha->iobase;
struct response *pkt;
- struct srb *sp = 0;
+ struct srb *sp = NULL;
uint16_t mailbox[MAILBOX_REGISTER_COUNT];
uint16_t *wptr;
uint32_t index;
/* Check for mailbox interrupt. */
- mailbox[0] = RD_REG_WORD(®->semaphore);
+ mailbox[0] = RD_REG_WORD_dmasync(®->semaphore);
if (mailbox[0] & BIT_0) {
/* Get mailbox data. */
if (index < MAX_OUTSTANDING_COMMANDS)
sp = ha->outstanding_cmds[index];
else
- sp = 0;
+ sp = NULL;
if (sp) {
/* Free outstanding command slot. */
- ha->outstanding_cmds[index] = 0;
+ ha->outstanding_cmds[index] = NULL;
/* Save ISP completion status */
CMD_RESULT(sp->cmd) = 0;
}
/* Free outstanding command slot. */
- ha->outstanding_cmds[handle] = 0;
+ ha->outstanding_cmds[handle] = NULL;
cmd = sp->cmd;
if (handle < MAX_OUTSTANDING_COMMANDS)
sp = ha->outstanding_cmds[handle];
else
- sp = 0;
+ sp = NULL;
if (sp) {
/* Free outstanding command slot. */
- ha->outstanding_cmds[handle] = 0;
+ ha->outstanding_cmds[handle] = NULL;
/* Bad payload or header */
if (pkt->entry_status & (BIT_3 + BIT_2)) {