lkml.org 
[lkml]   [2003]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] /proc/ide/hdx/settings with ide-default pseudo-driver is a 2.6/2.7 show-stopper
From
Date
On Iau, 2003-08-28 at 15:46, Bartlomiej Zolnierkiewicz wrote:
> Some background first: we need ide-default driver (set as a device driver
> for all driver-less ide devices) mainly because we allow changing devices
> settings through /proc/ide/hdX/settings and some of them (current_speed,
> pio_mode) are processed via request queue (we are currently preallocating
> gendisk and queue structs for all possible ide devices). The next problem
> is that ide-default doesn't register itself with ide and driverfs.
> If it does it will "steal" devices meaned to be used by other drivers.

Its also used to avoid special cases elsewhere.

> If we want dynamic hwifs/devices, moving gendisks/queues allocation
> to device drivers and ide integration with driverfs we need to:
>
> (a) kill /proc/ide/hdX/settings for driver-less devices and kill ide-default

ide_default avoids a ton of driver specific special case code outside
of /proc/ide/foo/settings too. It isnt that simple, and I added it
originally to fix hundreds of weird little bugs and races. You also need
it for handling hotplug of devices.

I don't however think it needs to be any brighter than it is now. Driver
ordering isnt important, Linus was pretty emphatic that he a) didn't
care and b) wouldnt take patches to do any kind of rigid ordering when I
asked him (and for hotplug its pretty obvious why)

As far as I can see you either

1. Set up the queues and /proc when you create a hwif

or

2. Provide a generic function for each driver to call that does this
and/or undoes it. Since each driver needs the same code (default
included).


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

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.062 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site