]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Recheck session state after RSCN.
authorQuinn Tran <quinn.tran@cavium.com>
Fri, 3 Nov 2017 14:22:15 +0000 (19:52 +0530)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Fri, 5 Jan 2018 21:05:16 +0000 (13:05 -0800)
Orabug: 27235104

when RSCN is delivered for specific remote port,
the switch say the remote port is still up and
current state of the remote port/session is good,
don't trust the state.  Instead use ADISC to very
the session is still valid or not.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Sawan Chandak <sawan.chandak@cavium.com>
[ Upstream commit a07fc0a42e9ae76e93235f59b089986dc1b751c8 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_init.c

index a4801b2189ec2dc12ba078dc75a178764b32fd32..6b7b1c344193990b1a8eb88af379fb8db836afc4 100644 (file)
@@ -106,6 +106,7 @@ int qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *,
     void *);
 int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *);
 
+int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
 /*
  * Global Data in qla_os.c source file.
  */
index 3bb4379c0572903a6bdfca418b3f7adabdceefbe..1957f4e0dadaf26a2ac06d1121ef298bcfc0f4e6 100644 (file)
@@ -2834,13 +2834,19 @@ void qla24xx_handle_gidpn_event(scsi_qla_host_t *vha, struct event_arg *ea)
                                case MODE_INITIATOR:
                                case MODE_DUAL:
                                default:
+                                       ql_dbg(ql_dbg_disc, vha, 0x201f,
+                                           "%s %d %8phC post %s\n", __func__,
+                                           __LINE__, fcport->port_name,
+                                           (atomic_read(&fcport->state) ==
+                                           FCS_ONLINE) ? "gpdb" : "gnl");
+
                                        if (atomic_read(&fcport->state) ==
                                            FCS_ONLINE)
-                                               break;
-                                       ql_dbg(ql_dbg_disc, vha, 0x201f,
-                                           "%s %d %8phC post gnl\n",
-                                           __func__, __LINE__, fcport->port_name);
-                                       qla24xx_post_gnl_work(vha, fcport);
+                                               qla24xx_post_gpdb_work(vha,
+                                                   fcport, PDO_FORCE_ADISC);
+                                       else
+                                               qla24xx_post_gnl_work(vha,
+                                                   fcport);
                                        break;
                                }
                        } else { /* fcport->d_id.b24 != ea->id.b24 */
index 19b7e349f75baed20cb6fb6c117ba0246d8d825c..8aa2ba41da36afe800a55a08727ba701f91d9fbc 100644 (file)
@@ -36,7 +36,6 @@ static int qla2x00_restart_isp(scsi_qla_host_t *);
 static struct qla_chip_state_84xx *qla84xx_get_chip(struct scsi_qla_host *);
 static int qla84xx_init_chip(scsi_qla_host_t *);
 static int qla25xx_init_queues(struct qla_hw_data *);
-static int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
 static void qla24xx_handle_plogi_done_event(struct scsi_qla_host *,
     struct event_arg *);
 
@@ -665,8 +664,7 @@ gpd_error_out:
        sp->free(sp);
 }
 
-static int qla24xx_post_gpdb_work(struct scsi_qla_host *vha, fc_port_t *fcport,
-    u8 opt)
+int qla24xx_post_gpdb_work(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
 {
        struct qla_work_evt *e;