From: Lalit Chandivade Date: Fri, 28 May 2010 22:08:24 +0000 (-0700) Subject: [SCSI] qla2xxx: Do not enable VP in non fabric topology. X-Git-Tag: firefly_0821_release~9833^2~1305^2~239 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3f3b6f98cb33043cba04f45a2f2c43b8303c120c;p=firefly-linux-kernel-4.4.55.git [SCSI] qla2xxx: Do not enable VP in non fabric topology. After topology change ISP is reset and VPs are re-enabled. If the topology is not fabric, VPs could falsely get enabled. Signed-off-by: Giridhar Malavali Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 8220e7b9799b..d1618b4a5e50 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -136,7 +136,8 @@ qla24xx_enable_vp(scsi_qla_host_t *vha) /* Check if physical ha port is Up */ if (atomic_read(&base_vha->loop_state) == LOOP_DOWN || - atomic_read(&base_vha->loop_state) == LOOP_DEAD) { + atomic_read(&base_vha->loop_state) == LOOP_DEAD || + !(ha->current_topology & ISP_CFG_F)) { vha->vp_err_state = VP_ERR_PORTDWN; fc_vport_set_state(vha->fc_vport, FC_VPORT_LINKDOWN); goto enable_failed;