From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"hch@infradead.org" <hch@infradead.org>,
"webbnh@hp.com" <webbnh@hp.com>
Subject: Re: [PATCH] megaraid_sas: Enable shared tag map
Date: Thu, 02 Oct 2014 14:14:19 +0200 [thread overview]
Message-ID: <542D419B.5080406@suse.de> (raw)
In-Reply-To: <1412251542.6343.6.camel@jarvis>
On 10/02/2014 02:05 PM, James Bottomley wrote:
> On Thu, 2014-10-02 at 08:51 +0200, Hannes Reinecke wrote:
>> On 10/01/2014 11:10 PM, Christoph Hellwig wrote:
>>> On Wed, Oct 01, 2014 at 02:51:31PM -0400, Webb Scales wrote:
>>>> Hannes,
>>>>
>>>> In megasas_change_queue_type(), is it possible for sdev->queue_depth to be
>>>> greater than 256?
>>>>
>>>> Unless I'm misunderstanding the SCSI code, we can request a
>>>> queue-depth/tag-map-size which is greater than 256, but, since the
>>>> scsi_cmnd::tag field is an unsigned char, depths greater than 256 may
>>>> overflow the field when high-numbered tags are used...do I have that right?
>>>
>>> Yes, we really need to increase the size of the tag field. SAM allows
>>> a transport specific limit of up to 64 _bytes_ for it, although I don't
>>> know implementation that large. Given that the block layer can generate
>>> up to 32-bit tags both for the old blk-tag.c code and the new
>>> blk-mq-tag.c version it would be good to use a u32 there. Can you send
>>> me a patch?
>>>
>> Weeelll ...
>>
>> I'm afraid it's not _that_ easy.
>> SCSI-II tagged queueing has some specific tag values:
>>
>> #define SIMPLE_QUEUE_TAG 0x20
>> #define HEAD_OF_QUEUE_TAG 0x21
>> #define ORDERED_QUEUE_TAG 0x22
>>
>> drivers/scsi/vmw_pvscsi.c:
>> e->tag = SIMPLE_QUEUE_TAG;
>> if (sdev->tagged_supported &&
>> (cmd->tag == HEAD_OF_QUEUE_TAG ||
>> cmd->tag == ORDERED_QUEUE_TAG))
>> e->tag = cmd->tag;
>
> A SCSI-2 tag is a SPI two byte message. The first byte is the message
> type. The values you have above identify the message type for simple,
> ordered and head of queue tags. The *second* byte is the tag value.
>
> See page 55 and 56 of the SCSI-2 standard. There's no connection (or
> shouldn't be) between the message type and the tag value, so it looks
> like a bug in the pvscsi driver.
>
It is. I've already sent a patch.
But that just proves the scmd->tag is essentially a duplicate
and we should be removing it.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-10-02 12:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 11:47 [PATCH] megaraid_sas: Enable shared tag map Hannes Reinecke
2014-09-29 16:52 ` Webb Scales
2014-09-29 17:08 ` James Bottomley
2014-09-30 7:43 ` Christoph Hellwig
2014-09-30 9:08 ` Hannes Reinecke
2014-10-01 18:51 ` Webb Scales
2014-10-01 21:10 ` Christoph Hellwig
2014-10-02 6:51 ` Hannes Reinecke
2014-10-02 9:19 ` Christoph Hellwig
2014-10-02 9:50 ` Hannes Reinecke
2014-10-02 11:36 ` Christoph Hellwig
2014-10-02 12:00 ` Hannes Reinecke
2014-10-02 14:32 ` Christoph Hellwig
2014-10-02 12:05 ` James Bottomley
2014-10-02 12:14 ` Hannes Reinecke [this message]
2014-10-02 13:06 ` 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=542D419B.5080406@suse.de \
--to=hare@suse.de \
--cc=hch@infradead.org \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=webbnh@hp.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