public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: John Soni Jose <sony.john-n@emulex.com>, linux-scsi@vger.kernel.org
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Subject: Re: [PATCH 6/7] be2iscsi: Logout of FW Boot Session
Date: Thu, 16 Apr 2015 15:09:22 -0500	[thread overview]
Message-ID: <553016F2.9040204@cs.wisc.edu> (raw)
In-Reply-To: <553012E6.7050707@cs.wisc.edu>

On 04/16/2015 02:52 PM, Mike Christie wrote:
> On 04/17/2015 04:34 AM, John Soni Jose wrote:
>>  Once be2iscsi driver is loaded and operational close Boot
>>  session established by FW.
>>
>> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
>> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>> ---
>>  drivers/scsi/be2iscsi/be_cmds.h  |   12 ++++++
>>  drivers/scsi/be2iscsi/be_iscsi.c |   12 ++++++
>>  drivers/scsi/be2iscsi/be_main.c  |    1 +
>>  drivers/scsi/be2iscsi/be_main.h  |    2 +
>>  drivers/scsi/be2iscsi/be_mgmt.c  |   70 ++++++++++++++++++++++++++++++++++++++
>>  drivers/scsi/be2iscsi/be_mgmt.h  |    3 ++
>>  6 files changed, 100 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
>> index d0097a2..0586815 100644
>> --- a/drivers/scsi/be2iscsi/be_cmds.h
>> +++ b/drivers/scsi/be2iscsi/be_cmds.h
>> @@ -304,6 +304,17 @@ struct mgmt_auth_method_format {
>>  	struct	mgmt_chap_format chap;
>>  } __packed;
>>  
>> +struct be_cmd_req_logout_fw_sess {
>> +	struct be_cmd_req_hdr hdr;	/* dw[4] */
>> +	uint32_t session_handle;
>> +} __packed;
>> +
>> +struct be_cmd_resp_logout_fw_sess {
>> +	struct be_cmd_resp_hdr hdr;	/* dw[4] */
>> +#define BEISCSI_MGMT_SESSION_CLOSE 0x20
>> +	uint32_t session_status;
>> +} __packed;
>> +
>>  struct mgmt_conn_login_options {
>>  	u8 flags;
>>  	u8 header_digest;
>> @@ -1136,6 +1147,7 @@ struct be_cmd_get_all_if_id_req {
>>  #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME	6
>>  #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME	7
>>  #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION  14
>> +#define OPCODE_ISCSI_INI_SESSION_LOGOUT_TARGET	 24
>>  #define OPCODE_ISCSI_INI_DRIVER_REOPEN_ALL_SESSIONS 36
>>  #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41
>>  #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
>> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
>> index 508f017..566d27c 100644
>> --- a/drivers/scsi/be2iscsi/be_iscsi.c
>> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
>> @@ -998,6 +998,18 @@ int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn)
>>  	beiscsi_set_params_for_offld(beiscsi_conn, &params);
>>  	beiscsi_offload_connection(beiscsi_conn, &params);
>>  	iscsi_conn_start(cls_conn);
>> +
>> +	/* Logout from the FW boot session */
>> +	if (phba->fw_boot_state) {
>> +		int rc;
>> +
>> +		rc = beiscsi_logout_fw_sess(phba,
>> +			phba->boot_sess.session_handle);
>> +
>> +		if (!rc)
>> +			phba->fw_boot_state = 0
>> +	}
>> +
>>  	return 0;
>>  }
> 
> How do you know the boot session being logged out is the one we are
> replacing and logging into at this time? If userspace logged into
> sessions out of order and you logged into a non root one first, then
> would this kill the session that we might need to access still?

Ignore that, I forgot we get the boot info a pci probe time or from the
health check. But the, why not just have beiscsi_setup_boot_info log out
the session once its done getting the boot info?

It just seems odd to have that logout in the middle of the connection
startup.

  reply	other threads:[~2015-04-16 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  9:34 [PATCH 6/7] be2iscsi: Logout of FW Boot Session John Soni Jose
2015-04-16 19:52 ` Mike Christie
2015-04-16 20:09   ` Mike Christie [this message]
2015-04-17 10:44     ` Sony John-N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553016F2.9040204@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=jayamohan.kallickal@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sony.john-n@emulex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox