diff options
author | Tejun Heo <tj@kernel.org> | 2015-02-09 13:54:41 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-02-09 13:54:41 +0100 |
commit | b12aa1f25e1da7e23fa44f646ac46e41366cfc6c (patch) | |
tree | 465be1cfceaa37861f5629821e1be2559ba39cfb /drivers/ata/libata-scsi.c | |
parent | ata: libahci: Use of_platform_device_create only if supported (diff) | |
parent | ahci_xgene: Fix the dma state machine lockup for the ATA_CMD_SMART PIO mode c... (diff) | |
download | linux-b12aa1f25e1da7e23fa44f646ac46e41366cfc6c.tar.xz linux-b12aa1f25e1da7e23fa44f646ac46e41366cfc6c.zip |
Merge branch 'for-3.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata into for-3.20
09c32aaa3683 ("ahci_xgene: Fix the dma state machine lockup for the
ATA_CMD_SMART PIO mode command.") missed 3.19 release. Fold it into
for-3.20.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7659d6468303..280729325ebd 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2532,13 +2532,15 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) rbuf[15] = lowest_aligned; if (ata_id_has_trim(args->id)) { - rbuf[14] |= 0x80; /* TPE */ + rbuf[14] |= 0x80; /* LBPME */ - if (ata_id_has_zero_after_trim(args->id)) - rbuf[14] |= 0x40; /* TPRZ */ + if (ata_id_has_zero_after_trim(args->id) && + dev->horkage & ATA_HORKAGE_ZERO_AFTER_TRIM) { + ata_dev_info(dev, "Enabling discard_zeroes_data\n"); + rbuf[14] |= 0x40; /* LBPRZ */ + } } } - return 0; } |