Brecht Machiels | 1 Dec 2010 22:45

[haiku-kernel-devel] driver unloading

Hi,

I'm having a go at writing an ACPI driver for changing the brightness of my laptop screen from within Haiku.
To get started, I have copied the source code for the battery driver and threw most of the function contents
out. After copying the driver to /boot/home/add-ons/kernel/drivers/power and rebooting, I can get
some output from 'cat /dev/power/acpi_backlight'. Rene told me the driver should unload after that, and
the syslog shows this indeed:
KERN: acpi_backlight: acpi_backlight_init_device
KERN: acpi_backlight: acpi_backlight_open
KERN: acpi_backlight: acpi_backlight_read
Last message repeated 1 time
KERN: acpi_backlight: acpi_backlight_close
KERN: acpi_backlight: acpi_backlight_free
KERN: acpi_backlight: acpi_backlight_uninit_device

However, after changing the driver, recompiling and copying it again, the changes are not visible on a new
cat. Listimage shows it's still loaded:

$ listimage 1 | grep backlight
  349         /boot/system/add-ons/kernel/drivers/power/acpi_backlight 0x807f4000 0x807f6000    0          0

For the atheros driver, issuing ifconfig down, makes the driver print to the syslog:
KERN: [net/atheroswifi/0] compat_free()

And also here, listimage still shows it.

So, what is broken? Or more likely, what am I doing wrong? :)

I just discovered this message: http://article.gmane.org/gmane.os.haiku.devel/8575
I'll try placing the driver under /boot/system...
(Continue reading)

Brecht Machiels | 1 Dec 2010 23:28

Re: [haiku-kernel-devel] driver unloading

At Wednesday, 01-12-2010 on 22:45 Brecht Machiels wrote:
> I just discovered this message: http://article.gmane.org/gmane.os.haiku.devel/8575
> I'll try placing the driver under /boot/system...

...and the problem persists.

I forgot to ask. Is there any description of the new device manager API? All I could find was this: http://thread.gmane.org/gmane.os.openbeos.kernel.devel/1328

Thanks,
Brecht

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
Axel Dörfler | 2 Dec 2010 15:23
Picon

Re: [haiku-kernel-devel] driver unloading

Brecht Machiels<brecht@...> wrote:
> So, what is broken? Or more likely, what am I doing wrong? :)

The new device driver API isn't exactly completed. For example, unloading of drivers is still missing.
Patches welcome, of course :-)

Bye,
   Axel.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

Gmane