Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75bc4190 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Drop unused driver cruft.



- structure definitions.
- structure members.
- #define's.

Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 5341e868
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1995,7 +1995,6 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
		return;

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

void
+0 −116
Original line number Diff line number Diff line
@@ -189,22 +189,13 @@ typedef struct srb {

	struct scsi_cmnd *cmd;		/* Linux SCSI command pkt */

	struct timer_list timer;	/* Command timer */
	atomic_t ref_count;	/* Reference count for this structure */
	uint16_t flags;

	/* Request state */
	uint16_t state;

	/* Single transfer DMA context */
	dma_addr_t dma_handle;

	uint32_t request_sense_length;
	uint8_t *request_sense_ptr;

	/* SRB magic number */
	uint16_t magic;
#define SRB_MAGIC       0x10CB
} srb_t;

/*
@@ -225,21 +216,6 @@ typedef struct srb {
#define SRB_IOCTL		BIT_10	/* IOCTL command. */
#define SRB_TAPE		BIT_11	/* FCP2 (Tape) command. */

/*
 * SRB state definitions
 */
#define SRB_FREE_STATE		0	/*   returned back */
#define SRB_PENDING_STATE	1	/*   queued in LUN Q */
#define SRB_ACTIVE_STATE	2	/*   in Active Array */
#define SRB_DONE_STATE		3	/*   queued in Done Queue */
#define SRB_RETRY_STATE		4	/*   in Retry Queue */
#define SRB_SUSPENDED_STATE	5	/*   in suspended state */
#define SRB_NO_QUEUE_STATE	6	/*   is in between states */
#define SRB_ACTIVE_TIMEOUT_STATE 7	/*   in Active Array but timed out */
#define SRB_FAILOVER_STATE	8	/*   in Failover Queue */
#define SRB_SCSI_RETRY_STATE	9	/*   in Scsi Retry Queue */


/*
 * ISP I/O Register Set structure definitions.
 */
@@ -1515,62 +1491,6 @@ typedef struct {
	uint8_t port_name[WWN_SIZE];
} sw_info_t;

/*
 * Inquiry command structure.
 */
#define INQ_DATA_SIZE	36

/*
 * Inquiry mailbox IOCB packet definition.
 */
typedef struct {
	union {
		cmd_a64_entry_t cmd;
		sts_entry_t rsp;
		struct cmd_type_7 cmd24;
		struct sts_entry_24xx rsp24;
	} p;
	uint8_t inq[INQ_DATA_SIZE];
} inq_cmd_rsp_t;

/*
 * Report LUN command structure.
 */
#define CHAR_TO_SHORT(a, b)	(uint16_t)((uint8_t)b << 8 | (uint8_t)a)

typedef struct {
	uint32_t len;
	uint32_t rsrv;
} rpt_hdr_t;

typedef struct {
	struct {
		uint8_t b : 6;
		uint8_t address_method : 2;
	} msb;
	uint8_t lsb;
	uint8_t unused[6];
} rpt_lun_t;

typedef struct {
	rpt_hdr_t hdr;
	rpt_lun_t lst[MAX_LUNS];
} rpt_lun_lst_t;

/*
 * Report Lun mailbox IOCB packet definition.
 */
typedef struct {
	union {
		cmd_a64_entry_t cmd;
		sts_entry_t rsp;
		struct cmd_type_7 cmd24;
		struct sts_entry_24xx rsp24;
	} p;
	rpt_lun_lst_t list;
} rpt_lun_cmd_rsp_t;


/*
 * Fibre channel port type.
 */
@@ -1589,7 +1509,6 @@ typedef struct {
typedef struct fc_port {
	struct list_head list;
	struct scsi_qla_host *ha;
	struct scsi_qla_host *vis_ha;	/* only used when suspending lun */

	uint8_t node_name[WWN_SIZE];
	uint8_t port_name[WWN_SIZE];
@@ -1610,17 +1529,9 @@ typedef struct fc_port {
	int login_retry;
	atomic_t port_down_timer;

	uint8_t device_type;
	uint8_t unused;

	uint8_t mp_byte;		/* multi-path byte (not used) */
    	uint8_t cur_path;		/* current path id */

	spinlock_t rport_lock;
	struct fc_rport *rport, *drport;
	u32 supported_classes;
	struct work_struct rport_add_work;
	struct work_struct rport_del_work;
} fc_port_t;

/*
@@ -2305,9 +2216,6 @@ typedef struct scsi_qla_host {
	uint32_t	current_outstanding_cmd;
	srb_t		*status_srb;	/* Status continuation entry. */

	uint16_t           revision;
	uint8_t           ports;

	/* ISP configuration data. */
	uint16_t	loop_id;		/* Host adapter loop id */
	uint16_t	fb_rev;
@@ -2397,9 +2305,6 @@ typedef struct scsi_qla_host {
	struct gid_list_info *gid_list;
	int		gid_list_info_size;

	dma_addr_t	rlc_rsp_dma;
	rpt_lun_cmd_rsp_t *rlc_rsp;

	/* Small DMA pool allocations -- maximum 256 bytes in length. */
#define DMA_POOL_SIZE	256
	struct dma_pool *s_dma_pool;
@@ -2505,8 +2410,6 @@ typedef struct scsi_qla_host {
	 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
	 atomic_read(&ha->loop_state) == LOOP_DOWN)

#define TGT_Q(ha, t) (ha->otgt[t])

#define to_qla_host(x)		((scsi_qla_host_t *) (x)->hostdata)

#define qla_printk(level, ha, format, arg...) \
@@ -2539,19 +2442,6 @@ typedef struct scsi_qla_host {
#define QLA_RSCNS_HANDLED		0x108
#define QLA_ALREADY_REGISTERED		0x109

/*
* Stat info for all adpaters
*/
struct _qla2x00stats  {
        unsigned long   mboxtout;            /* mailbox timeouts */
        unsigned long   mboxerr;             /* mailbox errors */
        unsigned long   ispAbort;            /* ISP aborts */
        unsigned long   debugNo;
        unsigned long   loop_resync;
        unsigned long   outarray_full;
        unsigned long   retry_q_cnt;
};

#define NVRAM_DELAY()		udelay(10)

#define INVALID_HANDLE	(MAX_OUTSTANDING_COMMANDS+1)
@@ -2567,12 +2457,6 @@ struct _qla2x00stats {
#include "qla_dbg.h"
#include "qla_inline.h"

/*
* String arrays
*/
#define LINESIZE    256
#define MAXARGS      26

#define CMD_SP(Cmnd)		((Cmnd)->SCp.ptr)
#define CMD_COMPL_STATUS(Cmnd)  ((Cmnd)->SCp.this_residual)
#define CMD_RESID_LEN(Cmnd)	((Cmnd)->SCp.buffers_residual)
+0 −2
Original line number Diff line number Diff line
@@ -70,8 +70,6 @@ extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);

extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *);

extern void qla2x00_cmd_timeout(srb_t *);

extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int);
extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int);

+0 −17
Original line number Diff line number Diff line
@@ -194,7 +194,6 @@ qla2100_pci_config(scsi_qla_host_t *ha)
	mwi = 0;
	if (pci_set_mwi(ha->pdev))
		mwi = PCI_COMMAND_INVALIDATE;
	pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);

	pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
	w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -232,7 +231,6 @@ qla2300_pci_config(scsi_qla_host_t *ha)
	mwi = 0;
	if (pci_set_mwi(ha->pdev))
		mwi = PCI_COMMAND_INVALIDATE;
	pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);

	pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
	w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -320,7 +318,6 @@ qla24xx_pci_config(scsi_qla_host_t *ha)
	mwi = 0;
	if (pci_set_mwi(ha->pdev))
		mwi = PCI_COMMAND_INVALIDATE;
	pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);

	pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
	w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
@@ -1674,14 +1671,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
	return (rval);
}

static void
qla2x00_rport_add(void *data)
{
	fc_port_t *fcport = data;

	qla2x00_reg_remote_port(fcport->ha, fcport);
}

static void
qla2x00_rport_del(void *data)
{
@@ -1724,8 +1713,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
	fcport->flags = FCF_RLC_SUPPORT;
	fcport->supported_classes = FC_COS_UNSPECIFIED;
	spin_lock_init(&fcport->rport_lock);
	INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport);
	INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport);

	return (fcport);
}
@@ -2048,10 +2035,6 @@ qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
	    PORT_RETRY_TIME);
	fcport->flags &= ~FCF_LOGIN_NEEDED;

	if (fcport->port_type == FCT_INITIATOR ||
	    fcport->port_type == FCT_BROADCAST)
		fcport->device_type = TYPE_PROCESSOR;

	atomic_set(&fcport->state, FCS_ONLINE);

	if (ha->flags.init_done)
+0 −2
Original line number Diff line number Diff line
@@ -408,7 +408,6 @@ qla2x00_start_scsi(srb_t *sp)
		ha->request_ring_ptr++;

	sp->flags |= SRB_DMA_VALID;
	sp->state = SRB_ACTIVE_STATE;

	/* Set chip new ring index. */
	WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index);
@@ -838,7 +837,6 @@ qla24xx_start_scsi(srb_t *sp)
		ha->request_ring_ptr++;

	sp->flags |= SRB_DMA_VALID;
	sp->state = SRB_ACTIVE_STATE;

	/* Set chip new ring index. */
	WRT_REG_DWORD(&reg->req_q_in, ha->req_ring_index);
Loading