summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2011-05-18 06:13:23 +0400
committerJeff Garzik <jgarzik@pobox.com>2011-05-20 04:46:01 +0400
commit5f4e206666f834340b69ddb43f86de3851c8675a (patch)
treef3e2d1a4430cbd9353b2959e3f00b4a1906ad467 /drivers/ata
parentf68b3afe45051d43e9f9277c6f1404670e1b99d2 (diff)
downloadlinux-5f4e206666f834340b69ddb43f86de3851c8675a.tar.xz
libata: Use Maximum Write Same Length to report discard size limit
Previously we used Maximum Unmap LBA Count in the Block Limits VPD to signal the maximum number of sectors we could handle in a single Write Same command. Starting with SBC3r26 the Block Limits VPD has an explicit limit on the number of blocks in a Write Same. This means we can stop abusing a field related to the Unmap command and let our SAT use the proper value in the VPD (Maximum Write Same Length). Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com> Cc: stable@kernel.org
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index e2f57e9e12f0..30ea95f43e79 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2138,7 +2138,7 @@ static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
* with the unmap bit set.
*/
if (ata_id_has_trim(args->id)) {
- put_unaligned_be32(65535 * 512 / 8, &rbuf[20]);
+ put_unaligned_be64(65535 * 512 / 8, &rbuf[36]);
put_unaligned_be32(1, &rbuf[28]);
}