mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
ata: libata-core: Quirk DELLBOSS VD max_sectors
Commit9b8b84879d("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:9b8b84879d("block: Increase BLK_DEF_MAX_SECTORS_CAP") Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
This commit is contained in:
@@ -3139,6 +3139,10 @@ int ata_dev_configure(struct ata_device *dev)
|
||||
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_1024,
|
||||
dev->max_sectors);
|
||||
|
||||
if (dev->quirks & ATA_QUIRK_MAX_SEC_8191)
|
||||
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_8191,
|
||||
dev->max_sectors);
|
||||
|
||||
if (dev->quirks & ATA_QUIRK_MAX_SEC_LBA48)
|
||||
dev->max_sectors = ATA_MAX_SECTORS_LBA48;
|
||||
|
||||
@@ -3991,6 +3995,7 @@ static const char * const ata_quirk_names[] = {
|
||||
[__ATA_QUIRK_NO_DMA_LOG] = "nodmalog",
|
||||
[__ATA_QUIRK_NOTRIM] = "notrim",
|
||||
[__ATA_QUIRK_MAX_SEC_1024] = "maxsec1024",
|
||||
[__ATA_QUIRK_MAX_SEC_8191] = "maxsec8191",
|
||||
[__ATA_QUIRK_MAX_TRIM_128M] = "maxtrim128m",
|
||||
[__ATA_QUIRK_NO_NCQ_ON_ATI] = "noncqonati",
|
||||
[__ATA_QUIRK_NO_LPM_ON_ATI] = "nolpmonati",
|
||||
@@ -4097,6 +4102,12 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
|
||||
{ "LITEON CX1-JB*-HP", NULL, ATA_QUIRK_MAX_SEC_1024 },
|
||||
{ "LITEON EP1-*", NULL, ATA_QUIRK_MAX_SEC_1024 },
|
||||
|
||||
/*
|
||||
* These devices time out with higher max sects.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=220693
|
||||
*/
|
||||
{ "DELLBOSS VD", "MV.R00-0", ATA_QUIRK_MAX_SEC_8191 },
|
||||
|
||||
/* Devices we expect to fail diagnostics */
|
||||
|
||||
/* Devices where NCQ should be avoided */
|
||||
|
||||
@@ -29,6 +29,7 @@ enum {
|
||||
ATA_MAX_SECTORS_128 = 128,
|
||||
ATA_MAX_SECTORS = 256,
|
||||
ATA_MAX_SECTORS_1024 = 1024,
|
||||
ATA_MAX_SECTORS_8191 = 8191,
|
||||
ATA_MAX_SECTORS_LBA48 = 65535,/* avoid count to be 0000h */
|
||||
ATA_MAX_SECTORS_TAPE = 65535,
|
||||
ATA_MAX_TRIM_RNUM = 64, /* 512-byte payload / (6-byte LBA + 2-byte range per entry) */
|
||||
|
||||
@@ -75,6 +75,7 @@ enum ata_quirks {
|
||||
__ATA_QUIRK_NO_DMA_LOG, /* Do not use DMA for log read */
|
||||
__ATA_QUIRK_NOTRIM, /* Do not use TRIM */
|
||||
__ATA_QUIRK_MAX_SEC_1024, /* Limit max sects to 1024 */
|
||||
__ATA_QUIRK_MAX_SEC_8191, /* Limit max sects to 8191 */
|
||||
__ATA_QUIRK_MAX_TRIM_128M, /* Limit max trim size to 128M */
|
||||
__ATA_QUIRK_NO_NCQ_ON_ATI, /* Disable NCQ on ATI chipset */
|
||||
__ATA_QUIRK_NO_LPM_ON_ATI, /* Disable LPM on ATI chipset */
|
||||
@@ -115,6 +116,7 @@ enum {
|
||||
ATA_QUIRK_NO_DMA_LOG = (1U << __ATA_QUIRK_NO_DMA_LOG),
|
||||
ATA_QUIRK_NOTRIM = (1U << __ATA_QUIRK_NOTRIM),
|
||||
ATA_QUIRK_MAX_SEC_1024 = (1U << __ATA_QUIRK_MAX_SEC_1024),
|
||||
ATA_QUIRK_MAX_SEC_8191 = (1U << __ATA_QUIRK_MAX_SEC_8191),
|
||||
ATA_QUIRK_MAX_TRIM_128M = (1U << __ATA_QUIRK_MAX_TRIM_128M),
|
||||
ATA_QUIRK_NO_NCQ_ON_ATI = (1U << __ATA_QUIRK_NO_NCQ_ON_ATI),
|
||||
ATA_QUIRK_NO_LPM_ON_ATI = (1U << __ATA_QUIRK_NO_LPM_ON_ATI),
|
||||
|
||||
Reference in New Issue
Block a user