From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Smart <James.Smart@Emulex.Com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] FC Pass Thru support
Date: Wed, 15 Apr 2009 14:59:56 +0200 [thread overview]
Message-ID: <20090415125956.GA12670@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <1238088799.19995.3.camel@ogier>
On Thu, Mar 26, 2009 at 01:33:19PM -0400, James Smart wrote:
>
> All,
>
> Attached is the ELS/CT pass-thru patch for the FC Transport. The patch
> creates a generic framework that lays on top of bsg and the SGIO v4 ioctl
> in order to pass transaction requests to LLDD's.
>
> The interface supports the following operations:
> On an fc_host basis:
> Request login to the specified N_Port_ID, creating an fc_rport.
> Request logout of the specified N_Port_ID, deleting an fc_rport
> Send ELS request to specified N_Port_ID w/o requiring a login, and
> wait for ELS response.
> Send CT request to specified N_Port_ID and wait for CT response.
> Login is required, but LLDD is allowed to manage login and decide
> whether it stays in place after the request is satisfied.
> Vendor-Unique request. Allows a LLDD-specific request to be passed
> to the LLDD, and the passing of a response back to the application.
> On an fc_rport basis:
> Send ELS request to nport and wait for ELS response.
> Send CT request to nport and wait for CT response.
>
> The patch also exports several headers from include/scsi such that
> they can be available to user-space applications:
> include/scsi/scsi.h
> include/scsi/scsi_netlink.h
> include/scsi/scsi_netlink_fc.h
> include/scsi/scsi_bsg_fc.h
>
> For further information, refer to the last RFC:
> http://marc.info/?l=linux-scsi&m=123436574018579&w=2
This patch triggers the warning WARN_ON(!irqs_disabled()) in
blk_remove_plug, and the description of __blk_run_queue states:
/**
* __blk_run_queue - run a single device queue
* @q: The queue to run
*
* Description:
* See @blk_run_queue. This variant must be called with the queue
* lock held and interrupts disabled.
*
*/
I assume to get this right, fc_bsg_goose_queue should disable
interrupts when taking the queue lock. See patch below.
Christof
---
drivers/scsi/scsi_transport_fc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/scsi/scsi_transport_fc.c 2009-04-14 14:29:25.000000000 +0200
+++ b/drivers/scsi/scsi_transport_fc.c 2009-04-14 14:31:41.000000000 +0200
@@ -3707,13 +3707,14 @@ static void
fc_bsg_goose_queue(struct fc_rport *rport)
{
int flagset;
+ unsigned long flags;
if (!rport->rqst_q)
return;
get_device(&rport->dev);
- spin_lock(rport->rqst_q->queue_lock);
+ spin_lock_irqsave(rport->rqst_q->queue_lock, flags);
flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) &&
!test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
if (flagset)
@@ -3721,7 +3722,7 @@ fc_bsg_goose_queue(struct fc_rport *rpor
__blk_run_queue(rport->rqst_q);
if (flagset)
queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
- spin_unlock(rport->rqst_q->queue_lock);
+ spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
put_device(&rport->dev);
}
next prev parent reply other threads:[~2009-04-15 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 17:33 [PATCH] FC Pass Thru support James Smart
2009-03-27 14:00 ` Seokmann Ju
2009-04-15 12:59 ` Christof Schmitt [this message]
2009-04-16 14:15 ` James Smart
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=20090415125956.GA12670@schmichrtp.de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=James.Smart@Emulex.Com \
--cc=linux-scsi@vger.kernel.org \
/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