Axel Dörfler schrieb:
Colin Günther <coling@xxxxxx> wrote:Axel Dörfler schrieb:Does this have to work, when the open, control, close, free, read, write functions are pretty unimplemented yet, too?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).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!
noted.
the other returning those values: close -> B_OK free -> B_OK control -> B_ERROR read -> B_ERROR write -> B_ERRORTracing 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.
While I've been messing with the HDA driver, I've found that reloading worked for me (even when I just had a link to the driver binary in the kernel add-ons folder). I don't think anything has changed in the kernel meanwhile in this respect. So once you recompiled your driver, you probably have to either restart the network stack, or write your own little program which opens your driver for you so it get's loaded again.Thx to your hints, reloading works for me now, too :-) I've added my driver to /boot/home/config/add-ons/kernel/drivers/bin/. This prevented the reloading. After using the system driver path /boot/system/add-ons/kernel/drivers/bin it works.Best regards, -Stephan
Now, is this behaviour intended, I mean reloading not working when using the user add-on dir?
-colin By the way this is tested on revision 30860.