From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hannes Reinecke <hare@suse.de>, Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org,
Shaun Tancheff <shaun.tancheff@seagate.com>,
Damien Le Moal <damien.lemoal@hgst.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCHv3 13/14] libata: support device-managed ZAC devices
Date: Mon, 25 Apr 2016 15:17:16 +0300 [thread overview]
Message-ID: <c14d4d8f-4d8f-9c8e-a00c-5cb5010bb66f@cogentembedded.com> (raw)
In-Reply-To: <1461581156-92581-14-git-send-email-hare@suse.de>
Hello.
On 4/25/2016 1:45 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.
>
> Reviewed-by: Shaun Tancheff <shaun.tancheff@seagate.com>
> Tested-by: Shaun Tancheff <shaun.tancheff@seagate.com>
> 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 43403aa..96abd42 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
[...]
> @@ -2322,12 +2320,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...
[...]
> diff --git a/include/linux/ata.h b/include/linux/ata.h
> index e627032..ac1cb93 100644
> --- a/include/linux/ata.h
> +++ b/include/linux/ata.h
> @@ -935,6 +935,11 @@ static inline bool ata_id_is_ssd(const u16 *id)
> return id[ATA_ID_ROT_SPEED] == 0x01;
> }
>
> +static inline u8 ata_id_zoned_cap(const u16 *id)
> +{
> + return (id[ATA_ID_ADDITIONAL_SUPP] & 0x3);
And here as well...
[...]
MBR, Sergei
next prev parent reply other threads:[~2016-04-25 12:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 10:45 [PATCHv3 00/14] libata: ZAC support Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 01/14] libata: do not attempt to retrieve sense code twice Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 02/14] libsas: enable FPDMA SEND/RECEIVE Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 03/14] libata/libsas: Define ATA_CMD_NCQ_NON_DATA Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 04/14] libata: Separate out ata_dev_config_ncq_send_recv() Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 05/14] libata: Add command definitions for NCQ Encapsulation for READ LOG DMA EXT Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 06/14] libata: Check log page directory before accessing pages Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 07/14] libata-trace: decode subcommands Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 08/14] libata-scsi: Generate sense code for disabled devices Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 09/14] libata: fixup ZAC device disabling Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 10/14] libata: implement ZBC IN translation Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 11/14] libata: Implement ZBC OUT translation Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 12/14] libata: NCQ encapsulation for ZAC MANAGEMENT OUT Hannes Reinecke
2016-04-25 10:45 ` [PATCHv3 13/14] libata: support device-managed ZAC devices Hannes Reinecke
2016-04-25 12:17 ` Sergei Shtylyov [this message]
2016-04-25 10:45 ` [PATCHv3 14/14] libata: support host-aware and host-managed " Hannes Reinecke
2016-04-25 20:16 ` [PATCHv3 00/14] libata: ZAC support Tejun Heo
2016-05-06 11:05 ` Hannes Reinecke
2016-05-09 16:38 ` Tejun Heo
2016-04-26 0:42 ` Damien Le Moal
2016-04-26 5:47 ` Hannes Reinecke
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=c14d4d8f-4d8f-9c8e-a00c-5cb5010bb66f@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=damien.lemoal@hgst.com \
--cc=hare@suse.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 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).