Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Anil Veerabhadrappa" <anilgv@broadcom.com>
To: "michaelc@cs.wisc.edu" <michaelc@cs.wisc.edu>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/7] bnx2i: use common iscsi suspend queue
Date: Wed, 11 Nov 2009 18:00:17 -0800	[thread overview]
Message-ID: <1257991217.810.77.camel@anilgv-desktop> (raw)
In-Reply-To: <1257978876-2742-2-git-send-email-michaelc@cs.wisc.edu>

On Wed, 2009-11-11 at 14:34 -0800, michaelc@cs.wisc.edu wrote:
> From: Mike Christie <michaelc@cs.wisc.edu>
> 
> This just has bnx2i use the iscsi_suspend_queue helper.
> 
> The suspend works as follows:
> 
> When ep_poll has succeeed iscsid will call conn_bind, the LLD will
> then call iscsi_conn_bind which will clear the suspend bit.
> When ep_disconnect is called (or if there is a conn error) we set
> the suspend bit. For the ep_disconnect case I  added a helper
> in the previous kernel that will take the session lock to make sure
> iscsi_queuecommand/xmit_task is not running and it will set
> the suspend bit.
> 
> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
> ---
>  drivers/scsi/bnx2i/bnx2i.h       |    1 -
>  drivers/scsi/bnx2i/bnx2i_iscsi.c |    8 +-------
>  2 files changed, 1 insertions(+), 8 deletions(-)
> 

Looks good.

Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com>


> diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
> index 5edde1a..2b973f3 100644
> --- a/drivers/scsi/bnx2i/bnx2i.h
> +++ b/drivers/scsi/bnx2i/bnx2i.h
> @@ -232,7 +232,6 @@ struct bnx2i_conn {
>  	struct iscsi_cls_conn *cls_conn;
>  	struct bnx2i_hba *hba;
>  	struct completion cmd_cleanup_cmpl;
> -	int is_bound;
>  
>  	u32 iscsi_conn_cid;
>  #define BNX2I_CID_RESERVED	0x5AFF
> diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
> index cafb888..89e84c3 100644
> --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
> @@ -1161,9 +1161,6 @@ static int bnx2i_task_xmit(struct iscsi_task *task)
>  	struct bnx2i_cmd *cmd = task->dd_data;
>  	struct iscsi_cmd *hdr = (struct iscsi_cmd *) task->hdr;
>  
> -	if (!bnx2i_conn->is_bound)
> -		return -ENOTCONN;
> -
>  	/*
>  	 * If there is no scsi_cmnd this must be a mgmt task
>  	 */
> @@ -1371,7 +1368,6 @@ static int bnx2i_conn_bind(struct iscsi_cls_session *cls_session,
>  	bnx2i_conn->ep = bnx2i_ep;
>  	bnx2i_conn->iscsi_conn_cid = bnx2i_ep->ep_iscsi_cid;
>  	bnx2i_conn->fw_cid = bnx2i_ep->ep_cid;
> -	bnx2i_conn->is_bound = 1;
>  
>  	ret_code = bnx2i_bind_conn_to_iscsi_cid(hba, bnx2i_conn,
>  						bnx2i_ep->ep_iscsi_cid);
> @@ -1896,9 +1892,7 @@ static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
>  		conn = bnx2i_conn->cls_conn->dd_data;
>  		session = conn->session;
>  
> -		spin_lock_bh(&session->lock);
> -		bnx2i_conn->is_bound = 0;
> -		spin_unlock_bh(&session->lock);
> +		iscsi_suspend_queue(conn);
>  	}
>  
>  	hba = bnx2i_ep->hba;



      parent reply	other threads:[~2009-11-12  2:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 22:34 iscsi fixes and features for 2.6.33 michaelc
2009-11-11 22:34 ` [PATCH 1/7] bnx2i: use common iscsi suspend queue michaelc
2009-11-11 22:34   ` [PATCH 2/7] libiscsi: fix login/text checks in pdu injection code michaelc
2009-11-11 22:34     ` [PATCH 3/7] libiscsi: Check TMF state before sending PDU michaelc
2009-11-11 22:34       ` [PATCH 4/7] libiscsi: add warm target reset tmf support michaelc
2009-11-11 22:34         ` [PATCH 5/7] iscsi class: modify handling of replacement timeout michaelc
2009-11-11 22:34           ` [PATCH 6/7] iser: set tgt and lu reset timeout michaelc
2009-11-11 22:34             ` [PATCH 7/7] libiscsi: hook into ramp up/down handling michaelc
2009-11-12  2:00   ` Anil Veerabhadrappa [this message]

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=1257991217.810.77.camel@anilgv-desktop \
    --to=anilgv@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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