public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: vikas.chaudhary@qlogic.com
Cc: jbottomley@parallels.com, linux-scsi@vger.kernel.org,
	lalit.chandivade@qlogic.com, ravi.anand@qlogic.com,
	Manish Rangankar <manish.rangankar@qlogic.com>
Subject: Re: [PATCH 09/13] qla4xxx: Fixed device blocked issue on link up-down.
Date: Mon, 03 Oct 2011 16:16:15 -0500	[thread overview]
Message-ID: <4E8A261F.9080803@cs.wisc.edu> (raw)
In-Reply-To: <4E8A22AA.70500@cs.wisc.edu>

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

On 10/03/2011 04:01 PM, Mike Christie wrote:
> On 10/03/2011 12:29 PM, vikas.chaudhary@qlogic.com wrote:
>> From: Manish Rangankar <manish.rangankar@qlogic.com>
>>
>> Devices are getting blocked during continuous link up and down. Solution is,
>> during relogin unblock the session before sending connection logged in event.
>>
>> JIRA Key: UPSISCSI-138
>>
>> Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
>> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
>> ---
>>  drivers/scsi/qla4xxx/ql4_init.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
>> index cc10bac..e07d99b 100644
>> --- a/drivers/scsi/qla4xxx/ql4_init.c
>> +++ b/drivers/scsi/qla4xxx/ql4_init.c
>> @@ -900,6 +900,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
>>  		switch (state) {
>>  		case DDB_DS_SESSION_ACTIVE:
>>  		case DDB_DS_DISCOVERY:
>> +			iscsi_unblock_session(ddb_entry->sess);
> 
> Shouldn't this alreadu get done when start_conn callback is called?
> 
> Is the problem that start_conn is getting called when login is started
> and not when we are actually logged in (when we get the logged in event
> below)?
> 
> The start_conn callback use looks wrong right now for qla4xxx.
> user/initiator.c:setup_offload_login_phase() will call it when we are
> only in_login. It should only be called when we are logged_in, because
> it will unlbock the devices, update the iscsi session state and could
> start IO before the driver is ready.
> 

One clarification. Qla4xxx needs to do its setup in there but it should
not call iscsi_conn_start until it is actually logged in.

I think we want to do like the attached (patch not even compile tested).
It is built over this patch and 10/13.


[-- Attachment #2: qla4xxx-start-conn.patch --]
[-- Type: text/plain, Size: 1695 bytes --]

diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index e07d99b..3075fba 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -900,7 +900,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
 		switch (state) {
 		case DDB_DS_SESSION_ACTIVE:
 		case DDB_DS_DISCOVERY:
-			iscsi_unblock_session(ddb_entry->sess);
+			iscsi_conn_start(ddb_entry->conn);
 			iscsi_conn_login_event(ddb_entry->conn,
 					       ISCSI_CONN_STATE_LOGGED_IN);
 			qla4xxx_update_session_conn_param(ha, ddb_entry);
@@ -936,6 +936,7 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
 		switch (state) {
 		case DDB_DS_SESSION_ACTIVE:
 		case DDB_DS_DISCOVERY:
+			iscsi_conn_start(ddb_entry->conn);
 			iscsi_conn_login_event(ddb_entry->conn,
 					       ISCSI_CONN_STATE_LOGGED_IN);
 			qla4xxx_update_session_conn_param(ha, ddb_entry);
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index f84ddd2..676aedc 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1136,7 +1136,7 @@ static int qla4xxx_conn_start(struct iscsi_cls_conn *cls_conn)
 		if (mbx_sts)
 			if (ddb_entry->fw_ddb_device_state ==
 						DDB_DS_SESSION_ACTIVE) {
-				iscsi_unblock_session(ddb_entry->sess);
+				iscsi_conn_start(ddb_entry->conn);
 				iscsi_conn_login_event(ddb_entry->conn,
 						ISCSI_CONN_STATE_LOGGED_IN);
 				goto exit_set_param;
@@ -1162,7 +1162,6 @@ static int qla4xxx_conn_start(struct iscsi_cls_conn *cls_conn)
 		      ddb_entry->fw_ddb_device_state));
 
 exit_set_param:
-	iscsi_conn_start(cls_conn);
 	ret = 0;
 
 exit_conn_start:

  reply	other threads:[~2011-10-03 21:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 17:29 [PATCH 00/13] qla4xxx: Patches for scsi-misc vikas.chaudhary
2011-10-03 17:29 ` [PATCH 01/13] qla4xxx: Add new FLT firmware region vikas.chaudhary
2011-10-03 17:29 ` [PATCH 02/13] qla4xxx: Update license vikas.chaudhary
2011-10-03 17:29 ` [PATCH 03/13] qla4xxx: Fix bidirectional CHAP vikas.chaudhary
2011-10-03 17:29 ` [PATCH 04/13] qla4xxx: Do not add duplicate CHAP entry in FLASH vikas.chaudhary
2011-10-03 20:40   ` Mike Christie
2011-10-03 20:41     ` Mike Christie
2011-10-04 17:13       ` Vikas Chaudhary
2011-10-03 17:29 ` [PATCH 05/13] qla4xxx: Fix exporting boot targets to sysfs vikas.chaudhary
2011-10-03 20:46   ` Mike Christie
2011-10-03 20:44     ` James Bottomley
2011-10-03 17:29 ` [PATCH 06/13] qla4xxx: Free Device Database (DDB) reserved by FW vikas.chaudhary
2011-10-03 17:29 ` [PATCH 07/13] qla4xxx: Clear DDB map index on the basis of AEN vikas.chaudhary
2011-10-03 17:29 ` [PATCH 08/13] qla4xxx: Fixed session destroy issue on link up-down vikas.chaudhary
2011-10-03 17:29 ` [PATCH 09/13] qla4xxx: Fixed device blocked " vikas.chaudhary
2011-10-03 21:01   ` Mike Christie
2011-10-03 21:16     ` Mike Christie [this message]
2011-10-04 17:07       ` Vikas Chaudhary
2011-10-03 17:29 ` [PATCH 10/13] qla4xxx: Fixed active session re-open issue vikas.chaudhary
2011-10-03 17:29 ` [PATCH 11/13] qla4xxx: Fixed target discovery failed issue vikas.chaudhary
2011-10-03 17:29 ` [PATCH 12/13] qla4xxx: updated device id check for BFS vikas.chaudhary
2011-10-03 17:29 ` [PATCH 13/13] qla4xxx: Update driver version to 5.02.00-k8 vikas.chaudhary

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=4E8A261F.9080803@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=jbottomley@parallels.com \
    --cc=lalit.chandivade@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manish.rangankar@qlogic.com \
    --cc=ravi.anand@qlogic.com \
    --cc=vikas.chaudhary@qlogic.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