mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[SCSI] qla2xxx: Drop unused driver cruft.
- structure definitions. - structure members. - #define's. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
5341e868fb
commit
75bc419070
9 changed files with 5 additions and 170 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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(®->req_q_in, ha->req_ring_index);
|
||||
|
|
|
@ -844,8 +844,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
|
|||
cp = sp->cmd;
|
||||
if (cp == NULL) {
|
||||
DEBUG2(printk("scsi(%ld): Command already returned back to OS "
|
||||
"pkt->handle=%d sp=%p sp->state:%d\n",
|
||||
ha->host_no, sts->handle, sp, sp->state));
|
||||
"pkt->handle=%d sp=%p.\n", ha->host_no, sts->handle, sp));
|
||||
qla_printk(KERN_WARNING, ha,
|
||||
"Command is NULL: already returned to OS (sp=%p)\n", sp);
|
||||
|
||||
|
@ -1189,7 +1188,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt)
|
|||
cp = sp->cmd;
|
||||
if (cp == NULL) {
|
||||
DEBUG2(printk("%s(): Cmd already returned back to OS "
|
||||
"sp=%p sp->state:%d\n", __func__, sp, sp->state));
|
||||
"sp=%p.\n", __func__, sp));
|
||||
qla_printk(KERN_INFO, ha,
|
||||
"cmd is NULL: already returned to OS (sp=%p)\n",
|
||||
sp);
|
||||
|
|
|
@ -340,7 +340,6 @@ qla2x00_get_new_sp(scsi_qla_host_t *ha, fc_port_t *fcport,
|
|||
if (!sp)
|
||||
return sp;
|
||||
|
||||
atomic_set(&sp->ref_count, 1);
|
||||
sp->ha = ha;
|
||||
sp->fcport = fcport;
|
||||
sp->cmd = cmd;
|
||||
|
@ -634,9 +633,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
|
|||
if (sp->cmd != cmd)
|
||||
continue;
|
||||
|
||||
DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld "
|
||||
"sp->state=%x\n", __func__, ha->host_no, sp, serial,
|
||||
sp->state));
|
||||
DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n",
|
||||
__func__, ha->host_no, sp, serial));
|
||||
DEBUG3(qla2x00_print_scsi_cmd(cmd);)
|
||||
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
@ -1377,7 +1375,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
|
|||
spin_lock_init(&ha->hardware_lock);
|
||||
|
||||
ha->prev_topology = 0;
|
||||
ha->ports = MAX_BUSES;
|
||||
ha->init_cb_size = sizeof(init_cb_t);
|
||||
ha->mgmt_svr_loop_id = MANAGEMENT_SERVER;
|
||||
ha->link_data_rate = LDR_UNKNOWN;
|
||||
|
@ -1544,7 +1541,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
|
|||
host->cmd_per_lun = 3;
|
||||
host->unique_id = ha->instance;
|
||||
host->max_cmd_len = MAX_CMDSZ;
|
||||
host->max_channel = ha->ports - 1;
|
||||
host->max_channel = MAX_BUSES - 1;
|
||||
host->max_lun = MAX_LUNS;
|
||||
host->transportt = qla2xxx_transport_template;
|
||||
|
||||
|
@ -1885,18 +1882,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
|
|||
continue;
|
||||
}
|
||||
|
||||
ha->rlc_rsp = dma_alloc_coherent(&ha->pdev->dev,
|
||||
sizeof(rpt_lun_cmd_rsp_t), &ha->rlc_rsp_dma, GFP_KERNEL);
|
||||
if (ha->rlc_rsp == NULL) {
|
||||
qla_printk(KERN_WARNING, ha,
|
||||
"Memory Allocation failed - rlc");
|
||||
|
||||
qla2x00_mem_free(ha);
|
||||
msleep(100);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "qla2xxx_%ld", ha->host_no);
|
||||
ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev,
|
||||
DMA_POOL_SIZE, 8, 0);
|
||||
|
@ -2072,11 +2057,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
|
|||
if (ha->s_dma_pool)
|
||||
dma_pool_destroy(ha->s_dma_pool);
|
||||
|
||||
if (ha->rlc_rsp)
|
||||
dma_free_coherent(&ha->pdev->dev,
|
||||
sizeof(rpt_lun_cmd_rsp_t), ha->rlc_rsp,
|
||||
ha->rlc_rsp_dma);
|
||||
|
||||
if (ha->gid_list)
|
||||
dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list,
|
||||
ha->gid_list_dma);
|
||||
|
@ -2104,8 +2084,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
|
|||
|
||||
ha->s_dma_pool = NULL;
|
||||
|
||||
ha->rlc_rsp = NULL;
|
||||
ha->rlc_rsp_dma = 0;
|
||||
ha->gid_list = NULL;
|
||||
ha->gid_list_dma = 0;
|
||||
|
||||
|
@ -2149,8 +2127,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
|
|||
*
|
||||
* Context:
|
||||
* Kernel context.
|
||||
*
|
||||
* Note: Sets the ref_count for non Null sp to one.
|
||||
*/
|
||||
static int
|
||||
qla2x00_allocate_sp_pool(scsi_qla_host_t *ha)
|
||||
|
|
|
@ -318,7 +318,6 @@ qla2x00_update_login_fcport(scsi_qla_host_t *ha, struct mbx_entry *mbxstat,
|
|||
fcport->flags &= ~FCF_FAILOVER_NEEDED;
|
||||
fcport->iodesc_idx_sent = IODESC_INVALID_INDEX;
|
||||
atomic_set(&fcport->state, FCS_ONLINE);
|
||||
schedule_work(&fcport->rport_add_work);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
/* Max time to wait for the loop to be in LOOP_READY state */
|
||||
#define MAX_LOOP_TIMEOUT (60 * 5)
|
||||
#define EH_ACTIVE 1 /* Error handler active */
|
||||
|
||||
/*
|
||||
* Some vendor subsystems do not recover properly after a device reset. Define
|
||||
|
|
Loading…
Reference in a new issue