Re: [PATCH 1/2] qla2xxx: Fix FC-AL connection target discovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2019-03-15 at 15:04 -0700, Himanshu Madhani wrote:
> From: Quinn Tran <qtran@xxxxxxxxxxx>
> 
> Commit 7f147f9bfd44 fixed N2N target discovery for local loop.
> However, same code is used for FC-AL discovery as well. Added check
> to make sure we are bypassing area and domain check only in N2N
> topology for target discovery.
> 
> Fixes: 7f147f9bfd44 ("scsi: qla2xxx: Fix N2N target discovery with Local loop")
> Cc: stable@xxxxxxxxxxxxxxx # 5.0+
> Signed-off-by: Quinn Tran <qtran@xxxxxxxxxxx>
> Signed-off-by: Himanshu Madhani <hmadhani@xxxxxxxxxxx>
> ---
>  drivers/scsi/qla2xxx/qla_init.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 5b395af1aa22..e64d3d2d3c78 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -4990,6 +4990,13 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha)
>  		if ((domain & 0xf0) == 0xf0)
>  			continue;
>  
> +		/* Bypass if not same domain and area of adapter. */
> +		if (area && domain && ((area != vha->d_id.b.area) ||
> +		    (domain != vha->d_id.b.domain)) &&
> +		    (ha->current_topology == ISP_CFG_NL))
> +			continue;
> +
> +
>  		/* Bypass invalid local loop ID. */
>  		if (loop_id > LAST_LOCAL_LOOP_ID)
>  			continue;

Would be better I think to test (ha->current_topology == ISP_CFG_NL) first
in the if statement but logically looks fine.

Reviewed-by: Ewan D. Milne <emilne@xxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux