[haiku-development] Re: Proposal: Remove device manager
- From: "François Revol" <revol@xxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Tue, 11 Dec 2007 12:24:43 +0100 CET
> I think we should remove the current pnp device manager from Haiku.
>
> It is unnecessary complicated and stalls the entire
> kernel driver development process.
I'm not sure we should remove it entirely, but it's not usable in the
current state.
I agree it's too complex.
However some node-based stuff would still be nice and would allow more
code reuse I think.
> IO ressource reservation by device drivers is completely useless,
> except for the purpose of multiple drivers supporting the same
> device, when the device manager will detected the collision and
> allow only one driver. This can be handled by allowing only one
> driver per device.
You'll always find cases where the same IO is used for 2 things anyway.
But it's still nice to have.
Though it can be done for PCI by adding 2 funcs to the bus manager.
> The only case not covered by this is the ISA IDE driver, but
> we can surely find another solution for it to not conflict with
> the PCI IDE driver.
Ditto.
> The way that drivers need to load their own parents is completely
> broken, and makes passing data from for example controller driver
> to it channel childs a nightmare.
Right.
The current version doesn't help at all code reuse, you have to do a
lot of copy-paste and you'll always end up missing something.
>
> Proposal:
> - basically implement a R5 style device driver handling.
>
> - driver attributes should be removed
Storing them in the fs is week at least (IIRC Zeta used a plain file
instead).
> - drivers should be able to publish new devices, and
> the kernel should scan available drivers for that
> (like:
> somebody plugged in /dev/usb/0/1/whatever,
> and the kernel should scan drivers/usb to see if there
> is a driver that can handle the device.
> one my be found, that published /dev/disk/foobar,
> and the kernel will scan drivers/disk to find a mathcing one, etc
> This can probably accomplished by adding some notification support)
Possibly even via node monitoring.
This really needs to be designed carefully.
That'd make a good subject for BeGeistert (we have a week to trol^
Wdiscuss it then :D)
François.
- References:
- [haiku-development] Proposal: Remove device manager
- From: Marcus Overhagen
Other related posts:
- » [haiku-development] Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- » [haiku-development] Re: Proposal: Remove device manager
- [haiku-development] Proposal: Remove device manager
- From: Marcus Overhagen