From 34c8d73fc61274802aedf719a09d75e7ce864289 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 5 Jun 2019 20:54:47 +0000 Subject: [PATCH] qla2x00t-32gbit: Simplify the event handling code This patch reworks commit 0ed0d3539595 ("qla2x00t-32gbit: Fix PRLI and PLOGI handling" / r8351). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8417 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index 30d2da5f5..9eaa3d2a4 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -465,7 +465,7 @@ void qla24xx_handle_adisc_event(scsi_qla_host_t *vha, struct event_arg *ea) fcport->fw_login_state, ea->rc, fcport->login_gen, ea->sp->gen2, fcport->rscn_gen, ea->sp->gen1, fcport->loop_id); - if (ea->rc != (MBS_COMMAND_COMPLETE & MBS_MASK)) { + if (ea->rc != QLA_SUCCESS) { ql_dbg(ql_dbg_disc, vha, 0x2066, "%s %s: adisc fail: post delete\n", __func__, wwn_to_str(ea->fcport->port_name)); @@ -1965,8 +1965,8 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea) return; } - switch (ea->rc | MBS_COMMAND_COMPLETE) { - case MBS_COMMAND_COMPLETE: + switch (ea->rc) { + case QLA_SUCCESS: /* * Driver must validate login state - If PRLI not complete, * force a relogin attempt via implicit LOGO, PLOGI, and PRLI @@ -2005,7 +2005,7 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea) else qla2x00_mark_device_lost(vha, ea->fcport, 1, 0); break; - case MBS_LOOP_ID_USED: + case QLA_LOOP_ID_USED: /* data[1] = IO PARAM 1 = nport ID */ cid.b.domain = (ea->iop[1] >> 16) & 0xff; cid.b.area = (ea->iop[1] >> 8) & 0xff; @@ -2021,7 +2021,7 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea) ea->fcport->loop_id = FC_NO_LOOP_ID; qla24xx_post_gnl_work(vha, ea->fcport); break; - case MBS_PORT_ID_USED: + case QLA_PORT_ID_USED: lid = ea->iop[1] & 0xffff; qlt_find_sess_invalidate_other(vha, wwn_to_u64(ea->fcport->port_name),