diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e364e86e84d7..280729325ebd 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1995,8 +1995,8 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) | |||
1995 | 1995 | ||
1996 | VPRINTK("ENTER\n"); | 1996 | VPRINTK("ENTER\n"); |
1997 | 1997 | ||
1998 | /* set scsi removeable (RMB) bit per ata bit */ | 1998 | /* set scsi removable (RMB) bit per ata bit */ |
1999 | if (ata_id_removeable(args->id)) | 1999 | if (ata_id_removable(args->id)) |
2000 | hdr[1] |= (1 << 7); | 2000 | hdr[1] |= (1 << 7); |
2001 | 2001 | ||
2002 | if (args->dev->class == ATA_DEV_ZAC) { | 2002 | if (args->dev->class == ATA_DEV_ZAC) { |
@@ -2532,13 +2532,15 @@ static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) | |||
2532 | rbuf[15] = lowest_aligned; | 2532 | rbuf[15] = lowest_aligned; |
2533 | 2533 | ||
2534 | if (ata_id_has_trim(args->id)) { | 2534 | if (ata_id_has_trim(args->id)) { |
2535 | rbuf[14] |= 0x80; /* TPE */ | 2535 | rbuf[14] |= 0x80; /* LBPME */ |
2536 | 2536 | ||
2537 | if (ata_id_has_zero_after_trim(args->id)) | 2537 | if (ata_id_has_zero_after_trim(args->id) && |
2538 | rbuf[14] |= 0x40; /* TPRZ */ | 2538 | dev->horkage & ATA_HORKAGE_ZERO_AFTER_TRIM) { |
2539 | ata_dev_info(dev, "Enabling discard_zeroes_data\n"); | ||
2540 | rbuf[14] |= 0x40; /* LBPRZ */ | ||
2541 | } | ||
2539 | } | 2542 | } |
2540 | } | 2543 | } |
2541 | |||
2542 | return 0; | 2544 | return 0; |
2543 | } | 2545 | } |
2544 | 2546 | ||