libata: SCT Write Same / DSM Trim
authorShaun Tancheff <shaun@tancheff.com>
Wed, 24 Aug 2016 18:08:14 +0000 (13:08 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 25 Aug 2016 15:26:48 +0000 (11:26 -0400)
commitef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff
tree0f627a1746582b8443f3377718c58d426ef3871c
parent7b20309428598df00ffeb0b01f5948dea6aaf1f7
libata: SCT Write Same / DSM Trim

Correct handling of devices with sector_size other that 512 bytes.

In the case of a 4Kn device sector_size it is possible to describe a much
larger DSM Trim than the current fixed default of 512 bytes.

This patch assumes the minimum descriptor is sector_size and fills out
the descriptor accordingly.

The ACS-2 specification is quite clear that the DSM command payload is
sized as number of 512 byte transfers so a 4Kn device will operate
correctly without this patch.

Signed-off-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Acked-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c
This page took 0.02483 seconds and 5 git commands to generate.