svn commit: r351812 - head/usr.sbin/mpsutil

Allan Jude allanjude at freebsd.org
Wed Sep 4 14:21:57 UTC 2019


On 2019-09-04 09:50, Alan Somers wrote:
> On Wed, Sep 4, 2019 at 7:47 AM Andriy Gapon <avg at freebsd.org
> <mailto:avg at freebsd.org>> wrote:
> 
>     Author: avg
>     Date: Wed Sep  4 13:47:38 2019
>     New Revision: 351812
>     URL: https://svnweb.freebsd.org/changeset/base/351812
> 
>     Log:
>       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
> 
>     Added:
>       head/usr.sbin/mpsutil/mps_slot.c   (contents, props changed)
>     Modified:
>       head/usr.sbin/mpsutil/Makefile
>       head/usr.sbin/mpsutil/mps_cmd.c
>       head/usr.sbin/mpsutil/mpsutil.h
> 
> 
> Is this redundant with sesutil, or does it work on different kinds of
> enclosures? 

mpsutil's method will work on direct-attach backplanes and enclosures,
where sesutil only works if there is an expander that provides the SES
service.

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20190904/1f0cc5d7/attachment.sig>


More information about the svn-src-head mailing list