Skip to contentSkip to conversation

ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8

PATCH Applied Justinien Bouron 4 participants 5 messages Nov 16 – Nov 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8

INTEL SSDSCKKB240G8 with firmware version XC311102 runs into FPDMA timeout errors when queue/max_sectors_kb is set to BLK_DEF_MAX_SECTORS_CAP = 4096KiB / 8192 sectors. Similar to model SSDSC2KG480G8, the issue disappears when setting this max size to 8191 sectors, thus apply the same quirk.

Firmware version X5A1ME59 for SSDSCKKB240G8 is un-affected by this bug thus keep the quirk specific to firmware XC311102.

Fixes 9b8b84879d4a ("block: Increase BLK_DEF_MAX_SECTORS_CAP")
---
 drivers/ata/libata-core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/ata/libata-core.c +3 -0
index 5ff45a5cbfe4a..2a5ca1b9ee5c0 100644
@@ -4204,6 +4204,7 @@ static const struct ata_dev_quirk_value __ata_dev_max_sec_quirks[] = {
 	{ "LITEON EP1-*",		NULL,		1024 },
 	{ "DELLBOSS VD",		"MV.R00-0",	8191 },
 	{ "INTEL SSDSC2KG480G8",	"XCV10120",	8191 },
+	{ "INTEL SSDSCKKB240G8",	"XC311102",	8191 },
 	{ },
 };
 
@@ -4474,6 +4475,8 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
 						ATA_QUIRK_MAX_SEC },
 	{ "INTEL*SSDSC2CT*",		NULL,	ATA_QUIRK_ZERO_AFTER_TRIM |
 						ATA_QUIRK_NO_FUA },
+	{ "INTEL SSDSCKKB240G8", "XC311102",	ATA_QUIRK_ZERO_AFTER_TRIM |
+						ATA_QUIRK_MAX_SEC },
 	{ "INTEL*SSD*",			NULL,	ATA_QUIRK_ZERO_AFTER_TRIM },
 	{ "SSD*INTEL*",			NULL,	ATA_QUIRK_ZERO_AFTER_TRIM },
 	{ "Samsung*SSD*",		NULL,	ATA_QUIRK_ZERO_AFTER_TRIM },
Signature · 1 line
2.47.3
#1 lore raw
Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] ata: libata: quirk shadowing in…

Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce:
- [High] ata: libata: quirk shadowing in ata_dev_quirks() [1] --

commit 139b2f80d245bb5cb2eb4919933ec350b21131cd
Author: Justinien Bouron <[email protected]>

ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8

This commit adds an 8191 max_sectors quirk for INTEL SSDSCKKB240G8 drives with firmware XC311102 to avoid FPDMA timeout errors.

Quoted 4 lines
drivers/ata/libata-core.c +0 -0
index 5ff45a5cbfe4a..2a5ca1b9ee5c0 100644

[ ... ]

drivers/ata/libata-core.c static const struct ata_dev_quirks_entry __ata_dev_quirks[] = { · line 4479

Quoted 6 lines
drivers/ata/libata-core.c +2 -0
@@ -4474,6 +4475,8 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
 						ATA_QUIRK_MAX_SEC },
 	{ "INTEL*SSDSC2CT*",		NULL,	ATA_QUIRK_ZERO_AFTER_TRIM |
 						ATA_QUIRK_NO_FUA },
+	{ "INTEL SSDSCKKB240G8", "XC311102",	ATA_QUIRK_ZERO_AFTER_TRIM |
+						ATA_QUIRK_MAX_SEC },

[Severity: High]
This problem wasn't introduced by this patch, but does the early exact match in __ata_dev_quirks[] shadow the later wildcard entries for
WDC WD2500JD-00HBB0 and WDC WD3200JD-00KLB0 [1]?

Because ata_dev_quirks() returns on the first matching entry in __ata_dev_quirks[], this new entry includes ATA_QUIRK_ZERO_AFTER_TRIM ahead of the INTEL*SSD* wildcard. Earlier in the same table, the exact-match entries for WDC WD3200JD-00KLB0 and WDC WD2500JD-00HBB0 specify only ATA_QUIRK_BROKEN_HPA:

drivers/ata/libata-core.c:__ata_dev_quirks[] = {
	...
	{ "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_QUIRK_BROKEN_HPA },
	{ "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_QUIRK_BROKEN_HPA },
	...
	{ "WDC WD2500JD-*",		NULL,	ATA_QUIRK_WD_BROKEN_LPM |
						ATA_QUIRK_NO_FUA },
	{ "WDC WD3000JD-*",		NULL,	ATA_QUIRK_WD_BROKEN_LPM },
	{ "WDC WD3200JD-*",		NULL,	ATA_QUIRK_WD_BROKEN_LPM },
	...
};

When either drive matches its exact entry, ata_dev_quirks() returns without reaching the WDC WD2500JD-* or WDC WD3200JD-* wildcard entries, leaving ATA_QUIRK_WD_BROKEN_LPM and ATA_QUIRK_NO_FUA unapplied and exposing those drives to broken LPM link instability and unsupported FUA I/O errors.

[1] https://sashiko.dev/#/bug/linux-1d8177db-a3fc-48ef-adce-d0515b20b43a

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Justinien Bouron
Quoted 6 lines · Justinien Bouron

INTEL SSDSCKKB240G8 with firmware version XC311102 runs into FPDMA timeout errors when queue/max_sectors_kb is set to BLK_DEF_MAX_SECTORS_CAP = 4096KiB / 8192 sectors. Similar to model SSDSC2KG480G8, the issue disappears when setting this max size to 8191 sectors, thus apply the same quirk.

Quoted 7 lines

Firmware version X5A1ME59 for SSDSCKKB240G8 is un-affected by this bug thus keep the quirk specific to firmware XC311102.

Fixes 9b8b84879d4a ("block: Increase BLK_DEF_MAX_SECTORS_CAP")
Signature · 2 lines
Damien Le Moal
Western Digital Research
maintainer Applied
#3 lore raw
In reply to Justinien Bouron
Quoted 10 lines · Justinien Bouron

INTEL SSDSCKKB240G8 with firmware version XC311102 runs into FPDMA timeout errors when queue/max_sectors_kb is set to BLK_DEF_MAX_SECTORS_CAP = 4096KiB / 8192 sectors. Similar to model SSDSC2KG480G8, the issue disappears when setting this max size to 8191 sectors, thus apply the same quirk.

Firmware version X5A1ME59 for SSDSCKKB240G8 is un-affected by this bug thus keep the quirk specific to firmware XC311102.

[...]

Applied to libata/linux.git (for-7.5), thanks!

[1/1] ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8

      https://git.kernel.org/libata/linux/c/3dccf22a

Kind regards,
Niklas

maintainer
#4 lore raw
Quoted 10 lines · Niklas Cassel
Quoted 9 lines · Justinien Bouron

INTEL SSDSCKKB240G8 with firmware version XC311102 runs into FPDMA timeout errors when queue/max_sectors_kb is set to BLK_DEF_MAX_SECTORS_CAP = 4096KiB / 8192 sectors. Similar to model SSDSC2KG480G8, the issue disappears when setting this max size to 8191 sectors, thus apply the same quirk.

Firmware version X5A1ME59 for SSDSCKKB240G8 is un-affected by this bug thus keep the quirk specific to firmware XC311102.

Quoted 7 lines
Quoted 1 line

[...]

Applied to libata/linux.git (for-7.5), thanks!

[1/1] ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8

      https://git.kernel.org/libata/linux/c/3dccf22a

I moved this to for-7.4-fixes instead, because of the severity of the bug and that it is quite recent.

Kind regards,
Niklas