Commit Graph

13 Commits

Author SHA1 Message Date
christos
29fd335624 PR/39583: Brad du Plessis: acrmsr(4) driver doesn't report number of volumes correctly
to bioctl(8)
PR/39584: Juan RP: arcmsr(4) driver disk state values are incorrect (for ARC-1220)
2008-09-23 22:22:41 +00:00
xtraeme
9f5ac6b847 Add ARC_FW_DISK_INITIALIZED flag for device_state and do not treat
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.
2008-04-03 13:59:00 +00:00
xtraeme
3294fa721e Split device_t/softc, and other related cosmetic changes. 2008-03-05 15:03:36 +00:00
xtraeme
5b41531f32 If a disk has been disconnected in a volume set, mark it as offline
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.
2008-02-29 17:45:04 +00:00
xtraeme
43b696d498 Register a sensor per disk connected to a valid volume, so that we
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.
2008-02-28 16:47:53 +00:00
xtraeme
98d660f7bb Fix indentation. 2008-01-03 21:28:11 +00:00
xtraeme
68d02b93e3 New functionality for arcmsr(4) native management via bioctl(8):
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.
2008-01-02 23:48:05 +00:00
xtraeme
6797f052ff Erm fix some defines in previous... 2007-12-09 00:24:46 +00:00
xtraeme
1e1bd31956 Add some more firmware command/status codes from the freebsd driver. 2007-12-08 16:53:19 +00:00
xtraeme
21d75f870d Boh! I spoke too soon before, without the rwlock(9) sometimes
arc_wait() waits forever, so put it back until I figure any other way
to remove the rwlock(9).
2007-12-05 18:58:00 +00:00
xtraeme
dc5ade8ebb Make it use mutex(9) and condvar(9), bye bye spl(9) and tsleep(9).
Fully stable with all debugging options turned on, unless someday any
problem appears :-)
2007-12-05 18:07:34 +00:00
xtraeme
220ed74e1e - arc_msgbuf: free wbuf and rbuf with the correct type (M_TEMP vs M_DEVBUF)
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.
2007-12-05 16:02:25 +00:00
xtraeme
11b3a747bd Rename the Areca RAID driver (known as arc(4) to arcmsr(4) to avoid
namespace conflict with NetBSD/arc.

Found by tsutsui@.
2007-12-05 00:18:06 +00:00