]> git.openpandora.org Git - pandora-kernel.git/commitdiff
[SCSI] qla2xxx: Remove unused port-type RSCN handling code.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Wed, 17 May 2006 22:09:27 +0000 (15:09 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 20 May 2006 14:43:44 +0000 (09:43 -0500)
Expandind on the previous commit:

commit 79f89a4296ff22f09baf538d4ff2a6d0c3097a73
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>
drivers/scsi/qla2xxx/Makefile
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_rscn.c [deleted file]

index c8f670ee60b40ee42c2a3bc4d9d5244401511351..6ff7bb0d8e200e364a0d6e0dc501977a42f799d3 100644 (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
 
index 4bd67e9c28409d944199520c66dd602f67594efb..4c67494e9f751879ee1b6b54b4c9e27a179be01d 100644 (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];
 
index 26d1181b33893fc217eeedfce1e6f4758a7b9094..0292229987167b7e820c89c7e064b46114bbb068 100644 (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.
  */
index 7e18b9c126542d66250e31a2b6492ab8d018eb1b..7b48c655b766fd2bb0f0f408b44916acbe82c586 100644 (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 ||
index 39b5082eb3bc22d62e0dafbbeeb57b5d8501c738..b28ac0a27e251532e3494470b81d605bbda52ec4 100644 (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
Simple merge
diff --cc drivers/scsi/qla2xxx/qla_rscn.c
Simple merge