Subject: Generic pci quirk code (Re: VGA ATI patches)
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Bang Jun-Young <junyoung@mogua.com>
List: tech-kern
Date: 07/02/2002 14:26:03
[CC'ed to tech-kern]

On Sat, Jun 29, 2002 at 12:52:47AM +0200, Matthias Drochner wrote:
> > There's
> > similar code in pci_quirks.c
> 
> But this code is clearly targetet at generic PCI framework problems
> (read the comments), while the ATI bugs are not exactly PCI related
> (could happen with ISA cards too).

Your quirks code resides in vga_pci.c, so it can't be used with ISA
cards.

Anyway, how about this one for merging the stuff in vga_pci.c and
pci_quirks.c together:

/* No need to return struct pci_quirkdata *, since the caller already
   knows what vendor and product are. */ 
int
pci_lookup_quirkdate(pci_vendor_id_t vendor, pci_product_id_t product,
    struct pci_quirkdata *quirks, int nquirks)
{
	...

	return quirks->quirks;
}

?

Arguments vendor and product can be merged into one, e.g. pci_id_t id,
but I haven't found pci_id_t type in the sources.

Jun-Young

-- 
Bang Jun-Young <junyoung@mogua.com>