Skip to content

Commit 2e98327

Browse files
committed
ata: libata-core: Quirk DELLBOSS VD max_sectors
Commit 9b8b848 ("block: Increase BLK_DEF_MAX_SECTORS_CAP") increased the default max_sectors_kb from 1280 KiB to 4096 KiB. DELLBOSS VD with FW rev MV.R00-0 times out when sending I/Os of size 4096 KiB. Enable ATA_QUIRK_MAX_SEC, with value 8191 (sectors) for this device, since any I/O with more sectors than that lead to I/O timeouts. With this, the DELLBOSS VD SATA controller is usable again. Cc: stable+noautosel@kernel.org # depends on Move quirk flags to their own enum Fixes: 9b8b848 ("block: Increase BLK_DEF_MAX_SECTORS_CAP") Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent a42b71d commit 2e98327

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/ata/libata-core.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,6 +3139,10 @@ int ata_dev_configure(struct ata_device *dev)
31393139
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_1024,
31403140
dev->max_sectors);
31413141

3142+
if (dev->quirks & ATA_QUIRK_MAX_SEC_8191)
3143+
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_8191,
3144+
dev->max_sectors);
3145+
31423146
if (dev->quirks & ATA_QUIRK_MAX_SEC_LBA48)
31433147
dev->max_sectors = ATA_MAX_SECTORS_LBA48;
31443148

@@ -3991,6 +3995,7 @@ static const char * const ata_quirk_names[] = {
39913995
[__ATA_QUIRK_NO_DMA_LOG] = "nodmalog",
39923996
[__ATA_QUIRK_NOTRIM] = "notrim",
39933997
[__ATA_QUIRK_MAX_SEC_1024] = "maxsec1024",
3998+
[__ATA_QUIRK_MAX_SEC_8191] = "maxsec8191",
39943999
[__ATA_QUIRK_MAX_TRIM_128M] = "maxtrim128m",
39954000
[__ATA_QUIRK_NO_NCQ_ON_ATI] = "noncqonati",
39964001
[__ATA_QUIRK_NO_LPM_ON_ATI] = "nolpmonati",
@@ -4097,6 +4102,12 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
40974102
{ "LITEON CX1-JB*-HP", NULL, ATA_QUIRK_MAX_SEC_1024 },
40984103
{ "LITEON EP1-*", NULL, ATA_QUIRK_MAX_SEC_1024 },
40994104

4105+
/*
4106+
* These devices time out with higher max sects.
4107+
* https://bugzilla.kernel.org/show_bug.cgi?id=220693
4108+
*/
4109+
{ "DELLBOSS VD", "MV.R00-0", ATA_QUIRK_MAX_SEC_8191 },
4110+
41004111
/* Devices we expect to fail diagnostics */
41014112

41024113
/* Devices where NCQ should be avoided */

include/linux/ata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ enum {
2929
ATA_MAX_SECTORS_128 = 128,
3030
ATA_MAX_SECTORS = 256,
3131
ATA_MAX_SECTORS_1024 = 1024,
32+
ATA_MAX_SECTORS_8191 = 8191,
3233
ATA_MAX_SECTORS_LBA48 = 65535,/* avoid count to be 0000h */
3334
ATA_MAX_SECTORS_TAPE = 65535,
3435
ATA_MAX_TRIM_RNUM = 64, /* 512-byte payload / (6-byte LBA + 2-byte range per entry) */

include/linux/libata.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ enum ata_quirks {
7575
__ATA_QUIRK_NO_DMA_LOG, /* Do not use DMA for log read */
7676
__ATA_QUIRK_NOTRIM, /* Do not use TRIM */
7777
__ATA_QUIRK_MAX_SEC_1024, /* Limit max sects to 1024 */
78+
__ATA_QUIRK_MAX_SEC_8191, /* Limit max sects to 8191 */
7879
__ATA_QUIRK_MAX_TRIM_128M, /* Limit max trim size to 128M */
7980
__ATA_QUIRK_NO_NCQ_ON_ATI, /* Disable NCQ on ATI chipset */
8081
__ATA_QUIRK_NO_LPM_ON_ATI, /* Disable LPM on ATI chipset */
@@ -115,6 +116,7 @@ enum {
115116
ATA_QUIRK_NO_DMA_LOG = (1U << __ATA_QUIRK_NO_DMA_LOG),
116117
ATA_QUIRK_NOTRIM = (1U << __ATA_QUIRK_NOTRIM),
117118
ATA_QUIRK_MAX_SEC_1024 = (1U << __ATA_QUIRK_MAX_SEC_1024),
119+
ATA_QUIRK_MAX_SEC_8191 = (1U << __ATA_QUIRK_MAX_SEC_8191),
118120
ATA_QUIRK_MAX_TRIM_128M = (1U << __ATA_QUIRK_MAX_TRIM_128M),
119121
ATA_QUIRK_NO_NCQ_ON_ATI = (1U << __ATA_QUIRK_NO_NCQ_ON_ATI),
120122
ATA_QUIRK_NO_LPM_ON_ATI = (1U << __ATA_QUIRK_NO_LPM_ON_ATI),

0 commit comments

Comments
 (0)