[SCSI] qla2xxx: Remove unused port-type RSCN handling code.

Expandind on the previous commit:

	commit 79f89a4296
	Author: andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>
	Date:   Fri Jan 13 17:05:58 2006 -0800

	[SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.

and given:

- the process-context requirements of the FC transport
  rport-APIs.
- lack of port-type RSCN processing logic for ISP24xx and newer
  chips.

it's time now to remove the state-machine logic from mainline.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Andrew Vasquez 2006-05-17 15:09:27 -07:00 committed by James Bottomley
parent 75bc419070
commit 4971cd221a
7 changed files with 1 additions and 1581 deletions

View File

@ -1,7 +1,7 @@
EXTRA_CFLAGS += -DUNIQUE_FW_NAME
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
qla_dbg.o qla_sup.o qla_rscn.o qla_attr.o
qla_dbg.o qla_sup.o qla_attr.o
obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o

View File

@ -1523,8 +1523,6 @@ typedef struct fc_port {
unsigned int os_target_id;
uint16_t iodesc_idx_sent;
int port_login_retry_count;
int login_retry;
atomic_t port_down_timer;
@ -1940,34 +1938,6 @@ struct sns_cmd_pkt {
} p;
};
/* IO descriptors */
#define MAX_IO_DESCRIPTORS 32
#define ABORT_IOCB_CB 0
#define ADISC_PORT_IOCB_CB 1
#define LOGOUT_PORT_IOCB_CB 2
#define LOGIN_PORT_IOCB_CB 3
#define LAST_IOCB_CB 4
#define IODESC_INVALID_INDEX 0xFFFF
#define IODESC_ADISC_NEEDED 0xFFFE
#define IODESC_LOGIN_NEEDED 0xFFFD
struct io_descriptor {
uint16_t used:1;
uint16_t idx:11;
uint16_t cb_idx:4;
struct timer_list timer;
struct scsi_qla_host *ha;
port_id_t d_id;
fc_port_t *remote_fcport;
uint32_t signature;
};
struct qla_fw_info {
unsigned short addressing; /* addressing method used to load fw */
#define FW_INFO_ADDR_NORMAL 0
@ -2271,10 +2241,6 @@ typedef struct scsi_qla_host {
/* Fibre Channel Device List. */
struct list_head fcports;
struct list_head rscn_fcports;
struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS];
uint16_t iodesc_signature;
/* RSCN queue. */
uint32_t rscn_queue[MAX_RSCN_COUNT];
@ -2313,9 +2279,6 @@ typedef struct scsi_qla_host {
init_cb_t *init_cb;
int init_cb_size;
dma_addr_t iodesc_pd_dma;
port_database_t *iodesc_pd;
/* These are used by mailbox operations. */
volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT];

View File

@ -64,7 +64,6 @@ extern int qlport_down_retry;
extern int ql2xplogiabsentdevice;
extern int ql2xloginretrycount;
extern int ql2xfdmienable;
extern int ql2xprocessrscn;
extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);
@ -283,15 +282,6 @@ extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
extern int qla2x00_fdmi_register(scsi_qla_host_t *);
/*
* Global Function Prototypes in qla_rscn.c source file.
*/
extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, gfp_t);
extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *,
int);
extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *);
extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *);
/*
* Global Function Prototypes in qla_xioctl.c source file.
*/

View File

@ -1708,7 +1708,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
fcport->ha = ha;
fcport->port_type = FCT_UNKNOWN;
fcport->loop_id = FC_NO_LOOP_ID;
fcport->iodesc_idx_sent = IODESC_INVALID_INDEX;
atomic_set(&fcport->state, FCS_UNCONFIGURED);
fcport->flags = FCF_RLC_SUPPORT;
fcport->supported_classes = FC_COS_UNSPECIFIED;
@ -2563,7 +2562,6 @@ static int
qla2x00_device_resync(scsi_qla_host_t *ha)
{
int rval;
int rval2;
uint32_t mask;
fc_port_t *fcport;
uint32_t rscn_entry;
@ -2619,17 +2617,6 @@ qla2x00_device_resync(scsi_qla_host_t *ha)
switch (format) {
case 0:
if (ql2xprocessrscn &&
!IS_QLA2100(ha) && !IS_QLA2200(ha) &&
!IS_QLA6312(ha) && !IS_QLA6322(ha) &&
!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
ha->flags.init_done) {
/* Handle port RSCN via asyncronous IOCBs */
rval2 = qla2x00_handle_port_rscn(ha, rscn_entry,
NULL, 0);
if (rval2 == QLA_SUCCESS)
continue;
}
mask = 0xffffff;
break;
case 1:
@ -2647,10 +2634,6 @@ qla2x00_device_resync(scsi_qla_host_t *ha)
rval = QLA_SUCCESS;
/* Abort any outstanding IO descriptors. */
if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
qla2x00_cancel_io_descriptors(ha);
list_for_each_entry(fcport, &ha->fcports, list) {
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 ||
(fcport->d_id.b24 & mask) != d_id.b24 ||

View File

@ -514,47 +514,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
break;
case MBA_PORT_UPDATE: /* Port database update */
/*
* If a single remote port just logged into (or logged out of)
* us, create a new entry in our rscn fcports list and handle
* the event like an RSCN.
*/
if (ql2xprocessrscn &&
!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) &&
!IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
ha->flags.init_done && mb[1] != 0xffff &&
((ha->operating_mode == P2P && mb[1] != 0) ||
(ha->operating_mode != P2P && mb[1] !=
SNS_FIRST_LOOP_ID)) && (mb[2] == 6 || mb[2] == 7)) {
int rval;
fc_port_t *rscn_fcport;
/* Create new fcport for login. */
rscn_fcport = qla2x00_alloc_rscn_fcport(ha, GFP_ATOMIC);
if (rscn_fcport) {
DEBUG14(printk("scsi(%ld): Port Update -- "
"creating RSCN fcport %p for %x/%x/%x.\n",
ha->host_no, rscn_fcport, mb[1], mb[2],
mb[3]));
rscn_fcport->loop_id = mb[1];
rscn_fcport->d_id.b24 = INVALID_PORT_ID;
atomic_set(&rscn_fcport->state,
FCS_DEVICE_LOST);
list_add_tail(&rscn_fcport->list,
&ha->rscn_fcports);
rval = qla2x00_handle_port_rscn(ha, 0,
rscn_fcport, 1);
if (rval == QLA_SUCCESS)
break;
} else {
DEBUG14(printk("scsi(%ld): Port Update -- "
"-- unable to allocate RSCN fcport "
"login.\n", ha->host_no));
}
}
/*
* If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET
* event etc. earlier indicating loop is down) then process
@ -753,25 +712,6 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
case MS_IOCB_TYPE:
qla2x00_ms_entry(ha, (ms_iocb_entry_t *)pkt);
break;
case MBX_IOCB_TYPE:
if (!IS_QLA2100(ha) && !IS_QLA2200(ha) &&
!IS_QLA6312(ha) && !IS_QLA6322(ha)) {
if (pkt->sys_define == SOURCE_ASYNC_IOCB) {
qla2x00_process_iodesc(ha,
(struct mbx_entry *)pkt);
} else {
/* MBX IOCB Type Not Supported. */
DEBUG4(printk(KERN_WARNING
"scsi(%ld): Received unknown MBX "
"IOCB response pkt type=%x "
"source=%x entry status=%x.\n",
ha->host_no, pkt->entry_type,
pkt->sys_define,
pkt->entry_status));
}
break;
}
/* Fallthrough. */
default:
/* Type Not Supported. */
DEBUG4(printk(KERN_WARNING

View File

@ -71,12 +71,6 @@ MODULE_PARM_DESC(ql2xfdmienable,
"Enables FDMI registratons "
"Default is 0 - no FDMI. 1 - perfom FDMI.");
int ql2xprocessrscn;
module_param(ql2xprocessrscn, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(ql2xprocessrscn,
"Option to enable port RSCN handling via a series of less"
"fabric intrusive ADISCs and PLOGIs.");
/*
* SCSI host template entry points
*/
@ -1492,7 +1486,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
INIT_LIST_HEAD(&ha->list);
INIT_LIST_HEAD(&ha->fcports);
INIT_LIST_HEAD(&ha->rscn_fcports);
/*
* These locks are used to prevent more than one CPU
@ -1669,10 +1662,6 @@ EXPORT_SYMBOL_GPL(qla2x00_remove_one);
static void
qla2x00_free_device(scsi_qla_host_t *ha)
{
/* Abort any outstanding IO descriptors. */
if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
qla2x00_cancel_io_descriptors(ha);
/* Disable timer */
if (ha->timer_active)
qla2x00_stop_timer(ha);
@ -1909,21 +1898,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
}
memset(ha->init_cb, 0, ha->init_cb_size);
/* Get consistent memory allocated for Get Port Database cmd */
ha->iodesc_pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
&ha->iodesc_pd_dma);
if (ha->iodesc_pd == NULL) {
/* error */
qla_printk(KERN_WARNING, ha,
"Memory Allocation failed - iodesc_pd\n");
qla2x00_mem_free(ha);
msleep(100);
continue;
}
memset(ha->iodesc_pd, 0, PORT_DATABASE_SIZE);
/* Allocate ioctl related memory. */
if (qla2x00_alloc_ioctl_mem(ha)) {
qla_printk(KERN_WARNING, ha,
@ -2048,9 +2022,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
if (ha->ms_iocb)
dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);
if (ha->iodesc_pd)
dma_pool_free(ha->s_dma_pool, ha->iodesc_pd, ha->iodesc_pd_dma);
if (ha->init_cb)
dma_pool_free(ha->s_dma_pool, ha->init_cb, ha->init_cb_dma);
@ -2077,8 +2048,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
ha->ct_sns_dma = 0;
ha->ms_iocb = NULL;
ha->ms_iocb_dma = 0;
ha->iodesc_pd = NULL;
ha->iodesc_pd_dma = 0;
ha->init_cb = NULL;
ha->init_cb_dma = 0;

File diff suppressed because it is too large Load Diff