0

I'm learning Solaris and writing a simple driver; currently I implemented basic entry points, i.e. _init, _info, _finit, *attach, *detach. It compiles and links with no issues, then I copy it to /usr/kernel/drv/amd64/ and call:

% add_drv mydrv
Jul   7 22:54:16 ezhost mydrv: NOTICE: mydrv: _info called
devfsadm: driver failed to attach: mydrv
Warning: Driver (mydrv) successfully added to system but failed to attach
Jul   7 22:54:16 ezhost mydrv: NOTICE: mydrv: _init called

Currently what I do in my _attach routine is:

ddi_get_instance ddi_soft_state_zalloc ddi_get_soft_state

and return DDI_SUCCESS

Not much, but probably when the drivers gets loaded in memory, the system (devfsadm) expects to creates some entries in devfs, however my driver doesn't register any character device nodes, and as result fails?

Mark
  • 6,052
  • 8
  • 61
  • 129

0 Answers0