Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access

From: Jon Smirl
Date: Tue May 02 2006 - 12:37:51 EST


On 4/29/06, Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> wrote:
This patch adds an "enable" sysfs attribute to each PCI device. When read it
shows the "enabled-ness" of the device, but you can write a "0" into it to
disable a device, and a "1" to enable it.

What is the rationale for this? Doing this encourages people to write
device drivers in user space that probably should be a kernel driver.
What are you going to do if two competing apps want to set it to two
different states?

An alternate way to fix this problem is to write a device driver that
attaches to hardware with PCI class VGA. The driver could then provide
a device for each card found. By opening the device you can control
who owns and enables it.

We already have a lot of problems with multiple drivers trying to
control a single piece of hardware. Adding an "enable" attribute makes
it even easier to build conflicting drivers.

--
Jon Smirl
jonsmirl@xxxxxxxxx
-
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/