summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Falcato <pfalcato@suse.de>2026-03-05 17:53:12 +0300
committerNiklas Cassel <cassel@kernel.org>2026-03-05 18:49:02 +0300
commitb92b0075ee1870f78f59ab1f7da7dbfdd718ad7a (patch)
tree5e119b8da1e3a35437a058aa65fe959d53db093e
parentaac9b27f7c1f2b2cf7f50a9ca633ecbbcaf22af9 (diff)
downloadlinux-b92b0075ee1870f78f59ab1f7da7dbfdd718ad7a.tar.xz
ata: libata-core: Add BRIDGE_OK quirk for QEMU drives
Currently, whenever you boot with a QEMU drive over an AHCI interface, you get: [ 1.632121] ata1.00: applying bridge limits This happens due to the kernel not believing the given drive is SATA, since word 93 of IDENTIFY (ATA_ID_HW_CONFIG) is non-zero. The result is a pretty severe limit in max_hw_sectors_kb, which limits our IO sizes. QEMU has set word 93 erroneously for SATA drives but does not, in any way, emulate any of these real hardware details. There is no PATA drive and no SATA cable. As such, add a BRIDGE_OK quirk for QEMU HARDDISK. Special care is taken to limit this quirk to "2.5+", to allow for fixed future versions. This results in the max_hw_sectors being limited solely by the controller interface's limits. Which, for AHCI controllers, takes it from 128KB to 32767KB. Cc: stable@vger.kernel.org Signed-off-by: Pedro Falcato <pfalcato@suse.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Niklas Cassel <cassel@kernel.org>
-rw-r--r--drivers/ata/libata-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 76b012f544ea..6c4e567b6582 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4232,6 +4232,7 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
/* Devices that do not need bridging limits applied */
{ "MTRON MSP-SATA*", NULL, ATA_QUIRK_BRIDGE_OK },
{ "BUFFALO HD-QSU2/R5", NULL, ATA_QUIRK_BRIDGE_OK },
+ { "QEMU HARDDISK", "2.5+", ATA_QUIRK_BRIDGE_OK },
/* Devices which aren't very happy with higher link speeds */
{ "WD My Book", NULL, ATA_QUIRK_1_5_GBPS },