All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hannes Reinecke <hare@suse.de>, Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	Shaun Tancheff <shaun.tancheff@seagate.com>,
	Damien Le Moal <damien.lemoal@hgst.com>,
	linux-scsi@vger.kernel.org,
	Sathya Prakash <sathya.prakash@broadcom.com>
Subject: Re: [PATCH 3/4] libata: support device-managed ZAC devices
Date: Mon, 4 Apr 2016 14:13:33 +0300	[thread overview]
Message-ID: <57024C5D.8070402@cogentembedded.com> (raw)
In-Reply-To: <1459763271-125856-4-git-send-email-hare@suse.de>

Hello.

On 4/4/2016 12:47 PM, Hannes Reinecke wrote:

> Device-managed ZAC devices just set the zoned capabilities field
> in INQUIRY byte 69 (cf ACS-4). This corresponds to the 'zoned'
> field in the block device characteristics VPD page.
> As this is only defined in SPC-5/SBC-4 we also need to update
> the supported SCSI version descriptor.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>   drivers/ata/libata-scsi.c | 19 ++++++++++---------
>   include/linux/ata.h       |  5 +++++
>   2 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index 6db2aaf..ff95ef6 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
[...]
> @@ -2316,12 +2314,15 @@ static unsigned int ata_scsiop_inq_b1(struct ata_scsi_args *args, u8 *rbuf)
>   {
>   	int form_factor = ata_id_form_factor(args->id);
>   	int media_rotation_rate = ata_id_rotation_rate(args->id);
> +	u8 zoned = ata_id_zoned_cap(args->id);
>
>   	rbuf[1] = 0xb1;
>   	rbuf[3] = 0x3c;
>   	rbuf[4] = media_rotation_rate >> 8;
>   	rbuf[5] = media_rotation_rate;
>   	rbuf[7] = form_factor;
> +	if (zoned)
> +		rbuf[8] = (zoned << 4);

    Parens not needed here.

[...]

MBR, Sergei


  reply	other threads:[~2016-04-04 11:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  9:47 [PATCH 0/4] libata: ZAC support Hannes Reinecke
2016-04-04  9:47 ` [PATCH 1/4] libata: implement ZBC IN translation Hannes Reinecke
2016-04-04 15:49   ` Tejun Heo
2016-04-06  7:51     ` Hannes Reinecke
2016-04-04 16:26   ` Shaun Tancheff
2016-04-04  9:47 ` [PATCH 2/4] libata: Implement ZBC OUT translation Hannes Reinecke
2016-04-04 13:08   ` Shaun Tancheff
2016-04-04 13:18     ` Hannes Reinecke
2016-04-04  9:47 ` [PATCH 3/4] libata: support device-managed ZAC devices Hannes Reinecke
2016-04-04 11:13   ` Sergei Shtylyov [this message]
2016-04-04 14:15     ` Hannes Reinecke
2016-04-04  9:47 ` [PATCH 4/4] libata: support host-aware and host-managed " Hannes Reinecke
2016-04-04 15:50 ` [PATCH 0/4] libata: ZAC support Tejun Heo

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=57024C5D.8070402@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=damien.lemoal@hgst.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=shaun.tancheff@seagate.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.