]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Add support for SCT Write Same
authorShaun Tancheff <shaun@tancheff.com>
Mon, 22 Aug 2016 04:23:19 +0000 (23:23 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 25 Aug 2016 15:26:48 +0000 (11:26 -0400)
commit37fc21154ec557252e72fd04e6b1f6c8deae9642
tree101fa3f176dc5f3829e000852913a514a7fa068c
parentdc63b29f644ecac07953566c1fd89a6035caca6c
libata: Add support for SCT Write Same

SATA drives may support write same via SCT. This is useful
for setting the drive contents to a specific pattern (0's).

Translate a SCSI WRITE SAME 16 command to be either a DSM TRIM
command or an SCT Write Same command.

Based on the UNMAP flag:
  - When set translate to DSM TRIM
  - When not set translate to SCT Write Same

Signed-off-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c
include/linux/ata.h