it as unknown; in this state the disk is correctly working so set it
as online.
Also remove some bogus htole32() for diskinfo->device_state.
This should fix PR kern/38299 by Hiroyuki Bessho.
and put it on another bus and print "disk missing"... the OpenBSD driver
does that but I forgot to re-add it.
Also save some values provided by the firmware in the softc and use them
in the bio(4) ioctls, this speeds up considerably bioctl(8) and avoids
so many firmware commands every time we want the current status.
can get more details if state on a disk or volume has changed,
previously only state about the volume was available.
You'll see something like this with envstat(8) now:
$ envstat -darcmsr0
RAID 5 volume0 (sd0): building
disk0 volume0 (sd0): online
disk1 volume0 (sd0): online
disk2 volume0 (sd0): online
disk3 volume0 (sd0): online
$
Convert the driver to use pmf(9) and register a shutdown power handler
via pmf_device_register1() that was added recently.
Misc cosmetics tweaks while I'm here.
Added support to create/remove hot-spare, pass-through disks.
Added support to create/remove volume sets.
Added support to show information about physical disks, even if they
are marked unused, hot-spares or pass-through.
sd(4) devices are attached/detached automagically when a pass-through
disk or volume set is created/removed... thanks scsipi(9) and cube@
for hints.
this fixes a panic with debugging options.
- Do not use a callout to refresh sensor data, and make it available
every time someone requests it.
- Enable ENVSYS_FMONSTCHANGED for notifications in the volumes.