From: Mike Christie <michaelc@cs.wisc.edu>
To: jayamohank@gmail.com
Cc: james.bottomley@hansenpartnership.com,
linux-scsi@vger.kernel.org,
"Jayamohan.Kallickal" <jayamohan.kallickal@emulex.com>,
John Soni Jose <sony.john-n@emulex.com>
Subject: Re: [PATCH 05/15] be2iscsi: Fix freeing CXN specific driver resources.
Date: Sat, 23 Mar 2013 00:56:23 -0500 [thread overview]
Message-ID: <514D4407.8010203@cs.wisc.edu> (raw)
In-Reply-To: <1363063186-4902-5-git-send-email-jayamohan.kallickal@emulex.com>
On 03/11/2013 11:39 PM, jayamohank@gmail.com wrote:
> From: "Jayamohan.Kallickal" <jayamohan.kallickal@emulex.com>
>
> Free CXN specific resource held by driver when login redirection
> or connection retry happens. Login redirection was failing
> because WRB/SGL were not allocated from the CID on which
> doorbell was rung.
>
> Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
> Signed-off-by: Jayamohan.Kallickal <jayamohan.kallickal@emulex.com>
> ---
> drivers/scsi/be2iscsi/be_iscsi.c | 15 +++++++++
> drivers/scsi/be2iscsi/be_main.c | 68 ++++++++++++++++++++++++++------------
> drivers/scsi/be2iscsi/be_main.h | 1 +
> 3 files changed, 62 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index 1097fa2..a4eb610 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -990,9 +990,24 @@ static void beiscsi_put_cid(struct beiscsi_hba *phba, unsigned short cid)
> static void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep)
> {
> struct beiscsi_hba *phba = beiscsi_ep->phba;
> + struct beiscsi_conn *beiscsi_conn;
>
> beiscsi_put_cid(phba, beiscsi_ep->ep_cid);
> beiscsi_ep->phba = NULL;
> +
> + /**
> + * Check if any connection resource allocated by driver
> + * is to be freed.This case occurs when target redirection
> + * or connection retry is done.
> + **/
> + if (!beiscsi_ep->conn)
> + return;
> +
> + beiscsi_conn = beiscsi_ep->conn;
> + if (beiscsi_conn->login_in_progress) {
> + beiscsi_free_mgmt_task_handles(beiscsi_conn);
> + beiscsi_conn->login_in_progress = 0;
> + }
> }
>
> /**
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 72e4052..22882cb 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -4066,6 +4066,49 @@ static void beiscsi_clean_port(struct beiscsi_hba *phba)
> }
>
> /**
> + * beiscsi_free_mgmt_task_handles()- Free driver CXN resources
> + * @beiscsi_conn: ptr to the conn to be cleaned up
> + *
> + * Free driver mgmt resources binded to CXN.
> + **/
> +void
> +beiscsi_free_mgmt_task_handles(struct beiscsi_conn *beiscsi_conn)
> +{
> + struct beiscsi_io_task *io_task;
> + struct beiscsi_hba *phba = beiscsi_conn->phba;
> + struct hwi_wrb_context *pwrb_context;
> + struct hwi_controller *phwi_ctrlr;
> +
> + phwi_ctrlr = phba->phwi_ctrlr;
> + pwrb_context = &phwi_ctrlr->wrb_context
> + [beiscsi_conn->beiscsi_conn_cid
> + - phba->fw_config.iscsi_cid_start];
> + io_task = beiscsi_conn->task->dd_data;
> +
> + if (io_task->pwrb_handle) {
> + memset(io_task->pwrb_handle->pwrb, 0,
> + sizeof(struct iscsi_wrb));
> + free_wrb_handle(phba, pwrb_context,
> + io_task->pwrb_handle);
> + io_task->pwrb_handle = NULL;
> + }
> +
> + if (io_task->psgl_handle) {
> + spin_lock(&phba->mgmt_sgl_lock);
I think you need to do the bh locking here. In the beiscsi_free_ep path
the bhs will not be disabled.
next prev parent reply other threads:[~2013-03-23 5:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 4:39 [PATCH 01/15] be2iscsi: Fix lack of uninitialize pattern to FW jayamohank
2013-03-12 4:39 ` [PATCH 02/15] be2iscsi: Fix returning Failure when MBX fails with Insufficient buffer error jayamohank
2013-03-12 4:39 ` [PATCH 03/15] be2iscsi: Fix MBX Command issues jayamohank
2013-03-12 4:39 ` [PATCH 04/15] be2iscsi: Fix MSIx support in SKH-R to 32 jayamohank
2013-03-12 4:39 ` [PATCH 05/15] be2iscsi: Fix freeing CXN specific driver resources jayamohank
2013-03-23 5:56 ` Mike Christie [this message]
2013-03-12 4:39 ` [PATCH 06/15] be2iscsi: Fix MACRO for checking the adapter type jayamohank
2013-03-12 4:39 ` [PATCH 07/15] be2iscsi: Fix support for DEFQ extension jayamohank
2013-03-12 4:39 ` [PATCH 08/15] be2iscsi: Fix displaying the FW Version from driver jayamohank
2013-03-13 10:29 ` Steffen Maier
2013-03-23 6:00 ` Mike Christie
2013-03-27 20:19 ` Kallickal, Jayamohan
2013-03-12 4:39 ` [PATCH 09/15] be2iscsi: Fix displaying the Active Session Count " jayamohank
2013-03-12 4:39 ` [PATCH 10/15] be2iscsi: Fix the Port Link Status issue jayamohank
2013-03-12 4:39 ` [PATCH 11/15] be2iscsi: Fix the NOP-In handling code path jayamohank
2013-03-12 4:39 ` [PATCH 12/15] be2iscsi: Fix dynamic CID allocation Mechanism in driver jayamohank
2013-03-12 4:39 ` [PATCH 13/15] be2iscsi: Fix checking Adapter state while establishing CXN jayamohank
2013-03-12 4:39 ` [PATCH 14/15] be2iscsi: Fix the copyright information jayamohank
2013-03-12 4:39 ` [PATCH 15/15] be2iscsi: Bump the driver version jayamohank
2013-03-12 4:39 ` be2iscsi: set of patches for be2iscsi jayamohank
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=514D4407.8010203@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=james.bottomley@hansenpartnership.com \
--cc=jayamohan.kallickal@emulex.com \
--cc=jayamohank@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.