Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932269AbWEHOys (ORCPT ); Mon, 8 May 2006 10:54:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932313AbWEHOys (ORCPT ); Mon, 8 May 2006 10:54:48 -0400 Received: from a222036.upc-a.chello.nl ([62.163.222.36]:5305 "EHLO laptopd505.fenrus.org") by vger.kernel.org with ESMTP id S932269AbWEHOyr (ORCPT ); Mon, 8 May 2006 10:54:47 -0400 Subject: Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access From: Arjan van de Ven To: Kyle Moffett Cc: Pavel Machek , Dave Airlie , Jon Smirl , Greg KH , Ian Romanick , Dave Airlie , linux-kernel@vger.kernel.org In-Reply-To: References: <1146784923.4581.3.camel@localhost.localdomain> <445BA584.40309@us.ibm.com> <9e4733910605051314jb681476y4b2863918dfae1f8@mail.gmail.com> <20060505202603.GB6413@kroah.com> <9e4733910605051335h7a98670ie8102666bbc4d7cd@mail.gmail.com> <20060505210614.GB7365@kroah.com> <9e4733910605051415o48fddbafpf0f8b096f971e482@mail.gmail.com> <20060505222738.GA8985@kroah.com> <9e4733910605051705j755ad61dm1c07c66c2c24c525@mail.gmail.com> <21d7e9970605051857l4415a04ai7d1b1f886bb01cee@mail.gmail.com> <20060507131201.GC5765@ucw.cz> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 08 May 2006 16:54:27 +0200 Message-Id: <1147100067.2888.34.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1042 Lines: 23 > *Especially* since there are a number of users (including myself) who > have tendencies to go wandering around sysfs tinkering with the > available values. Not having seen this thread, I would have had no > problem doing "echo -n 0 >enable" on some device thinking that it was > a fairly standard way to turn off the power to my soundcard it is > when I'm > not using it, and likely result in a kernel panic because I suddenly > disabled the BARs on the device out from under the driver. well it is in the pci dir, not in the sound dir. You know you're not using the driver layer at that point, but are directly poking the hardware. Just like the resources (eg the contents of the bars) are in that same directory... you're not echo;ing random crap into those as well, are you? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/