2015-08-02 03:52:51 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PROG= mpsutil
|
mpsutil slot set status
This code has been written as a proof of concept, but I think that it
can be useful in general. It allows to set the status of an enclosure
slot. Practically, this means controlling whatever slot status LEDs the
enclosure provides. At present, the new command does not have sanity
checks or any conveniences. That means that it is possible to issue the
command for an invalid slot and an enclosure. But the worst I have seen
happening is either the command failing or simply being ignored. Also,
at the moment, the status has to be specified as a numeric bit mask.
The bit definitions can be found in sys/dev/mps/mpi/mpi2_init.h, they
are prefixed with MPI2_SEP_REQ_SLOTSTATUS_. The only way to address a
slot is by the enclosure handle and the slot number. Both are readily
available from mpsutil show commands.
So, future enhancements could include alternative ways to address a slot
(e.g., by a disk handle or a disk device name) and human friendly names
for slot statuses.
The new command is useful alternative to 'sas2ircu locate' command.
First, sas2ircu is a proprietary blob. Second, it supports setting only
locate / identify status bit.
Tested on HP H220 running LSI IT firmware 20.x.
Reviewed by: bapt
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D20535
2019-09-04 13:47:38 +00:00
|
|
|
SRCS= mps_cmd.c mps_debug.c mps_flash.c mps_show.c mps_slot.c mpsutil.c
|
2015-08-02 03:52:51 +00:00
|
|
|
MAN= mpsutil.8
|
|
|
|
|
|
|
|
WARNS?= 3
|
|
|
|
|
2015-10-28 11:20:55 +00:00
|
|
|
#LIBADD= cam util
|
2015-10-15 15:19:38 +00:00
|
|
|
LINKS= ${BINDIR}/mpsutil ${BINDIR}/mprutil
|
2015-10-28 11:06:04 +00:00
|
|
|
MLINKS= mpsutil.8 mprutil.8
|
2015-08-02 03:52:51 +00:00
|
|
|
|
2017-03-04 11:38:03 +00:00
|
|
|
CFLAGS+= -I${SRCTOP}/sys -I. -DUSE_MPT_IOCTLS
|
2015-10-28 16:31:04 +00:00
|
|
|
# Avoid dirdep dependency on libutil
|
|
|
|
CFLAGS+= -I${SRCTOP}/lib/libutil
|
2015-08-02 03:52:51 +00:00
|
|
|
|
|
|
|
# Here be dragons
|
|
|
|
.ifdef DEBUG
|
|
|
|
CFLAGS+= -DDEBUG
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|