public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
* ZBC_IN command translation
@ 2017-06-07  9:03 Damien Le Moal
  2017-06-07  9:07 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Damien Le Moal @ 2017-06-07  9:03 UTC (permalink / raw)
  To: linux-ide, Hannes Reinecke, Tejun Heo

Tejun, Hannes,

Currently, in libata-scsi.c, the function ata_scsi_zbc_in_xlat
translating ZBC REPORT ZONES into the ZAC version returns an error if
the scsi command buffer length is not aligned on 512. This is possible
since the ZBC version allows report zones buffer as a multiple of 64B,
while the ZAC version of the same command requires 512B size alignment
of the command buffer.

However, SAT-4, in section 9.13.3 says:

"The SATL shall send the ATA REPORT ZONES EXT command with the ATA
RETURN PAGE COUNT field set to INT((ALLOCATION LENGTH + 511)/512)."

So clearly, instead of returning an error, we need to bounce the scsi
command buffer to a bigger 512B size aligned temporary buffer for the
ZAC report zones. I do not see any code ready to use to do so easily,
but I may be missing it. Is there something that can be used to do so or
do I need to cook something ?

Best regards.

-- 
Damien Le Moal,
Western Digital

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-08  8:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-07  9:03 ZBC_IN command translation Damien Le Moal
2017-06-07  9:07 ` Christoph Hellwig
2017-06-07  9:11   ` Damien Le Moal
2017-06-07 13:24     ` Christoph Hellwig
2017-06-08  0:18       ` Damien Le Moal
2017-06-08  6:55         ` Christoph Hellwig
2017-06-08  8:27           ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox