[openbeos] Re: device driver trouble

  • From: Eike Dehling <e.e.dehling@xxxxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 18 Oct 2002 12:14:02 +0200


> I was looking through the code of some device drivers, more specific
> the
> rtl8139 driver and the fb_console drivers. They both register their
> device-nodes with 'devfs_publish_device' and both pass a struct with
> 'hooks' but in the 'open' hook the rtl8139 driver has TWO parameters:
> ...

My guess is that the rtl8139 driver is currently not used by us at all,
therefore it hasn't been updated to the latest driver API.
IIRC we still have an iso 9660 fs driver in our repository - but its
API is completely outdated and won't work anymore with the current VFS;
same issue.

Ok. but in the header-files the functions have the updated/new API ?


When/if we come to a point when we need them, they will be updated to
work again - since everything is a work in progress it would be a waste
of time to always update everything if it's needed or not.

> does anyone know how that is supposed to work ?? don't drivers-hooks
> have
> to have all the same parameters ?? wouldn't they mess up their stack
> real
> fast when they don't ??

They won't mess up the stack since the caller is responsible for
popping the stack after the function call.

great. and what if the functions uses parameters which are not there? most of the parameters are references to some structures, where functions store things ... i don't even want to think about the result ...


Other related posts: