From: Sudip Mukherjee sudipm.mukherjee@gmail.com
While whitelisting Micron M500DC drives, the tweaked blacklist entry enabled queued TRIM for M500IT variants also. But these do not support queued TRIM. And while using those SSDs with the latest kernel we have seen errors and even the partition table getting corrupted.
Some part from the dmesg: [ 6.727384] ata1.00: ATA-9: Micron_M500IT_MTFDDAK060MBD, MU01, max UDMA/133 [ 6.727390] ata1.00: 117231408 sectors, multi 16: LBA48 NCQ (depth 31/32), AA [ 6.741026] ata1.00: supports DRM functions and may not be fully accessible [ 6.759887] ata1.00: configured for UDMA/133 [ 6.762256] scsi 0:0:0:0: Direct-Access ATA Micron_M500IT_MT MU01 PQ: 0 ANSI: 5
and then for the error: [ 120.860334] ata1.00: exception Emask 0x1 SAct 0x7ffc0007 SErr 0x0 action 0x6 frozen [ 120.860338] ata1.00: irq_stat 0x40000008 [ 120.860342] ata1.00: failed command: SEND FPDMA QUEUED [ 120.860351] ata1.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 0 ncq dma 512 out res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x5 (timeout) [ 120.860353] ata1.00: status: { DRDY } [ 120.860543] ata1: hard resetting link [ 121.166128] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 121.166376] ata1.00: supports DRM functions and may not be fully accessible [ 121.186238] ata1.00: supports DRM functions and may not be fully accessible [ 121.204445] ata1.00: configured for UDMA/133 [ 121.204454] ata1.00: device reported invalid CHS sector 0 [ 121.204541] sd 0:0:0:0: [sda] tag#18 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 [ 121.204546] sd 0:0:0:0: [sda] tag#18 Sense Key : 0x5 [current] [ 121.204550] sd 0:0:0:0: [sda] tag#18 ASC=0x21 ASCQ=0x4 [ 121.204555] sd 0:0:0:0: [sda] tag#18 CDB: opcode=0x93 93 08 00 00 00 00 00 04 28 80 00 00 00 30 00 00 [ 121.204559] print_req_error: I/O error, dev sda, sector 272512
After few reboots with these errors, and the SSD is corrupted. After blacklisting it, the errors are not seen and the SSD does not get corrupted any more.
We know that M500IT MG02 and M500DC support this feature, Martin asked Micron for a list of SSDs which have support for this feature. But there was no reply. It is best to blacklst all Micron SSDs for now, except the known two variants, to prevent corrupting other Micron SSDs which do not support this.
Fixes: 243918be6393 ("libata: Do not blacklist Micron M500DC") Cc: stable@vger.kernel.org Cc: Martin K. Petersen martin.petersen@oracle.com Signed-off-by: Sudip Mukherjee sudipm.mukherjee@gmail.com ---
v1: Only M500IT MU01 was blacklisted.
v2: Whitelist M500IT BG02 and M500DC and then blacklist all other Micron.
drivers/ata/libata-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8bc71ca61e7f..df5d716c0a07 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4550,7 +4550,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_NOLPM, },
/* devices that don't properly handle queued TRIM commands */ - { "Micron_M500_*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + { "Micron_M500DC*", NULL, 0}, + { "Micron_M500IT_*", "MG02", 0}, + { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Crucial_CT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, },
Sudip,
v1: Only M500IT MU01 was blacklisted.
v2: Whitelist M500IT BG02 and M500DC and then blacklist all other Micron.
I think my preference would be to blacklist M500IT with the MU01 firmware (which Micron said was affected) and rely on the "Micron*" fallthrough further down for the rest.
I have not gotten firm confirmation on ZRAT behavior so for now we should probably just do:
+ { "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM, },
Hi Martin,
On Mon, Apr 30, 2018 at 11:24:49PM -0400, Martin K. Petersen wrote:
Sudip,
v1: Only M500IT MU01 was blacklisted.
v2: Whitelist M500IT BG02 and M500DC and then blacklist all other Micron.
I think my preference would be to blacklist M500IT with the MU01 firmware (which Micron said was affected) and rely on the "Micron*" fallthrough further down for the rest.
This patch was based on your reply at: https://www.spinics.net/lists/linux-ide/msg55370.html
I have not gotten firm confirmation on ZRAT behavior so for now we should probably just do:
- { "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM, },
My v1 patch had only MU01 with ATA_HORKAGE_NO_NCQ_TRIM and ATA_HORKAGE_ZERO_AFTER_TRIM. I am not very much confident on only having ATA_HORKAGE_NO_NCQ_TRIM as we have seen huge regression due to 243918be6393 ("libata: Do not blacklist Micron M500DC"). Unless, Micron confirms that it can only have 'ATA_HORKAGE_NO_NCQ_TRIM' I think we should go for both. I don't think we should mark it as ZRAT supported, (without Micron confirmation) and cause another regression. My v1 patch is at https://patchwork.kernel.org/patch/10287605/ Do you want me to resend it again?
-- Regards Sudip
Sudip,
I think my preference would be to blacklist M500IT with the MU01 firmware (which Micron said was affected) and rely on the "Micron*" fallthrough further down for the rest.
This patch was based on your reply at: https://www.spinics.net/lists/linux-ide/msg55370.html
Yep, but they have confirmed it's only that model and firmware rev that's affected. I just haven't gotten the comprehensive matrix of all current models and firmware revs I was hoping for.
linux-stable-mirror@lists.linaro.org