Re: [PATCH 3/3] Make ide dma blacklist handling a bit saner.

Junio C Hamano
2007-05-28T23:03:40Z

Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> writes:

> The change itself looks good but IMO it is worth doing it before patch #2/3
> (it would also make it possible for me to merge this patch immediately).

Yes, I should have considered that the earlier #2/3 needs
coordination between you and Jeff.

> When it comes to patch #2 - Alan's comment may be a bit harsh but he seems
> to be right - there should be a common library-like file (ata-blacklist.c
> or ata-quirks.c or whatever name you like) containing ata_device_blacklist[].
>
> This would require slight modification of ide_in_drive_list() to teach
> it about ATA_HORKAGE_DMA ... Please also note that <linux/ata.h> is used by both
> IDE and libata so it should be a good place to put struct ata_blacklist_entry
> and ATA_HORKAGE_* macros.

Thanks for the hint. Alan is correct to point out that I
cheated. ;-) If I understand correctly, the change would
involve:

- create a new file that has ata_device_blacklist[] whose type
is "struct ata_blacklist_entry" (i.e. matches libata-core),
by separating the table out of ata/libata-core.c.

Q1. should that file go to drivers/ata/ or drivers/ide/?

- make that file depended on when either libata and/or IDE is
selected.

Q2. Kconfig dependency rule is needed for this, perhaps. How
should that look like?

- some out-of-tree drivers might be using ide_in_drive_list()
and relying on it to take "struct drive_list_entry"; create a
new function, ide_in_device_list(), that takes "struct
ata_blacklist_entry" as its parameter.

Q3. Is the 'out-of-tree drivers' a real issue, and if so, is
the above a reasonable avenue to take?

- convert in-tree callers to use ide_in_device_list() instead,
feeding it ata_device_blacklist[], and remove drive_blacklist[]
from drivers/ide/ide-dma.c.

Q4. What would you like to do for drive_whitelist[]?

> Care to respin both patches?

Before the questions are answered I cannot respin the earlier
#2/3, but I can certainly respin #3/3.