From: Chenguangli chenguangli2@huawei.com
driver inclusion category: bugfix bugzilla: NA
-----------------------------------------------------------------------
This patch is used to solve the issue that the NPIV cannot be deleted.
Signed-off-by: Chenguangli chenguangli2@huawei.com Reviewed-by: Zengweiliang zengweiliang.zengweiliang@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/scsi/huawei/hifc/unf_common.h | 2 +- drivers/scsi/huawei/hifc/unf_npiv.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/huawei/hifc/unf_common.h b/drivers/scsi/huawei/hifc/unf_common.h index 7f5161676ebb..c338ef1c7e4e 100644 --- a/drivers/scsi/huawei/hifc/unf_common.h +++ b/drivers/scsi/huawei/hifc/unf_common.h @@ -13,7 +13,7 @@ /* B version, B0XX Corresponding x.x */ #define UNF_B_VERSION "5.0" /* Indicates the minor version number of the driver */ -#define UNF_DRIVER_VERSION "8" +#define UNF_DRIVER_VERSION "9" /* version num */ #define UNF_FC_VERSION UNF_MAJOR_VERSION "." UNF_B_VERSION "." UNF_DRIVER_VERSION extern unsigned int unf_dbg_level; diff --git a/drivers/scsi/huawei/hifc/unf_npiv.c b/drivers/scsi/huawei/hifc/unf_npiv.c index 1c3e3e99272e..be7772cb5b74 100644 --- a/drivers/scsi/huawei/hifc/unf_npiv.c +++ b/drivers/scsi/huawei/hifc/unf_npiv.c @@ -357,10 +357,16 @@ void unf_check_vport_pool_status(struct unf_lport_s *v_lport) void unf_vport_fabric_logo(struct unf_lport_s *v_vport) { struct unf_rport_s *rport = NULL; + unsigned long flag = 0;
rport = unf_get_rport_by_nport_id(v_vport, UNF_FC_FID_FLOGI); + UNF_CHECK_VALID(0x1970, UNF_TRUE, rport, return); - (void)unf_send_logo(v_vport, rport); + spin_lock_irqsave(&rport->rport_state_lock, flag); + unf_rport_state_ma(rport, UNF_EVENT_RPORT_LOGO); + spin_unlock_irqrestore(&rport->rport_state_lock, flag); + + unf_rport_enter_logo(v_vport, rport); }
void unf_vport_deinit(void *v_vport)