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

From: Arjan van de Ven
Date: Tue May 02 2006 - 14:27:46 EST


On Tue, 2006-05-02 at 13:13 -0400, Jon Smirl wrote:
> On 5/2/06, Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> wrote:
> > Jon Smirl wrote:
> > > All of these have been proposed before.
> >
> > I think you forgot to attach the patch
> >
> > > In my opinion an 'enable'
> > > attribute is the worst solution in the bunch.
> >
> > you again limit yourself to VGA. I don't.
>
> Haven't we learned that mucking with hardware from user space without
> having a device driver loaded is a very bad idea.

Not quite. It needs a reasonable sane userspace sure, but it's not
unreasonable for several cases.

> What is the
> motivation for providing an API whose only purpose is to enable this
> bad behavior?

you're very selective in what you read and only think about X.
There's many other reasons to enable/disable devices post boot.
Having a driver just to call pci_enable_device() is silly; and
there are various scenarios you may want. Userland suspend/resume is
only one of those, posting video cards is one, chip health monitoring is
one, etc etc etc. Don't let your lack of imagination ruin things.


-
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/