Skip to content

Commit 4971cd2

Browse files
avasquez01James Bottomley
authored andcommitted
[SCSI] qla2xxx: Remove unused port-type RSCN handling code.
Expandind on the previous commit: commit 79f89a4 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>
1 parent 75bc419 commit 4971cd2

File tree

7 files changed

+1
-1581
lines changed

7 files changed

+1
-1581
lines changed

drivers/scsi/qla2xxx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTRA_CFLAGS += -DUNIQUE_FW_NAME
22

33
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
4-
qla_dbg.o qla_sup.o qla_rscn.o qla_attr.o
4+
qla_dbg.o qla_sup.o qla_attr.o
55

66
obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
77

drivers/scsi/qla2xxx/qla_def.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,8 +1523,6 @@ typedef struct fc_port {
15231523

15241524
unsigned int os_target_id;
15251525

1526-
uint16_t iodesc_idx_sent;
1527-
15281526
int port_login_retry_count;
15291527
int login_retry;
15301528
atomic_t port_down_timer;
@@ -1940,34 +1938,6 @@ struct sns_cmd_pkt {
19401938
} p;
19411939
};
19421940

1943-
/* IO descriptors */
1944-
#define MAX_IO_DESCRIPTORS 32
1945-
1946-
#define ABORT_IOCB_CB 0
1947-
#define ADISC_PORT_IOCB_CB 1
1948-
#define LOGOUT_PORT_IOCB_CB 2
1949-
#define LOGIN_PORT_IOCB_CB 3
1950-
#define LAST_IOCB_CB 4
1951-
1952-
#define IODESC_INVALID_INDEX 0xFFFF
1953-
#define IODESC_ADISC_NEEDED 0xFFFE
1954-
#define IODESC_LOGIN_NEEDED 0xFFFD
1955-
1956-
struct io_descriptor {
1957-
uint16_t used:1;
1958-
uint16_t idx:11;
1959-
uint16_t cb_idx:4;
1960-
1961-
struct timer_list timer;
1962-
1963-
struct scsi_qla_host *ha;
1964-
1965-
port_id_t d_id;
1966-
fc_port_t *remote_fcport;
1967-
1968-
uint32_t signature;
1969-
};
1970-
19711941
struct qla_fw_info {
19721942
unsigned short addressing; /* addressing method used to load fw */
19731943
#define FW_INFO_ADDR_NORMAL 0
@@ -2271,10 +2241,6 @@ typedef struct scsi_qla_host {
22712241

22722242
/* Fibre Channel Device List. */
22732243
struct list_head fcports;
2274-
struct list_head rscn_fcports;
2275-
2276-
struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS];
2277-
uint16_t iodesc_signature;
22782244

22792245
/* RSCN queue. */
22802246
uint32_t rscn_queue[MAX_RSCN_COUNT];
@@ -2313,9 +2279,6 @@ typedef struct scsi_qla_host {
23132279
init_cb_t *init_cb;
23142280
int init_cb_size;
23152281

2316-
dma_addr_t iodesc_pd_dma;
2317-
port_database_t *iodesc_pd;
2318-
23192282
/* These are used by mailbox operations. */
23202283
volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT];
23212284

drivers/scsi/qla2xxx/qla_gbl.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ extern int qlport_down_retry;
6464
extern int ql2xplogiabsentdevice;
6565
extern int ql2xloginretrycount;
6666
extern int ql2xfdmienable;
67-
extern int ql2xprocessrscn;
6867

6968
extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);
7069

@@ -283,15 +282,6 @@ extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
283282
extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
284283
extern int qla2x00_fdmi_register(scsi_qla_host_t *);
285284

286-
/*
287-
* Global Function Prototypes in qla_rscn.c source file.
288-
*/
289-
extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, gfp_t);
290-
extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *,
291-
int);
292-
extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *);
293-
extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *);
294-
295285
/*
296286
* Global Function Prototypes in qla_xioctl.c source file.
297287
*/

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
17081708
fcport->ha = ha;
17091709
fcport->port_type = FCT_UNKNOWN;
17101710
fcport->loop_id = FC_NO_LOOP_ID;
1711-
fcport->iodesc_idx_sent = IODESC_INVALID_INDEX;
17121711
atomic_set(&fcport->state, FCS_UNCONFIGURED);
17131712
fcport->flags = FCF_RLC_SUPPORT;
17141713
fcport->supported_classes = FC_COS_UNSPECIFIED;
@@ -2563,7 +2562,6 @@ static int
25632562
qla2x00_device_resync(scsi_qla_host_t *ha)
25642563
{
25652564
int rval;
2566-
int rval2;
25672565
uint32_t mask;
25682566
fc_port_t *fcport;
25692567
uint32_t rscn_entry;
@@ -2619,17 +2617,6 @@ qla2x00_device_resync(scsi_qla_host_t *ha)
26192617

26202618
switch (format) {
26212619
case 0:
2622-
if (ql2xprocessrscn &&
2623-
!IS_QLA2100(ha) && !IS_QLA2200(ha) &&
2624-
!IS_QLA6312(ha) && !IS_QLA6322(ha) &&
2625-
!IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
2626-
ha->flags.init_done) {
2627-
/* Handle port RSCN via asyncronous IOCBs */
2628-
rval2 = qla2x00_handle_port_rscn(ha, rscn_entry,
2629-
NULL, 0);
2630-
if (rval2 == QLA_SUCCESS)
2631-
continue;
2632-
}
26332620
mask = 0xffffff;
26342621
break;
26352622
case 1:
@@ -2647,10 +2634,6 @@ qla2x00_device_resync(scsi_qla_host_t *ha)
26472634

26482635
rval = QLA_SUCCESS;
26492636

2650-
/* Abort any outstanding IO descriptors. */
2651-
if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
2652-
qla2x00_cancel_io_descriptors(ha);
2653-
26542637
list_for_each_entry(fcport, &ha->fcports, list) {
26552638
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 ||
26562639
(fcport->d_id.b24 & mask) != d_id.b24 ||

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -514,47 +514,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
514514
break;
515515

516516
case MBA_PORT_UPDATE: /* Port database update */
517-
/*
518-
* If a single remote port just logged into (or logged out of)
519-
* us, create a new entry in our rscn fcports list and handle
520-
* the event like an RSCN.
521-
*/
522-
if (ql2xprocessrscn &&
523-
!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) &&
524-
!IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA54XX(ha) &&
525-
ha->flags.init_done && mb[1] != 0xffff &&
526-
((ha->operating_mode == P2P && mb[1] != 0) ||
527-
(ha->operating_mode != P2P && mb[1] !=
528-
SNS_FIRST_LOOP_ID)) && (mb[2] == 6 || mb[2] == 7)) {
529-
int rval;
530-
fc_port_t *rscn_fcport;
531-
532-
/* Create new fcport for login. */
533-
rscn_fcport = qla2x00_alloc_rscn_fcport(ha, GFP_ATOMIC);
534-
if (rscn_fcport) {
535-
DEBUG14(printk("scsi(%ld): Port Update -- "
536-
"creating RSCN fcport %p for %x/%x/%x.\n",
537-
ha->host_no, rscn_fcport, mb[1], mb[2],
538-
mb[3]));
539-
540-
rscn_fcport->loop_id = mb[1];
541-
rscn_fcport->d_id.b24 = INVALID_PORT_ID;
542-
atomic_set(&rscn_fcport->state,
543-
FCS_DEVICE_LOST);
544-
list_add_tail(&rscn_fcport->list,
545-
&ha->rscn_fcports);
546-
547-
rval = qla2x00_handle_port_rscn(ha, 0,
548-
rscn_fcport, 1);
549-
if (rval == QLA_SUCCESS)
550-
break;
551-
} else {
552-
DEBUG14(printk("scsi(%ld): Port Update -- "
553-
"-- unable to allocate RSCN fcport "
554-
"login.\n", ha->host_no));
555-
}
556-
}
557-
558517
/*
559518
* If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET
560519
* event etc. earlier indicating loop is down) then process
@@ -753,25 +712,6 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
753712
case MS_IOCB_TYPE:
754713
qla2x00_ms_entry(ha, (ms_iocb_entry_t *)pkt);
755714
break;
756-
case MBX_IOCB_TYPE:
757-
if (!IS_QLA2100(ha) && !IS_QLA2200(ha) &&
758-
!IS_QLA6312(ha) && !IS_QLA6322(ha)) {
759-
if (pkt->sys_define == SOURCE_ASYNC_IOCB) {
760-
qla2x00_process_iodesc(ha,
761-
(struct mbx_entry *)pkt);
762-
} else {
763-
/* MBX IOCB Type Not Supported. */
764-
DEBUG4(printk(KERN_WARNING
765-
"scsi(%ld): Received unknown MBX "
766-
"IOCB response pkt type=%x "
767-
"source=%x entry status=%x.\n",
768-
ha->host_no, pkt->entry_type,
769-
pkt->sys_define,
770-
pkt->entry_status));
771-
}
772-
break;
773-
}
774-
/* Fallthrough. */
775715
default:
776716
/* Type Not Supported. */
777717
DEBUG4(printk(KERN_WARNING

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ MODULE_PARM_DESC(ql2xfdmienable,
7171
"Enables FDMI registratons "
7272
"Default is 0 - no FDMI. 1 - perfom FDMI.");
7373

74-
int ql2xprocessrscn;
75-
module_param(ql2xprocessrscn, int, S_IRUGO|S_IRUSR);
76-
MODULE_PARM_DESC(ql2xprocessrscn,
77-
"Option to enable port RSCN handling via a series of less"
78-
"fabric intrusive ADISCs and PLOGIs.");
79-
8074
/*
8175
* SCSI host template entry points
8276
*/
@@ -1492,7 +1486,6 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
14921486

14931487
INIT_LIST_HEAD(&ha->list);
14941488
INIT_LIST_HEAD(&ha->fcports);
1495-
INIT_LIST_HEAD(&ha->rscn_fcports);
14961489

14971490
/*
14981491
* These locks are used to prevent more than one CPU
@@ -1669,10 +1662,6 @@ EXPORT_SYMBOL_GPL(qla2x00_remove_one);
16691662
static void
16701663
qla2x00_free_device(scsi_qla_host_t *ha)
16711664
{
1672-
/* Abort any outstanding IO descriptors. */
1673-
if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
1674-
qla2x00_cancel_io_descriptors(ha);
1675-
16761665
/* Disable timer */
16771666
if (ha->timer_active)
16781667
qla2x00_stop_timer(ha);
@@ -1909,21 +1898,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
19091898
}
19101899
memset(ha->init_cb, 0, ha->init_cb_size);
19111900

1912-
/* Get consistent memory allocated for Get Port Database cmd */
1913-
ha->iodesc_pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
1914-
&ha->iodesc_pd_dma);
1915-
if (ha->iodesc_pd == NULL) {
1916-
/* error */
1917-
qla_printk(KERN_WARNING, ha,
1918-
"Memory Allocation failed - iodesc_pd\n");
1919-
1920-
qla2x00_mem_free(ha);
1921-
msleep(100);
1922-
1923-
continue;
1924-
}
1925-
memset(ha->iodesc_pd, 0, PORT_DATABASE_SIZE);
1926-
19271901
/* Allocate ioctl related memory. */
19281902
if (qla2x00_alloc_ioctl_mem(ha)) {
19291903
qla_printk(KERN_WARNING, ha,
@@ -2048,9 +2022,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
20482022
if (ha->ms_iocb)
20492023
dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);
20502024

2051-
if (ha->iodesc_pd)
2052-
dma_pool_free(ha->s_dma_pool, ha->iodesc_pd, ha->iodesc_pd_dma);
2053-
20542025
if (ha->init_cb)
20552026
dma_pool_free(ha->s_dma_pool, ha->init_cb, ha->init_cb_dma);
20562027

@@ -2077,8 +2048,6 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
20772048
ha->ct_sns_dma = 0;
20782049
ha->ms_iocb = NULL;
20792050
ha->ms_iocb_dma = 0;
2080-
ha->iodesc_pd = NULL;
2081-
ha->iodesc_pd_dma = 0;
20822051
ha->init_cb = NULL;
20832052
ha->init_cb_dma = 0;
20842053

0 commit comments

Comments
 (0)