From: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
To: Mike Christie <michaelc@cs.wisc.edu>, linux-scsi@vger.kernel.org
Subject: RE: [PATCH v3 04/17] be2iscsi: Fix to synchronize tag allocation using spin_lock
Date: Wed, 13 Jan 2016 08:38:02 +0530 [thread overview]
Message-ID: <07f50d49647a69bfaa4ba2454dd099dc@mail.gmail.com> (raw)
In-Reply-To: <5694195F.6060501@cs.wisc.edu>
Thanks Mike.
It is not needed, will send the updated diff.
-----Original Message-----
From: Mike Christie [mailto:michaelc@cs.wisc.edu]
Sent: Tuesday, January 12, 2016 2:37 AM
To: Jitendra Bhivare; linux-scsi@vger.kernel.org
Subject: Re: [PATCH v3 04/17] be2iscsi: Fix to synchronize tag allocation
using spin_lock
On 12/23/2015 02:34 AM, Jitendra Bhivare wrote:
> alloc_mcc_tag/free_mcc_tag is now done under mcc_lock spin_lock
>
> Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
> ---
> drivers/scsi/be2iscsi/be_cmds.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_cmds.c
> b/drivers/scsi/be2iscsi/be_cmds.c index 1913e9e..502c9b6 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.c
> +++ b/drivers/scsi/be2iscsi/be_cmds.c
> @@ -121,6 +121,7 @@ unsigned int alloc_mcc_tag(struct beiscsi_hba
> *phba) {
> unsigned int tag = 0;
>
> + spin_lock_bh(&phba->ctrl.mcc_lock);
> if (phba->ctrl.mcc_tag_available) {
> tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index];
> phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0; @@
-134,6
> +135,7 @@ unsigned int alloc_mcc_tag(struct beiscsi_hba *phba)
> else
> phba->ctrl.mcc_alloc_index++;
> }
> + spin_unlock_bh(&phba->ctrl.mcc_lock);
> return tag;
> }
>
> @@ -254,7 +256,7 @@ int beiscsi_mccq_compl(struct beiscsi_hba *phba,
>
> void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag) {
> - spin_lock(&ctrl->mbox_lock);
> + spin_lock_bh(&ctrl->mcc_lock);
> tag = tag & 0x000000FF;
> ctrl->mcc_tag[ctrl->mcc_free_index] = tag;
> if (ctrl->mcc_free_index == (MAX_MCC_CMD - 1)) @@ -262,7 +264,7 @@
> void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag)
> else
> ctrl->mcc_free_index++;
> ctrl->mcc_tag_available++;
> - spin_unlock(&ctrl->mbox_lock);
> + spin_unlock_bh(&ctrl->mcc_lock);
> }
>
What was the _bh change for?
next prev parent reply other threads:[~2016-01-13 3:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 8:34 [PATCH v3 00/17] be2iscsi: driver update 11.0.0.0 Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 01/17] be2iscsi: Fix soft lockup in mgmt_get_all_if_id path using bmbx Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 02/17] be2iscsi: Fix mbox synchronization replacing spinlock with mutex Jitendra Bhivare
2016-01-08 7:02 ` Seymour, Shane M
2015-12-23 8:34 ` [PATCH v3 03/17] be2iscsi: Fix to use atomic bit operations for tag_state Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 04/17] be2iscsi: Fix to synchronize tag allocation using spin_lock Jitendra Bhivare
2016-01-11 21:06 ` Mike Christie
2016-01-13 3:08 ` Jitendra Bhivare [this message]
2015-12-23 8:34 ` [PATCH v3 05/17] be2iscsi: Set mbox timeout to 30s Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 06/17] be2iscsi: Added return value check for mgmt_get_all_if_id Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 07/17] be2iscsi: Fix to remove shutdown entry point Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 08/17] be2iscsi: Fix VLAN support for IPv6 network Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 09/17] be2iscsi: Fix to handle misconfigured optics events Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 10/17] be2iscsi: Add FW config validation Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 11/17] be2iscsi: Fix return value for MCC completion Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 12/17] be2iscsi: Fix IOPOLL implementation Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 13/17] scsi_transport_iscsi: Add 25G and 40G speed definition Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 14/17] be2iscsi: Fix to process 25G link speed info from FW Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 15/17] be2iscsi: Fix async link event processing Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 16/17] be2iscsi: Fix WRB leak in login/logout path Jitendra Bhivare
2015-12-23 8:34 ` [PATCH v3 17/17] be2iscsi: Update the driver version Jitendra Bhivare
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=07f50d49647a69bfaa4ba2454dd099dc@mail.gmail.com \
--to=jitendra.bhivare@avagotech.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 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.