public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ed Lin <ed.lin@promise.com>,
	James Bottomley <James.Bottomley@SteelEye.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Jens Axboe <axboe@suse.de>,
	david.somayajulu@qlogic.com
Subject: Re: [PATCH] block: add support for shared tag maps
Date: Mon, 18 Sep 2006 14:25:08 -0500	[thread overview]
Message-ID: <1158607508.3800.4.camel@madmax> (raw)
In-Reply-To: <20060918184712.GA17670@infradead.org>

On Mon, 2006-09-18 at 19:47 +0100, Christoph Hellwig wrote:
> On Fri, Sep 01, 2006 at 02:31:51PM +0800, Ed Lin wrote:
> >  static int
> > +stex_slave_alloc(struct scsi_device *sdev)
> > +{
> > +	/* Cheat: usually extracted from Inquiry data */
> > +	sdev->tagged_supported = 1;
> > +
> > +	scsi_activate_tcq(sdev, sdev->host->can_queue);
> 
> these two calls look wrong here. scsi_activate_tcq is supposed to be
> called from slave_configure.  similarly tagged_supported is probably
> going to be overwriten as part of the scanning process, but you already
> set it in slave_configure anyway.

If a lld is doing host wide tagging will they always need a tag? For
those drivers it seems like they are not doing tagging based on this in
scsi_scan

        if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) &&
> >             !(*bflags & BLIST_NOTQ))
> >                 sdev->tagged_supported = 1;

Instead they need a tag because their FW or driver require it.

If so then should we just set this in scsi_alloc_sdev if shost->bqt is
set? For qla4xxx we are doing something like stex which is a little odd.
See patch below. It is untested and not even compile tested - just shows
what I mean and for Qlogic to test if it is ok with you guys.

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index fd9e281..2efd90c 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -206,6 +206,11 @@ static struct scsi_device *scsi_alloc_sd
 
 	scsi_sysfs_device_initialize(sdev);
 
+	if (shost->bqt) {
+		sdev->tagged_supported = 1;
+		scsi_activate_tcq(sdev, shost->can_queue);
+	}
+
 	if (shost->hostt->slave_alloc) {
 		ret = shost->hostt->slave_alloc(sdev);
 		if (ret) {



  parent reply	other threads:[~2006-09-18 19:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01  6:31 [PATCH] block: add support for shared tag maps Ed Lin
2006-09-01 13:28 ` James Bottomley
2006-09-01 19:04   ` Doug Maxey
2006-09-01 20:11     ` Mike Anderson
2006-09-01 20:21     ` Ravi Anand
2006-09-01 20:52       ` James Bottomley
2006-09-18 18:47 ` Christoph Hellwig
2006-09-18 19:10   ` James Bottomley
2006-09-18 19:25   ` Mike Christie [this message]
2006-09-19  2:20     ` Doug Ledford
  -- strict thread matches above, loose matches on Subject: below --
2006-08-31  8:55 Ed Lin
2006-08-31  9:00 ` Jens Axboe
2006-08-31 22:21 ` James Bottomley
2006-08-30 13:44 James Bottomley
2006-08-30 15:31 ` Randy.Dunlap
2006-08-30 15:39   ` James Bottomley

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=1158607508.3800.4.camel@madmax \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@SteelEye.com \
    --cc=axboe@suse.de \
    --cc=david.somayajulu@qlogic.com \
    --cc=ed.lin@promise.com \
    --cc=hch@infradead.org \
    --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