linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Tejun Heo <tj@kernel.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 1/6] libata: Signal that our SATL supports WRITE SAME(16) with UNMAP
Date: Mon, 23 Aug 2010 14:29:04 -0400	[thread overview]
Message-ID: <4C72BDF0.7080000@interlog.com> (raw)
In-Reply-To: <4C72BC60.4090705@interlog.com>

On 10-08-23 02:22 PM, Douglas Gilbert wrote:
> On 10-08-23 04:32 AM, Tejun Heo wrote:
>> On 08/19/2010 05:48 PM, Martin K. Petersen wrote:
>>> Until now identifying that a device supports WRITE SAME(16) with the
>>> UNMAP bit set has been black magic. Implement support for the new (SBC3
>>> r24) Thin Provisioning VPD page and the TPWS bit.
>>>
>>> Signed-off-by: Martin K. Petersen<martin.petersen@oracle.com>
>>> ---
>>> drivers/ata/libata-scsi.c | 13 +++++++++++++
>>> 1 files changed, 13 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
>>> index a54273d..e280ae6 100644
>>> --- a/drivers/ata/libata-scsi.c
>>> +++ b/drivers/ata/libata-scsi.c
>>> @@ -2001,6 +2001,7 @@ static unsigned int ata_scsiop_inq_00(struct
>>> ata_scsi_args *args, u8 *rbuf)
>>> 0x89, /* page 0x89, ata info page */
>>> 0xb0, /* page 0xb0, block limits page */
>>> 0xb1, /* page 0xb1, block device characteristics page */
>>> + 0xb2, /* page 0xb2, thin provisioning page */
>>> };
>>>
>>> rbuf[3] = sizeof(pages); /* number of supported VPD pages */
>>> @@ -2172,6 +2173,15 @@ static unsigned int ata_scsiop_inq_b1(struct
>>> ata_scsi_args *args, u8 *rbuf)
>>> return 0;
>>> }
>>>
>>> +static unsigned int ata_scsiop_inq_b2(struct ata_scsi_args *args, u8
>>> *rbuf)
>>> +{
>>> + rbuf[1] = 0xb1;
>>> + rbuf[3] = 0x3c;
>>> + rbuf[5] = 1<< 6; /* TPWS */
>>
>> I would love a bit more documentation here.
>
> Yes, that style comes from my code in scsi_debug and
> some of my utilities. Recently I added some more
> documentation, just prior the the function:
>
> /* SCSI Thin Provisioning VPD page: SBC-3 rev 22 or later */
>
> I see no point in commenting the individual code lines.
> Just follow that reference ...
>
> And when I do then I see that rbuf[3] should be 4 (not 0x3c)
> unless the DP bit is set.

... and of course rbuf[1] should be 0xb2 . Martin ????
The rbuf[5] line is correct :-)

Doug Gilbert

  reply	other threads:[~2010-08-23 18:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 15:48 Discard/trim/thin provisioning update Martin K. Petersen
2010-08-19 15:48 ` [PATCH 1/6] libata: Signal that our SATL supports WRITE SAME(16) with UNMAP Martin K. Petersen
2010-08-19 16:15   ` James Bottomley
2010-08-19 16:20     ` Martin K. Petersen
2010-08-23  8:32   ` Tejun Heo
2010-08-23 18:22     ` Douglas Gilbert
2010-08-23 18:29       ` Douglas Gilbert [this message]
2010-08-23 19:11         ` Martin K. Petersen
2010-08-19 15:48 ` [PATCH 2/6] libata: Report supported TRIM payload size Martin K. Petersen
2010-08-19 17:27   ` Greg Freemyer
2010-08-19 18:05     ` Martin K. Petersen
2010-08-19 21:08       ` Greg Freemyer
2010-08-19 21:50       ` Mark Lord
2010-08-20  8:58         ` Christoph Hellwig
2010-08-20 13:53           ` Mark Lord
2010-08-20 17:13             ` Greg Freemyer
2010-08-20 18:28               ` Mark Lord
2010-08-23 13:50   ` Christoph Hellwig
2010-08-23 18:56     ` Martin K. Petersen
2010-08-19 15:48 ` [PATCH 3/6] block: Make max_discard_sectors sector_t Martin K. Petersen
2010-08-20  8:59   ` Christoph Hellwig
2010-08-19 15:48 ` [PATCH 4/6] scsi: Fix VPD page wrapper Martin K. Petersen
2010-08-19 15:49 ` [PATCH 5/6] scsi_debug: Update thin provisioning support Martin K. Petersen
2010-08-23 16:37   ` Douglas Gilbert
2010-08-19 15:49 ` [PATCH 6/6] sd: " Martin K. Petersen
2010-08-20  9:00   ` Christoph Hellwig
2010-08-23 19:06     ` Martin K. Petersen

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=4C72BDF0.7080000@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=hch@lst.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).