From: James Bottomley <James.Bottomley@SteelEye.com>
To: Ed Lin <ed.lin@promise.com>
Cc: Jens Axboe <axboe@suse.de>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>,
promise_linux <promise_linux@promise.com>, jeff <jeff@garzik.org>
Subject: Re: [PATCH 3/3] stex: use block layer tagging
Date: Wed, 30 Aug 2006 09:39:17 -0400 [thread overview]
Message-ID: <1156945158.3735.11.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <NONAMEBfxRydC3hSsxL00000e3e@nonameb.ptu.promise.com>
On Wed, 2006-08-30 at 17:30 +0800, Ed Lin wrote:
> +stex_slave_alloc(struct scsi_device *sdev)
> +{
> + struct st_hba *hba = (struct st_hba *) sdev->host->hostdata;
> + unsigned long flags;
> +
> + /*
> + * this should be done in slave_configure routine. but we need
> + * tagging ever since the first command. we can't wait...
> + */
> + spin_lock_irqsave(hba->host->host_lock, flags);
> + if (hba->devnum++ == 0) {
> + if (blk_queue_init_tags(sdev->request_queue,
> + hba->host->can_queue, NULL) == 0) {
> + hba->ref = 1;
> + hba->shared_queue = sdev->request_queue;
> + }
> + } else if (hba->ref) {
> + blk_queue_init_tags(sdev->request_queue,
> + hba->host->can_queue,
> hba->shared_queue->queue_tags);
> + hba->ref++;
> + }
> +
> + if (hba->ref) {
> + sdev->tagged_supported = 1;
> + scsi_set_tag_type(sdev, MSG_SIMPLE_TAG);
> + scsi_adjust_queue_depth(sdev,
> + scsi_get_tag_type(sdev),
> hba->host->can_queue);
> + } else
> + sdev->tagged_supported = 0;
> + spin_unlock_irqrestore(hba->host->host_lock, flags);
OK, this is indicating an inherent problem in using the shared tag maps.
I talked a bit with Jens and we think there's a way to eliminate most of
this and collapse it down to a simple SCSI helper. I'll post the two
patches separately, but basically when its done your slave alloc should
become a simple scsi_activate_tcq().
James
next prev parent reply other threads:[~2006-08-30 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 9:30 Ed Lin
2006-08-30 13:39 ` James Bottomley [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-28 14:23 [patch " Ed Lin
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=1156945158.3735.11.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=ed.lin@promise.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=promise_linux@promise.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®