diff options
author | Tejun Heo <tj@kernel.org> | 2015-02-09 07:54:41 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-02-09 07:54:41 -0500 |
commit | b12aa1f25e1da7e23fa44f646ac46e41366cfc6c (patch) | |
tree | 465be1cfceaa37861f5629821e1be2559ba39cfb /drivers/ata/libata-core.c | |
parent | f627cfdeb7d07df7d7ad2e6ebe59f25d8af4212e (diff) | |
parent | 09c32aaa3683cbcb6c2787a42f87630dff37d2a5 (diff) |
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-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 7cbcafa30550..4b0d5e71858e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4206,10 +4206,33 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4206 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, | 4206 | { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, |
4207 | 4207 | ||
4208 | /* devices that don't properly handle queued TRIM commands */ | 4208 | /* devices that don't properly handle queued TRIM commands */ |
4209 | { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4209 | { "Micron_M[56]*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | |
4210 | { "Crucial_CT???M500SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4210 | ATA_HORKAGE_ZERO_AFTER_TRIM, }, |
4211 | { "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4211 | { "Crucial_CT*SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, |
4212 | { "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, | 4212 | |
4213 | /* | ||
4214 | * As defined, the DRAT (Deterministic Read After Trim) and RZAT | ||
4215 | * (Return Zero After Trim) flags in the ATA Command Set are | ||
4216 | * unreliable in the sense that they only define what happens if | ||
4217 | * the device successfully executed the DSM TRIM command. TRIM | ||
4218 | * is only advisory, however, and the device is free to silently | ||
4219 | * ignore all or parts of the request. | ||
4220 | * | ||
4221 | * Whitelist drives that are known to reliably return zeroes | ||
4222 | * after TRIM. | ||
4223 | */ | ||
4224 | |||
4225 | /* | ||
4226 | * The intel 510 drive has buggy DRAT/RZAT. Explicitly exclude | ||
4227 | * that model before whitelisting all other intel SSDs. | ||
4228 | */ | ||
4229 | { "INTEL*SSDSC2MH*", NULL, 0, }, | ||
4230 | |||
4231 | { "INTEL*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
4232 | { "SSD*INTEL*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
4233 | { "Samsung*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
4234 | { "SAMSUNG*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
4235 | { "ST[1248][0248]0[FH]*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, }, | ||
4213 | 4236 | ||
4214 | /* | 4237 | /* |
4215 | * Some WD SATA-I drives spin up and down erratically when the link | 4238 | * Some WD SATA-I drives spin up and down erratically when the link |
@@ -4721,7 +4744,10 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) | |||
4721 | return NULL; | 4744 | return NULL; |
4722 | 4745 | ||
4723 | for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { | 4746 | for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { |
4724 | tag = tag < max_queue ? tag : 0; | 4747 | if (ap->flags & ATA_FLAG_LOWTAG) |
4748 | tag = i; | ||
4749 | else | ||
4750 | tag = tag < max_queue ? tag : 0; | ||
4725 | 4751 | ||
4726 | /* the last tag is reserved for internal command. */ | 4752 | /* the last tag is reserved for internal command. */ |
4727 | if (tag == ATA_TAG_INTERNAL) | 4753 | if (tag == ATA_TAG_INTERNAL) |