Commit a07fc0a4 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Recheck session state after RSCN

When RSCN is delivered for specific remote port. Use ADISC to verify the
session is still valid or not.
Signed-off-by: default avatarQuinn Tran <quinn.tran@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d213a4b7
...@@ -106,7 +106,7 @@ int qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *, ...@@ -106,7 +106,7 @@ int qla24xx_post_newsess_work(struct scsi_qla_host *, port_id_t *, u8 *,
void *); void *);
int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *); int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *);
int qla24xx_detect_sfp(scsi_qla_host_t *vha); int qla24xx_detect_sfp(scsi_qla_host_t *vha);
int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
/* /*
* Global Data in qla_os.c source file. * Global Data in qla_os.c source file.
*/ */
......
...@@ -2816,13 +2816,19 @@ void qla24xx_handle_gidpn_event(scsi_qla_host_t *vha, struct event_arg *ea) ...@@ -2816,13 +2816,19 @@ void qla24xx_handle_gidpn_event(scsi_qla_host_t *vha, struct event_arg *ea)
case MODE_INITIATOR: case MODE_INITIATOR:
case MODE_DUAL: case MODE_DUAL:
default: 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) == if (atomic_read(&fcport->state) ==
FCS_ONLINE) FCS_ONLINE)
break; qla24xx_post_gpdb_work(vha,
ql_dbg(ql_dbg_disc, vha, 0x201f, fcport, PDO_FORCE_ADISC);
"%s %d %8phC post gnl\n", else
__func__, __LINE__, fcport->port_name); qla24xx_post_gnl_work(vha,
qla24xx_post_gnl_work(vha, fcport); fcport);
break; break;
} }
} else { /* fcport->d_id.b24 != ea->id.b24 */ } else { /* fcport->d_id.b24 != ea->id.b24 */
......
...@@ -36,7 +36,6 @@ static int qla2x00_restart_isp(scsi_qla_host_t *); ...@@ -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 struct qla_chip_state_84xx *qla84xx_get_chip(struct scsi_qla_host *);
static int qla84xx_init_chip(scsi_qla_host_t *); static int qla84xx_init_chip(scsi_qla_host_t *);
static int qla25xx_init_queues(struct qla_hw_data *); static int qla25xx_init_queues(struct qla_hw_data *);
static int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
static int qla24xx_post_prli_work(struct scsi_qla_host*, fc_port_t *); static int qla24xx_post_prli_work(struct scsi_qla_host*, fc_port_t *);
static void qla24xx_handle_plogi_done_event(struct scsi_qla_host *, static void qla24xx_handle_plogi_done_event(struct scsi_qla_host *,
struct event_arg *); struct event_arg *);
...@@ -774,8 +773,7 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -774,8 +773,7 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport)
return rval; return rval;
} }
static int qla24xx_post_gpdb_work(struct scsi_qla_host *vha, fc_port_t *fcport, int qla24xx_post_gpdb_work(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
u8 opt)
{ {
struct qla_work_evt *e; struct qla_work_evt *e;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment