Re: Fwd: Patch to control VGA bus routing and active VGA device.

From: Russell King
Date: Mon Jan 24 2005 - 14:58:14 EST


On Mon, Jan 24, 2005 at 02:42:57PM -0500, Jeff Garzik wrote:
> Jon Smirl wrote:
> > Is this a justification for doing device drivers for bridge chips? It
> > has been mentioned before but no one has done it.
>
>
> Yeah, people are usually slack and work around the problem.
>
> A bridge driver is really wanted for several situations in today's
> hardware...

There's a very good reason not to have a bridge driver at the moment -
some PCI to PCI bridges need special drivers. Currently, as the device
model stands today, we can only have ONE PCI to PCI bridge driver for
all P2P bridges, which is bad news if you need a specific driver for,
eg, a mobility docking station P2P bridge.

As I said back in 2002, the device model needs a way to have driver
priories - how well a driver matches the hardware.

My idea was for the bus match function to return the "goodness"
factor of the match. For PCI, matching on just the class IDs would
be low goodness, but an exact match with both the vendor and device
IDs would yeild a good match.

When the device model has a driver or device added, it scans all current
devices or drivers (respectively) and chooses the best matched pair.
If the device already has an existing driver, it calls the ->remove
method to unbind the current device driver relationship before handing
it over to the more specific driver.

Unfortunately, I never got around to writing the mobility P2P bridge
driver because I didn't see much chance of this idea being adopted.

However, if we're going to start having generic drivers for such
hardware, this kind of functionality needs to be thought about.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/