]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r351812: mpsutil slot set status
authorAndriy Gapon <avg@FreeBSD.org>
Wed, 20 Nov 2019 08:44:29 +0000 (08:44 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Wed, 20 Nov 2019 08:44:29 +0000 (08:44 +0000)
commitaf07b7f68bb1b599ef01bd389519fa7ccbae8f54
tree56691425a51de59f720a51b97d9c4134b01f1c2e
parent0452ed66bbcd0ab0e70d4d80e578e52b60eb2aea
MFC r351812: mpsutil slot set status

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.

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.
usr.sbin/mpsutil/Makefile
usr.sbin/mpsutil/mps_cmd.c
usr.sbin/mpsutil/mps_slot.c [new file with mode: 0644]
usr.sbin/mpsutil/mpsutil.h