Re: [PATCH v2] ata: libata-core: Add BRIDGE_OK quirk for QEMU drives

From: Pedro Falcato

Date: Thu Mar 05 2026 - 10:07:27 EST


On Thu, Mar 05, 2026 at 02:53:12PM +0000, Pedro Falcato wrote:
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Pedro Falcato <pfalcato@xxxxxxx>

Ugh, just noticed I forgot to pick up Damien's Rb, please add it when
applying, thanks!

--
Pedro