Skip to content

Commit b92b007

Browse files
heatdfloatious
authored andcommitted
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: [email protected] Signed-off-by: Pedro Falcato <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
1 parent aac9b27 commit b92b007

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/ata/libata-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4232,6 +4232,7 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
42324232
/* Devices that do not need bridging limits applied */
42334233
{ "MTRON MSP-SATA*", NULL, ATA_QUIRK_BRIDGE_OK },
42344234
{ "BUFFALO HD-QSU2/R5", NULL, ATA_QUIRK_BRIDGE_OK },
4235+
{ "QEMU HARDDISK", "2.5+", ATA_QUIRK_BRIDGE_OK },
42354236

42364237
/* Devices which aren't very happy with higher link speeds */
42374238
{ "WD My Book", NULL, ATA_QUIRK_1_5_GBPS },

0 commit comments

Comments
 (0)