diff mbox

[19/21] lpfc: Disable FDMI probing if not connected to a fabric

Message ID 577d5dac.IWJT5/2li7EwQBnO%james.smart@broadcom.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

James Smart July 6, 2016, 7:36 p.m. UTC
Disable FDMI probing if not connected to a fabric

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_ct.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Hannes Reinecke July 15, 2016, 1:23 p.m. UTC | #1
On 07/06/2016 09:36 PM, James Smart wrote:
> 
> Disable FDMI probing if not connected to a fabric
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
>  drivers/scsi/lpfc/lpfc_ct.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
> index a38816e..63e48d4 100644
> --- a/drivers/scsi/lpfc/lpfc_ct.c
> +++ b/drivers/scsi/lpfc/lpfc_ct.c
> @@ -1510,6 +1510,10 @@ lpfc_fdmi_num_disc_check(struct lpfc_vport *vport)
>  	if (!lpfc_is_link_up(phba))
>  		return;
>  
> +	/* Must be connected to a Fabric */
> +	if (!(vport->fc_flag & FC_FABRIC))
> +		return;
> +
>  	if (!(vport->fdmi_port_mask & LPFC_FDMI_PORT_ATTR_num_disc))
>  		return;
>  
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index a38816e..63e48d4 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1510,6 +1510,10 @@  lpfc_fdmi_num_disc_check(struct lpfc_vport *vport)
 	if (!lpfc_is_link_up(phba))
 		return;
 
+	/* Must be connected to a Fabric */
+	if (!(vport->fc_flag & FC_FABRIC))
+		return;
+
 	if (!(vport->fdmi_port_mask & LPFC_FDMI_PORT_ATTR_num_disc))
 		return;