public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* re: qla2xxx: Delete session if initiator is gone from FW
@ 2015-12-22 19:46 Dan Carpenter
  2015-12-24  8:11 ` Alexei Potashnik
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-12-22 19:46 UTC (permalink / raw)
  To: alexei; +Cc: linux-scsi

Hello Alexei Potashnik,

The patch b93bb8ecc389: "qla2xxx: Delete session if initiator is gone
from FW" from Dec 17, 2015, leads to the following static checker
warning:

	drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion()
	warn: impossible condition '(logged_out == 41) => (0-1 == 41)'

drivers/scsi/qla2xxx/qla_target.c
  3580                  case CTIO_PORT_LOGGED_OUT:
  3581                  case CTIO_PORT_UNAVAILABLE:
  3582                  {
  3583                          bool logged_out = (status & 0xFFFF);
  3584                          ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059,
  3585                              "qla_target(%d): CTIO with %s status %x "
  3586                              "received (state %x, se_cmd %p)\n", vha->vp_idx,
  3587                              (logged_out == CTIO_PORT_LOGGED_OUT) ?
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Bool cannot equal 0x26.

  3588                              "PORT LOGGED OUT" : "PORT UNAVAILABLE",
  3589                              status, cmd->state, se_cmd);
  3590  
  3591                          if (logged_out && cmd->sess) {
                                    ^^^^^^^^^^
	== CTIO_PORT_LOGGED_OUT here?

  3592                                  /*
  3593                                   * Session is already logged out, but we need
  3594                                   * to notify initiator, who's not aware of this
  3595                                   */
  3596                                  cmd->sess->logout_on_delete = 0;
  3597                                  cmd->sess->send_els_logo = 1;
  3598                                  qlt_schedule_sess_for_deletion(cmd->sess, true);
  3599                          }
  3600                          break;
  3601                  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: qla2xxx: Delete session if initiator is gone from FW
  2015-12-22 19:46 qla2xxx: Delete session if initiator is gone from FW Dan Carpenter
@ 2015-12-24  8:11 ` Alexei Potashnik
  2016-01-04 20:31   ` Himanshu Madhani
  0 siblings, 1 reply; 3+ messages in thread
From: Alexei Potashnik @ 2015-12-24  8:11 UTC (permalink / raw)
  To: Dan Carpenter, Quinn Tran, Himanshu Madhani; +Cc: linux-scsi

I my original patch line 3583 was:

+			bool logged_out = (status & 0xFFFF) ==
CTIO_PORT_LOGGED_OUT;

and line 3587 was:

+			    logged_out ? "PORT LOGGED OUT" : "PORT
UNAVAILABLE",

Forwarding  to Quinn and Himanshu who must have massaged it.

Alexei

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Tuesday, December 22, 2015 11:46 AM
> To: alexei@purestorage.com
> Cc: linux-scsi@vger.kernel.org
> Subject: re: qla2xxx: Delete session if initiator is gone from FW
>
> Hello Alexei Potashnik,
>
> The patch b93bb8ecc389: "qla2xxx: Delete session if initiator is gone
from
> FW" from Dec 17, 2015, leads to the following static checker
> warning:
>
> 	drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion()
> 	warn: impossible condition '(logged_out == 41) => (0-1 == 41)'
>
> drivers/scsi/qla2xxx/qla_target.c
>   3580                  case CTIO_PORT_LOGGED_OUT:
>   3581                  case CTIO_PORT_UNAVAILABLE:
>   3582                  {
>   3583                          bool logged_out = (status & 0xFFFF);
>   3584                          ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059,
>   3585                              "qla_target(%d): CTIO with %s status
%x "
>   3586                              "received (state %x, se_cmd %p)\n",
vha->vp_idx,
>   3587                              (logged_out == CTIO_PORT_LOGGED_OUT)
?
>                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Bool cannot equal 0x26.
>
>   3588                              "PORT LOGGED OUT" : "PORT
UNAVAILABLE",
>   3589                              status, cmd->state, se_cmd);
>   3590
>   3591                          if (logged_out && cmd->sess) {
>                                     ^^^^^^^^^^
> 	== CTIO_PORT_LOGGED_OUT here?
>
>   3592                                  /*
>   3593                                   * Session is already logged
out, but we need
>   3594                                   * to notify initiator, who's
not aware of this
>   3595                                   */
>   3596                                  cmd->sess->logout_on_delete = 0;
>   3597                                  cmd->sess->send_els_logo = 1;
>   3598
qlt_schedule_sess_for_deletion(cmd->sess, true);
>   3599                          }
>   3600                          break;
>   3601                  }
>
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qla2xxx: Delete session if initiator is gone from FW
  2015-12-24  8:11 ` Alexei Potashnik
@ 2016-01-04 20:31   ` Himanshu Madhani
  0 siblings, 0 replies; 3+ messages in thread
From: Himanshu Madhani @ 2016-01-04 20:31 UTC (permalink / raw)
  To: Alexei Potashnik, Dan Carpenter, Quinn Tran; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 2712 bytes --]

Hi Alexie/Dan, 

I will send follow up patch to fix this.

Thanks,
-Himanshu





On 12/24/15, 12:11 AM, "Alexei Potashnik" <alexei@purestorage.com> wrote:

>I my original patch line 3583 was:
>
>+			bool logged_out = (status & 0xFFFF) ==
>CTIO_PORT_LOGGED_OUT;
>
>and line 3587 was:
>
>+			    logged_out ? "PORT LOGGED OUT" : "PORT
>UNAVAILABLE",
>
>Forwarding  to Quinn and Himanshu who must have massaged it.
>
>Alexei
>
>> -----Original Message-----
>> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
>> Sent: Tuesday, December 22, 2015 11:46 AM
>> To: alexei@purestorage.com
>> Cc: linux-scsi@vger.kernel.org
>> Subject: re: qla2xxx: Delete session if initiator is gone from FW
>>
>> Hello Alexei Potashnik,
>>
>> The patch b93bb8ecc389: "qla2xxx: Delete session if initiator is gone
>from
>> FW" from Dec 17, 2015, leads to the following static checker
>> warning:
>>
>> 	drivers/scsi/qla2xxx/qla_target.c:3587 qlt_do_ctio_completion()
>> 	warn: impossible condition '(logged_out == 41) => (0-1 == 41)'
>>
>> drivers/scsi/qla2xxx/qla_target.c
>>   3580                  case CTIO_PORT_LOGGED_OUT:
>>   3581                  case CTIO_PORT_UNAVAILABLE:
>>   3582                  {
>>   3583                          bool logged_out = (status & 0xFFFF);
>>   3584                          ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059,
>>   3585                              "qla_target(%d): CTIO with %s status
>%x "
>>   3586                              "received (state %x, se_cmd %p)\n",
>vha->vp_idx,
>>   3587                              (logged_out == CTIO_PORT_LOGGED_OUT)
>?
>>                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> Bool cannot equal 0x26.
>>
>>   3588                              "PORT LOGGED OUT" : "PORT
>UNAVAILABLE",
>>   3589                              status, cmd->state, se_cmd);
>>   3590
>>   3591                          if (logged_out && cmd->sess) {
>>                                     ^^^^^^^^^^
>> 	== CTIO_PORT_LOGGED_OUT here?
>>
>>   3592                                  /*
>>   3593                                   * Session is already logged
>out, but we need
>>   3594                                   * to notify initiator, who's
>not aware of this
>>   3595                                   */
>>   3596                                  cmd->sess->logout_on_delete = 0;
>>   3597                                  cmd->sess->send_els_logo = 1;
>>   3598
>qlt_schedule_sess_for_deletion(cmd->sess, true);
>>   3599                          }
>>   3600                          break;
>>   3601                  }
>>
>> regards,
>> dan carpenter


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 5117 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-04 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-22 19:46 qla2xxx: Delete session if initiator is gone from FW Dan Carpenter
2015-12-24  8:11 ` Alexei Potashnik
2016-01-04 20:31   ` Himanshu Madhani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox