aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 340a616d226b..e1e186b9dfcc 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2115,8 +2115,10 @@ static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
2115 * that we support some form of unmap - in thise case via WRITE SAME 2115 * that we support some form of unmap - in thise case via WRITE SAME
2116 * with the unmap bit set. 2116 * with the unmap bit set.
2117 */ 2117 */
2118 if (ata_id_has_trim(args->id)) 2118 if (ata_id_has_trim(args->id)) {
2119 put_unaligned_be32(65535 * 512 / 8, &rbuf[20]);
2119 put_unaligned_be32(1, &rbuf[28]); 2120 put_unaligned_be32(1, &rbuf[28]);
2121 }
2120 2122
2121 return 0; 2123 return 0;
2122} 2124}
@@ -2411,8 +2413,12 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf)
2411 rbuf[14] = (lowest_aligned >> 8) & 0x3f; 2413 rbuf[14] = (lowest_aligned >> 8) & 0x3f;
2412 rbuf[15] = lowest_aligned; 2414 rbuf[15] = lowest_aligned;
2413 2415
2414 if (ata_id_has_trim(args->id)) 2416 if (ata_id_has_trim(args->id)) {
2415 rbuf[14] |= 0x80; 2417 rbuf[14] |= 0x80; /* TPE */
2418
2419 if (ata_id_has_zero_after_trim(args->id))
2420 rbuf[14] |= 0x40; /* TPRZ */
2421 }
2416 } 2422 }
2417 2423
2418 return 0; 2424 return 0;