Re: [PATCH] libata: fix broken Kconfig setup

Jeff Garzik
2005-10-17T17:22:47Z

Linus Torvalds wrote:
>
> On Mon, 17 Oct 2005, Jeff Garzik wrote:
>
>>If IDE is compiled in, IDE SATA option is not enabled, and ata_piix or ahci
>>are used.
>
>
> How about this diff instead?

Nope, it elides critical logic.

1) The quirk should not be enabled if IDE driver is a module. No reason
to perform the nasty hack at all, as the user controls module load order.

2) The quirk should not be enabled if IDE driver is not built at all.
Standard resource reservation code works as expected here.

3) The quirk should not be enabled if CONFIG_BLK_DEV_IDE_SATA is
enabled, which indicates that the IDE driver gets preference for the
Intel SATA hardware in question.

> It's really quite clean and understandable, and it makes it very clear
> what's going on from a configuration standpoint, imnsho. And it does the
> right thing when AHCI/PIIX is compiled as a SATA module (well, as right as
> this approach ever can).

My patch works fine when ahci/piix is compiled as a module. That's the
configuration I personally tested.

> Of course, somebody should check that it really is just the AHCI and PIIX
> drivers that want the quirk,

It is. I wrote 100% of the code, and further, the quirk specifically
enumerates which PCI IDs are affected, making it easy to verify.

Jeff