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

From: Niklas Cassel

Date: Thu Mar 05 2026 - 02:54:53 EST


On Wed, Mar 04, 2026 at 07:34:29PM +0000, Pedro Falcato wrote:
> On Wed, Mar 04, 2026 at 01:08:35PM +0100, Niklas Cassel wrote:
> > Hello Pedro,
> >
> > On Wed, Mar 04, 2026 at 11:23:01AM +0000, Pedro Falcato wrote:
> >
> > (snip)
> >
> > > So, does this look better?
> > >
> > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> > > index d61846f03edc..c57e35ccc092 100644
> > > --- a/drivers/ata/libata-core.c
> > > +++ b/drivers/ata/libata-core.c
> > > @@ -4231,6 +4231,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 },
> >
> > Yes, I would prefer that.
> >
> > When booting a device that has quirks applied, we will get prints in dmesg
> > showing which quirks were applied.
>
> Yeah, makes sense. Can you use this diff and add Cc: stable when applying,
> or do you want me to send a v2?

Please send a V2 without the text:
"QEMU shares IDENTIFY data between PATA/SATA drives"

I don't think this is 100% true, as we can see that the QEMU AHCI emulation
e.g. sets s->ncq_queues in ahci.c:
https://github.com/qemu/qemu/blob/v10.2.1/hw/ide/ahci.c#L632

So the identify data is already different for PATA/SATA drives IMO.


Kind regards,
Niklas