Re: 2.3.18ac8 doesn't detect tulip (again!)

Jeff Garzik (jgarzik@pobox.com)
Wed, 22 Sep 1999 16:01:01 -0400


Matti Aarnio wrote:
> > How the chip->id.pci_mask and chip->id.subsystem_mask are made ?
> > And what are the values that are then compared.
> >
> > This relates to the question of how those two variables must be
> > constructed.
>
> The 'struct pci_id_info' is so far used only by network driver cards
> which Donald Becker has written ( in drivers/net/*.c ), and they have
> hand-coded matcher literals:
[...]

Is there a good reason for id_mask/subsystem_mask to exist at all?

Although the in-driver tables must be changed, it seems much more
logical and simple to split the 'struct match_info' into vendor/device
id pairs and eliminate *_mask.

With that change,
o the number of match_info members stays the same
o the structure gets smaller (4 * u16 instead of 4 * u32)
o you can use constants from pci.h instead of having a literal hex
constant in the code
o there is absolutely NO confusion as to where the vendor/device ids are
placed in the structure

And a fifth item: from length of this thread, it is also obvious that
the current pci_scan method is error prone. Using vendor/device id
pairs is what the normal pci_find_xxx functions use... why not continue
to walk down that path?

Regards,

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/