Re: [PATCH 2/3] qla2xxx: do not check login_state if no loop id is assigned

2018-02-22 Thread Himanshu Madhani


On Thu, 22 Feb 2018, 12:49am, Hannes Reinecke wrote:

> When no loop id is assigned in qla24xx_fcport_handle_login()
> the login state needs to be ignored; it will get set later on
> in qla_chk_n2n_b4_login().
> 
> Cc: Quinn Tran 
> Cc: Himanshu Madhani 
> Fixes: 040036bb0bc1 ("scsi: qla2xxx: Delay loop id allocation at login")
> Signed-off-by: Hannes Reinecke 
> ---
>  drivers/scsi/qla2xxx/qla_init.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 4dd897c2c2b1..a19ed53ba6d9 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -1174,8 +1174,9 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host 
> *vha, fc_port_t *fcport)
>   if (fcport->scan_state != QLA_FCPORT_FOUND)
>   return 0;
>  
> - if ((fcport->fw_login_state == DSC_LS_PLOGI_PEND) ||
> - (fcport->fw_login_state == DSC_LS_PRLI_PEND))
> + if ((fcport->loop_id != FC_NO_LOOP_ID) &&
> + ((fcport->fw_login_state == DSC_LS_PLOGI_PEND) ||
> +  (fcport->fw_login_state == DSC_LS_PRLI_PEND)))
>   return 0;
>  
>   if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) {
> 

Good Catch. I had this patch in my queue for submission but you beat me to 
it. Looks good.

Acked-by: Himanshu Madhani 



[PATCH 2/3] qla2xxx: do not check login_state if no loop id is assigned

2018-02-22 Thread Hannes Reinecke
When no loop id is assigned in qla24xx_fcport_handle_login()
the login state needs to be ignored; it will get set later on
in qla_chk_n2n_b4_login().

Cc: Quinn Tran 
Cc: Himanshu Madhani 
Fixes: 040036bb0bc1 ("scsi: qla2xxx: Delay loop id allocation at login")
Signed-off-by: Hannes Reinecke 
---
 drivers/scsi/qla2xxx/qla_init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 4dd897c2c2b1..a19ed53ba6d9 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1174,8 +1174,9 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host 
*vha, fc_port_t *fcport)
if (fcport->scan_state != QLA_FCPORT_FOUND)
return 0;
 
-   if ((fcport->fw_login_state == DSC_LS_PLOGI_PEND) ||
-   (fcport->fw_login_state == DSC_LS_PRLI_PEND))
+   if ((fcport->loop_id != FC_NO_LOOP_ID) &&
+   ((fcport->fw_login_state == DSC_LS_PLOGI_PEND) ||
+(fcport->fw_login_state == DSC_LS_PRLI_PEND)))
return 0;
 
if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) {
-- 
2.12.3