Date: Wed, 4 Sep 2019 17:45:55 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Alan Somers <asomers@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r351812 - head/usr.sbin/mpsutil Message-ID: <63070714-087b-119f-918a-fb1e75a3ab4d@FreeBSD.org> In-Reply-To: <CAOtMX2h7tNjawCNcMO_GzBe62YUO8TRb2rP1ERakPr_rW8mFFA@mail.gmail.com> References: <201909041347.x84Dlcds017291@repo.freebsd.org> <CAOtMX2h7tNjawCNcMO_GzBe62YUO8TRb2rP1ERakPr_rW8mFFA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 04/09/2019 16:50, Alan Somers wrote: > On Wed, Sep 4, 2019 at 7:47 AM Andriy Gapon <avg@freebsd.org > <mailto:avg@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? This is for controllers that do not expose a SES device for a directly attached (no expanders in between) backplane that does not have a built-in expander of its own. Here is some information for a context. I have a configuration with a SAS2308 based HBA that's flashed with LSI IT firmware version 20.00.07.00. I think that the HBA does not support IR firmware as it is very simple and it seems to lack NVSRAM (whatever it is). The controller is attached to a Supermicro 743TQ backplane that's built into a namesake chassis. The attachment is via a fan-out cable that connects one mini-SAS (SFF-8087) port on the controller to four individual SAS/SATA ports on the backplane plus a sideband connector that's attached to the backplane as well. The backplane supports two modes of operation for the sideband connection, I2C and SGPIO. But it seems that the controller or its firmware supports only SGPIO. Maybe I2C communication was considered to be an overkill for the IT mode. In any case, the controller does not fake a SES device for the enclosure, so it's not available for tools like sesutil, etc. The controller specific tools like mpsutil and sas2ircu do see the enclosure. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?63070714-087b-119f-918a-fb1e75a3ab4d>