Commit 354d6b21 authored by Andrew Vasquez 's avatar Andrew Vasquez Committed by James Bottomley
Browse files

[SCSI] remove some dead code in qla2xxx



Original from: Christoph Hellwig <hch@lst.de>

Modified and
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent b86fff73
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1063,8 +1063,7 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
		return;

	printk("  sp flags=0x%x\n", sp->flags);
	printk("  r_start=0x%lx, u_start=0x%lx, f_start=0x%lx, state=%d\n",
	    sp->r_start, sp->u_start, sp->f_start, sp->state);
	printk("  state=%d\n", sp->state);
}

#if defined(QL_DEBUG_ROUTINES)
+0 −60
Original line number Diff line number Diff line
@@ -252,31 +252,12 @@ typedef struct srb {
	/* Request state */
	uint16_t state;

	/* Timing counts. */
	unsigned long e_start;		/* Start of extend timeout */
	unsigned long r_start;		/* Start of request */
	unsigned long u_start;		/* When sent to RISC */
	unsigned long f_start;		/* When placed in FO queue*/

	/* Single transfer DMA context */
	dma_addr_t dma_handle;

	uint32_t request_sense_length;
	uint8_t *request_sense_ptr;

	int ext_history;

	/* Suspend delay */
	int delay;

	/* Raw completion info for use by failover ? */
	uint8_t	fo_retry_cnt;		/* Retry count this request */
	uint8_t	err_id;			/* error id */
#define SRB_ERR_PORT	1		/* Request failed -- "port down" */
#define SRB_ERR_LOOP	2		/* Request failed -- "loop down" */
#define SRB_ERR_DEVICE	3		/* Request failed -- "device error" */
#define SRB_ERR_OTHER	4

	/* SRB magic number */
	uint16_t magic;
#define SRB_MAGIC       0x10CB
@@ -2082,23 +2063,8 @@ typedef struct scsi_qla_host {
	uint32_t	current_outstanding_cmd; 
	srb_t		*status_srb;	/* Status continuation entry. */

	unsigned long	last_irq_cpu;	/* cpu where we got our last irq */

	uint16_t           revision;
	uint8_t           ports;
	u_long            actthreads;
	u_long            ipreq_cnt;
	u_long            qthreads;

	uint32_t        total_isr_cnt;		/* Interrupt count */
	uint32_t        total_isp_aborts;	/* controller err cnt */
	uint32_t        total_lip_cnt;		/* LIP cnt */
	uint32_t	total_dev_errs;		/* device error cnt */
	uint32_t	total_ios;		/* IO cnt */
	uint64_t	total_bytes;		/* xfr byte cnt */
	uint32_t	total_mbx_timeout;	/* mailbox timeout cnt */
	uint32_t 	total_loop_resync; 	/* loop resyn cnt */
	uint32_t	dropped_frame_error_cnt;

	/* ISP configuration data. */
	uint16_t	loop_id;		/* Host adapter loop id */
@@ -2124,8 +2090,6 @@ typedef struct scsi_qla_host {
#define P2P_LOOP  3

        uint8_t		marker_needed; 
	uint8_t		sns_retry_cnt;
	uint8_t		mem_err;

	uint8_t		interrupts_on;

@@ -2138,16 +2102,11 @@ typedef struct scsi_qla_host {
	uint16_t	nvram_base;

	uint16_t	loop_reset_delay;
	uint16_t	minimum_timeout;
	uint8_t		retry_count;
	uint8_t		login_timeout;
	uint16_t	r_a_tov;
	int		port_down_retry_count;
	uint8_t		loop_down_timeout;
	uint8_t		mbx_count;
	uint16_t	max_probe_luns;
	uint16_t	max_luns;
	uint16_t	max_targets;
	uint16_t	last_loop_id;

        uint32_t	login_retry_count; 
@@ -2181,7 +2140,6 @@ typedef struct scsi_qla_host {
	uint8_t dpc_active;                  /* DPC routine is active */

	/* Timeout timers. */
	uint8_t         queue_restart_timer;   
	uint8_t         loop_down_abort_time;    /* port down timer */
	atomic_t        loop_down_timer;         /* loop down timer */
	uint8_t         link_down_timeout;       /* link down timeout */
@@ -2230,18 +2188,6 @@ typedef struct scsi_qla_host {

	mbx_cmd_t 	mc;

	uint8_t	*cmdline;

	uint32_t failover_type;
	uint32_t failback_delay;
	unsigned long   cfg_flags;
#define	CFG_ACTIVE	0	/* CFG during a failover, event update, or ioctl */
#define	CFG_FAILOVER	1	/* CFG during path change */

	uint32_t	binding_type;
#define BIND_BY_PORT_NAME	0
#define BIND_BY_PORT_ID		1

	/* Basic firmware related information. */
	struct qla_board_info	*brd_info;
	uint16_t	fw_major_version;
@@ -2274,12 +2220,6 @@ typedef struct scsi_qla_host {
	uint8_t     nvram_version; 
	uint32_t    isp_abort_cnt;

	/* Adapter I/O statistics for failover */
	uint64_t	IosRequested;
	uint64_t	BytesRequested;
	uint64_t	IosExecuted;
	uint64_t	BytesExecuted;

	/* Needed for BEACON */
	uint16_t	beacon_blink_led;
	uint16_t	beacon_green_on;
+0 −14
Original line number Diff line number Diff line
@@ -53,27 +53,13 @@ extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *);
 */
extern char qla2x00_version_str[];

extern int num_hosts;
extern int apiHBAInstance;

extern struct _qla2x00stats qla2x00_stats;
extern int ql2xretrycount;
extern int ql2xlogintimeout;
extern int qlport_down_retry;
extern int ql2xmaxqdepth;
extern int displayConfig;
extern int ql2xplogiabsentdevice;
extern int ql2xenablezio;
extern int ql2xintrdelaytimer;
extern int ql2xloginretrycount;

extern int ConfigRequired;

extern int Bind;
extern int ql2xsuspendcount;
#if defined(MODULE)
extern char *ql2xopts;
#endif
extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);

extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);
+1 −32
Original line number Diff line number Diff line
@@ -85,9 +85,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha)
	atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
	atomic_set(&ha->loop_state, LOOP_DOWN);
	ha->device_flags = 0;
	ha->sns_retry_cnt = 0;
	ha->dpc_flags = 0;
	ha->failback_delay = 0;
	ha->flags.management_server_logged_in = 0;
	ha->marker_needed = 0;
	ha->mbx_flags = 0;
@@ -171,8 +169,6 @@ check_fw_ready_again:

				if (wait_time == 0)
					rval = QLA_FUNCTION_FAILED;
				if (ha->mem_err)
					restart_risc = 1;
			} else if (ha->device_flags & DFLG_NO_CABLE)
				/* If no cable, then all is good. */
				rval = QLA_SUCCESS;
@@ -1410,13 +1406,8 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
	/* Set minimum RATOV to 200 tenths of a second. */
	ha->r_a_tov = 200;

	ha->minimum_timeout =
	    (ha->login_timeout * ha->retry_count) + nv->port_down_retry_count;
	ha->loop_reset_delay = nv->reset_delay;

	/* Will get the value from NVRAM. */
	ha->loop_down_timeout = LOOP_DOWN_TIMEOUT;

	/* Link Down Timeout = 0:
	 *
	 * 	When Port Down timer expires we will start returning
@@ -1429,18 +1420,13 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
	 */						
	if (nv->link_down_timeout == 0) {
		ha->loop_down_abort_time =
		    (LOOP_DOWN_TIME - ha->loop_down_timeout);
		    (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT);
	} else {
		ha->link_down_timeout =	 nv->link_down_timeout;
		ha->loop_down_abort_time =
		    (LOOP_DOWN_TIME - ha->link_down_timeout);
	} 

	ha->max_luns = MAX_LUNS;
	ha->max_probe_luns = le16_to_cpu(nv->max_luns_per_target);
	if (ha->max_probe_luns == 0)
		ha->max_probe_luns = MIN_LUNS;

	/*
	 * Need enough time to try and get the port back.
	 */
@@ -1457,16 +1443,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
	if (ql2xloginretrycount)
		ha->login_retry_count = ql2xloginretrycount;

	ha->binding_type = Bind;
	if (ha->binding_type != BIND_BY_PORT_NAME &&
	    ha->binding_type != BIND_BY_PORT_ID) {
		qla_printk(KERN_WARNING, ha,
		    "Invalid binding type specified (%d), "
		    "defaulting to BIND_BY_PORT_NAME!!!\n", ha->binding_type);

		ha->binding_type = BIND_BY_PORT_NAME;
	}

	icb->lun_enables = __constant_cpu_to_le16(0);
	icb->command_resource_count = 0;
	icb->immediate_notify_resource_count = 0;
@@ -1578,7 +1554,6 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
	 */
	clear_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
	clear_bit(RSCN_UPDATE, &ha->dpc_flags);
	ha->mem_err = 0 ;

	/* Determine what we need to do */
	if (ha->current_topology == ISP_CFG_FL &&
@@ -2707,7 +2682,6 @@ qla2x00_loop_resync(scsi_qla_host_t *ha)
	rval = QLA_SUCCESS;

	atomic_set(&ha->loop_state, LOOP_UPDATE);
	qla2x00_stats.loop_resync++;
	clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
	if (ha->flags.online) {
		if (!(rval = qla2x00_fw_ready(ha))) {
@@ -2786,9 +2760,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
	if (ha->flags.online) {
		ha->flags.online = 0;
		clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
		qla2x00_stats.ispAbort++;
		ha->total_isp_aborts++;  /* used by ioctl */
		ha->sns_retry_cnt = 0;

		qla_printk(KERN_INFO, ha,
		    "Performing ISP error recovery - ha= %p.\n", ha);
@@ -2810,8 +2781,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
			sp = ha->outstanding_cmds[cnt];
			if (sp) {
				ha->outstanding_cmds[cnt] = NULL;
				if (ha->actthreads)
					ha->actthreads--;
				sp->flags = 0;
				sp->cmd->result = DID_RESET << 16;
				sp->cmd->host_scribble = (unsigned char *)NULL;
+0 −3
Original line number Diff line number Diff line
@@ -433,11 +433,8 @@ qla2x00_start_scsi(srb_t *sp)
	} else
		ha->request_ring_ptr++;

	ha->actthreads++;
	ha->total_ios++;
	sp->flags |= SRB_DMA_VALID;
	sp->state = SRB_ACTIVE_STATE;
	sp->u_start = jiffies;

	/* Set chip new ring index. */
	WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index);
Loading