Commit f4960ce0 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[PATCH] [13/18] qla2xxx: Remove TRUE/FALSE usage

  Christoph Hellwig <hch () lst !de>:

  o Remove TRUE/FALSE #define usage within the driver.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent bb738dca
...@@ -107,8 +107,8 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) ...@@ -107,8 +107,8 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha)
uint32_t wait_time; uint32_t wait_time;
/* Clear adapter flags. */ /* Clear adapter flags. */
ha->flags.online = FALSE; ha->flags.online = 0;
ha->flags.reset_active = FALSE; ha->flags.reset_active = 0;
atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
atomic_set(&ha->loop_state, LOOP_DOWN); atomic_set(&ha->loop_state, LOOP_DOWN);
ha->device_flags = 0; ha->device_flags = 0;
...@@ -225,7 +225,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) ...@@ -225,7 +225,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha)
qla2x00_marker(ha, 0, 0, MK_SYNC_ALL); qla2x00_marker(ha, 0, 0, MK_SYNC_ALL);
ha->marker_needed = 0; ha->marker_needed = 0;
ha->flags.online = TRUE; ha->flags.online = 1;
} else { } else {
DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__));
} }
...@@ -1552,20 +1552,20 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) ...@@ -1552,20 +1552,20 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
if (ha->current_topology == ISP_CFG_FL && if (ha->current_topology == ISP_CFG_FL &&
(test_bit(LOCAL_LOOP_UPDATE, &flags))) { (test_bit(LOCAL_LOOP_UPDATE, &flags))) {
ha->flags.rscn_queue_overflow = TRUE; ha->flags.rscn_queue_overflow = 1;
set_bit(RSCN_UPDATE, &flags); set_bit(RSCN_UPDATE, &flags);
} else if (ha->current_topology == ISP_CFG_F && } else if (ha->current_topology == ISP_CFG_F &&
(test_bit(LOCAL_LOOP_UPDATE, &flags))) { (test_bit(LOCAL_LOOP_UPDATE, &flags))) {
ha->flags.rscn_queue_overflow = TRUE; ha->flags.rscn_queue_overflow = 1;
set_bit(RSCN_UPDATE, &flags); set_bit(RSCN_UPDATE, &flags);
clear_bit(LOCAL_LOOP_UPDATE, &flags); clear_bit(LOCAL_LOOP_UPDATE, &flags);
} else if (!ha->flags.online || } else if (!ha->flags.online ||
(test_bit(ABORT_ISP_ACTIVE, &flags))) { (test_bit(ABORT_ISP_ACTIVE, &flags))) {
ha->flags.rscn_queue_overflow = TRUE; ha->flags.rscn_queue_overflow = 1;
set_bit(RSCN_UPDATE, &flags); set_bit(RSCN_UPDATE, &flags);
set_bit(LOCAL_LOOP_UPDATE, &flags); set_bit(LOCAL_LOOP_UPDATE, &flags);
} }
...@@ -3103,7 +3103,7 @@ qla2x00_loop_resync(scsi_qla_host_t *ha) ...@@ -3103,7 +3103,7 @@ qla2x00_loop_resync(scsi_qla_host_t *ha)
wait_time && wait_time &&
(test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))); (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)));
} }
qla2x00_restart_queues(ha, TRUE); qla2x00_restart_queues(ha, 1);
} }
if (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) { if (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) {
...@@ -4106,7 +4106,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) ...@@ -4106,7 +4106,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
uint8_t status = 0; uint8_t status = 0;
if (ha->flags.online) { if (ha->flags.online) {
ha->flags.online = FALSE; ha->flags.online = 0;
clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
qla2x00_stats.ispAbort++; qla2x00_stats.ispAbort++;
ha->total_isp_aborts++; /* used by ioctl */ ha->total_isp_aborts++; /* used by ioctl */
...@@ -4171,20 +4171,20 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) ...@@ -4171,20 +4171,20 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
ha->marker_needed = 1; ha->marker_needed = 1;
} }
ha->flags.online = TRUE; ha->flags.online = 1;
/* Enable ISP interrupts. */ /* Enable ISP interrupts. */
qla2x00_enable_intrs(ha); qla2x00_enable_intrs(ha);
/* v2.19.5b6 Return all commands */ /* v2.19.5b6 Return all commands */
qla2x00_abort_queues(ha, TRUE); qla2x00_abort_queues(ha, 1);
/* Restart queues that may have been stopped. */ /* Restart queues that may have been stopped. */
qla2x00_restart_queues(ha,TRUE); qla2x00_restart_queues(ha, 1);
ha->isp_abort_cnt = 0; ha->isp_abort_cnt = 0;
clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
} else { /* failed the ISP abort */ } else { /* failed the ISP abort */
ha->flags.online = TRUE; ha->flags.online = 1;
if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) {
if (ha->isp_abort_cnt == 0) { if (ha->isp_abort_cnt == 0) {
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
...@@ -4195,8 +4195,8 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) ...@@ -4195,8 +4195,8 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
* completely. * completely.
*/ */
qla2x00_reset_adapter(ha); qla2x00_reset_adapter(ha);
qla2x00_abort_queues(ha, FALSE); qla2x00_abort_queues(ha, 0);
ha->flags.online = FALSE; ha->flags.online = 0;
clear_bit(ISP_ABORT_RETRY, clear_bit(ISP_ABORT_RETRY,
&ha->dpc_flags); &ha->dpc_flags);
status = 0; status = 0;
...@@ -4251,7 +4251,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) ...@@ -4251,7 +4251,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
/* If firmware needs to be loaded */ /* If firmware needs to be loaded */
if (qla2x00_isp_firmware(ha)) { if (qla2x00_isp_firmware(ha)) {
ha->flags.online = FALSE; ha->flags.online = 0;
if (!(status = qla2x00_chip_diag(ha))) { if (!(status = qla2x00_chip_diag(ha))) {
if (IS_QLA2100(ha) || IS_QLA2200(ha)) { if (IS_QLA2100(ha) || IS_QLA2200(ha)) {
status = qla2x00_setup_chip(ha); status = qla2x00_setup_chip(ha);
...@@ -4290,7 +4290,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) ...@@ -4290,7 +4290,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
"status = %d\n", "status = %d\n",
__func__, __func__,
status);) status);)
ha->flags.online = TRUE; ha->flags.online = 1;
/* Wait at most MAX_TARGET RSCNs for a stable link. */ /* Wait at most MAX_TARGET RSCNs for a stable link. */
wait_time = 256; wait_time = 256;
do { do {
...@@ -4327,7 +4327,7 @@ qla2x00_reset_adapter(scsi_qla_host_t *ha) ...@@ -4327,7 +4327,7 @@ qla2x00_reset_adapter(scsi_qla_host_t *ha)
unsigned long flags = 0; unsigned long flags = 0;
device_reg_t *reg = ha->iobase; device_reg_t *reg = ha->iobase;
ha->flags.online = FALSE; ha->flags.online = 0;
qla2x00_disable_intrs(ha); qla2x00_disable_intrs(ha);
/* Reset RISC processor. */ /* Reset RISC processor. */
spin_lock_irqsave(&ha->hardware_lock, flags); spin_lock_irqsave(&ha->hardware_lock, flags);
......
...@@ -165,7 +165,7 @@ static __inline__ int qla2x00_is_wwn_zero(uint8_t *); ...@@ -165,7 +165,7 @@ static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
* wwn = Pointer to WW name to check * wwn = Pointer to WW name to check
* *
* Returns: * Returns:
* TRUE if name is 0 else FALSE * 1 if name is 0x00 else 0
* *
* Context: * Context:
* Kernel context. * Kernel context.
...@@ -179,7 +179,7 @@ qla2x00_is_wwn_zero(uint8_t *wwn) ...@@ -179,7 +179,7 @@ qla2x00_is_wwn_zero(uint8_t *wwn)
if (*wwn != 0) if (*wwn != 0)
break; break;
} }
/* if zero return TRUE */ /* if zero return 1 */
if (cnt == WWN_SIZE) if (cnt == WWN_SIZE)
return (1); return (1);
else else
......
...@@ -233,7 +233,7 @@ qla2x00_mbx_completion(scsi_qla_host_t *ha, uint16_t mb0) ...@@ -233,7 +233,7 @@ qla2x00_mbx_completion(scsi_qla_host_t *ha, uint16_t mb0)
device_reg_t *reg = ha->iobase; device_reg_t *reg = ha->iobase;
/* Load return mailbox registers. */ /* Load return mailbox registers. */
ha->flags.mbox_int = TRUE; ha->flags.mbox_int = 1;
ha->mailbox_out[0] = mb0; ha->mailbox_out[0] = mb0;
wptr = (uint16_t *)MAILBOX_REG(ha, reg, 1); wptr = (uint16_t *)MAILBOX_REG(ha, reg, 1);
......
...@@ -89,7 +89,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) ...@@ -89,7 +89,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
} }
} }
ha->flags.mbox_busy = TRUE; ha->flags.mbox_busy = 1;
/* Save mailbox command for debug */ /* Save mailbox command for debug */
ha->mcp = mcp; ha->mcp = mcp;
...@@ -135,7 +135,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) ...@@ -135,7 +135,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
#endif #endif
/* Issue set host interrupt command to send cmd out. */ /* Issue set host interrupt command to send cmd out. */
ha->flags.mbox_int = FALSE; ha->flags.mbox_int = 0;
clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
/* Unlock mbx registers and wait for interrupt */ /* Unlock mbx registers and wait for interrupt */
...@@ -216,7 +216,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) ...@@ -216,7 +216,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
command);) command);)
/* Got interrupt. Clear the flag. */ /* Got interrupt. Clear the flag. */
ha->flags.mbox_int = FALSE; ha->flags.mbox_int = 0;
clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) { if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) {
...@@ -257,7 +257,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) ...@@ -257,7 +257,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp)
if (!abort_active) if (!abort_active)
spin_unlock_irqrestore(&ha->mbx_reg_lock, mbx_flags); spin_unlock_irqrestore(&ha->mbx_reg_lock, mbx_flags);
ha->flags.mbox_busy = FALSE; ha->flags.mbox_busy = 0;
/* Clean up */ /* Clean up */
ha->mcp = NULL; ha->mcp = NULL;
......
...@@ -971,7 +971,7 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) ...@@ -971,7 +971,7 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha)
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ); schedule_timeout(HZ);
} }
if (ha->flags.online == TRUE) if (ha->flags.online)
return_status = QLA_SUCCESS; return_status = QLA_SUCCESS;
else else
return_status = QLA_FUNCTION_FAILED; return_status = QLA_FUNCTION_FAILED;
...@@ -2216,7 +2216,7 @@ qla2x00_free_device(scsi_qla_host_t *ha) ...@@ -2216,7 +2216,7 @@ qla2x00_free_device(scsi_qla_host_t *ha)
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
ha->flags.online = FALSE; ha->flags.online = 0;
/* Detach interrupts */ /* Detach interrupts */
if (ha->pdev->irq) if (ha->pdev->irq)
...@@ -2287,12 +2287,12 @@ copy_info(struct info_str *info, char *fmt, ...) ...@@ -2287,12 +2287,12 @@ copy_info(struct info_str *info, char *fmt, ...)
* *
* inout : decides the direction of the dataflow and the meaning of the * inout : decides the direction of the dataflow and the meaning of the
* variables * variables
* buffer: If inout==FALSE data is being written to it else read from it * buffer: If inout==0 data is being written to it else read from it
* (ptr to a page buffer) * (ptr to a page buffer)
* *start: If inout==FALSE start of the valid data in the buffer * *start: If inout==0 start of the valid data in the buffer
* offset: If inout==FALSE starting offset from the beginning of all * offset: If inout==0 starting offset from the beginning of all
* possible data to return. * possible data to return.
* length: If inout==FALSE max number of bytes to be written into the buffer * length: If inout==0 max number of bytes to be written into the buffer
* else number of bytes in "buffer" * else number of bytes in "buffer"
* Returns: * Returns:
* < 0: error. errno value. * < 0: error. errno value.
...@@ -2319,7 +2319,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer, ...@@ -2319,7 +2319,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer,
ha = (scsi_qla_host_t *) shost->hostdata; ha = (scsi_qla_host_t *) shost->hostdata;
if (inout == TRUE) { if (inout) {
/* Has data been written to the file? */ /* Has data been written to the file? */
DEBUG3(printk( DEBUG3(printk(
"%s: has data been written to the file. \n", "%s: has data been written to the file. \n",
...@@ -2483,6 +2483,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer, ...@@ -2483,6 +2483,7 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer,
tq->port_name[4], tq->port_name[5], tq->port_name[4], tq->port_name[5],
tq->port_name[6], tq->port_name[7]); tq->port_name[6], tq->port_name[7]);
} }
copy_info(&info, "\nSCSI LUN Information:\n"); copy_info(&info, "\nSCSI LUN Information:\n");
copy_info(&info, copy_info(&info,
"(Id:Lun) * - indicates lun is not registered with the OS.\n"); "(Id:Lun) * - indicates lun is not registered with the OS.\n");
...@@ -3460,7 +3461,7 @@ qla2x00_do_dpc(void *data) ...@@ -3460,7 +3461,7 @@ qla2x00_do_dpc(void *data)
DEBUG(printk("scsi(%ld): qla2x00_restart_queues()\n", DEBUG(printk("scsi(%ld): qla2x00_restart_queues()\n",
ha->host_no)); ha->host_no));
qla2x00_restart_queues(ha,FALSE); qla2x00_restart_queues(ha, 0);
DEBUG(printk("scsi(%ld): qla2x00_restart_queues - end\n", DEBUG(printk("scsi(%ld): qla2x00_restart_queues - end\n",
ha->host_no)); ha->host_no));
...@@ -3471,7 +3472,7 @@ qla2x00_do_dpc(void *data) ...@@ -3471,7 +3472,7 @@ qla2x00_do_dpc(void *data)
DEBUG(printk("scsi(%ld): qla2x00_abort_queues()\n", DEBUG(printk("scsi(%ld): qla2x00_abort_queues()\n",
ha->host_no)); ha->host_no));
qla2x00_abort_queues(ha, FALSE); qla2x00_abort_queues(ha, 0);
DEBUG(printk("scsi(%ld): qla2x00_abort_queues - end\n", DEBUG(printk("scsi(%ld): qla2x00_abort_queues - end\n",
ha->host_no)); ha->host_no));
...@@ -3562,8 +3563,6 @@ qla2x00_rst_aen(scsi_qla_host_t *ha) ...@@ -3562,8 +3563,6 @@ qla2x00_rst_aen(scsi_qla_host_t *ha)
if (ha->flags.online && !ha->flags.reset_active && if (ha->flags.online && !ha->flags.reset_active &&
!atomic_read(&ha->loop_down_timer) && !atomic_read(&ha->loop_down_timer) &&
!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) { !(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) {
/* 10/15 ha->flags.reset_active = TRUE; */
do { do {
clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
...@@ -3574,8 +3573,6 @@ qla2x00_rst_aen(scsi_qla_host_t *ha) ...@@ -3574,8 +3573,6 @@ qla2x00_rst_aen(scsi_qla_host_t *ha)
ha->marker_needed = 1; ha->marker_needed = 1;
} while (!atomic_read(&ha->loop_down_timer) && } while (!atomic_read(&ha->loop_down_timer) &&
(test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags))); (test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags)));
/* 10/15 ha->flags.reset_active = FALSE; */
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment