[haiku-development] Re: Driver loading

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 26 Jun 2009 15:36:44 +0200 CEST

Colin Günther <coling@xxxxxx> wrote:
> Axel Dörfler schrieb:
> > Exactly. If that doesn't work, please file a bug report.
> > The kernel should automatically detect if your driver binary
> > changed,
> > and will load it again once it can do so (ie. the driver is not
> > used
> > anymore).
> Does this have to work, when the open, control, close, free, read,
> write
> functions are pretty unimplemented yet, too?
> For example my open function looks like this:
>
> status_t atheros_open(...) {
>     return B_OK;
> }

BTW, following our coding style, this should read:

status_t
atheros_open(...)
{
        return B_OK;
}

Don't ignore our coding style!

> the other returning those values:
> close -> B_OK
> free -> B_OK
> control -> B_ERROR
> read -> B_ERROR
> write -> B_ERROR
>
> Tracing shows that after loading, the driver gets opened, controled,
> closed and finally freed. But, driver reloading (after changing some
> code and recompilation) doesn't work with this "implementation". Is
> this
> worth to file a bug?

The implementation itself is irrelevant. The driver will only be
reloaded if you try to open it; it won't be reloaded just when it's
recompiled (as it's not loaded when unused anyway).
If the driver is not reloaded even when opened, and you are sure no one
is using your driver anymore, then please indeed file a bug report.

Bye,
   Axel.


Other related posts: