From owner-svn-src-head@freebsd.org  Wed Sep  4 14:29:49 2019
Return-Path: <owner-svn-src-head@freebsd.org>
Delivered-To: svn-src-head@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82CAAF3476;
 Wed,  4 Sep 2019 14:29:49 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com
 [209.85.208.179])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 46NmRx2r5Nz4N82;
 Wed,  4 Sep 2019 14:29:49 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-lj1-f179.google.com with SMTP id e17so8829743ljf.13;
 Wed, 04 Sep 2019 07:29:48 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=IeJiK2xJFKQQ8aqtZWyITWr61pxTNIJ5sqT0WAaF38U=;
 b=VRzWvuHVN82bVB/Q6lmdXPOPLsSObrVw+gLwk78Y59fiMxu3eutS5U8rnPNILY11pc
 awjoaIC1K5jZ7GAMm1YuhhIvOZRNRNxks8x5EcFaYwaWnQzGsyVXyARgcTXr8WgfvDGT
 /up1wgpKDB12deKAKCH2Ts98SR1BoThqL0vy1SHNHIdsI5DYuYESz4X0QtOewtWlYTGW
 8aFuzFEo13AbHYs0zai/GqBGKPE09xCLCatu+EMI4o/xhYErdBKx5LsKtc8zET1qLa2b
 r/quoXY9K6JBYZtzbJAUAtHdsL0duzxx3EeYEyC24VOLlcajAARyKRve6d1oQV19G9vr
 CqxA==
X-Gm-Message-State: APjAAAXj7/8mRXGK+XEfxNG+uLW6IuvQzzveSRA6Al1Wpnll13YTW7Hz
 tZuoXGLkwIh9+Wg9fUMk9nyRHMAIJUc1n1heFQms0LC7
X-Google-Smtp-Source: APXvYqynxwH6jzx3Z4Di4ngh2gu6+twq05vl18oARxNuqZxNZLC51I0Lgg0h4JPaEAHPtR5otp2muqWgwJCl2QG+hOQ=
X-Received: by 2002:a05:651c:93:: with SMTP id 19mr2022630ljq.0.1567607386430; 
 Wed, 04 Sep 2019 07:29:46 -0700 (PDT)
MIME-Version: 1.0
References: <201909041347.x84Dlcds017291@repo.freebsd.org>
 <CAOtMX2h7tNjawCNcMO_GzBe62YUO8TRb2rP1ERakPr_rW8mFFA@mail.gmail.com>
 <8edfc58e-21c8-3233-2167-2d83af6c3a5f@freebsd.org>
In-Reply-To: <8edfc58e-21c8-3233-2167-2d83af6c3a5f@freebsd.org>
From: Alan Somers <asomers@freebsd.org>
Date: Wed, 4 Sep 2019 08:29:34 -0600
Message-ID: <CAOtMX2g0ZWs4mu8xzjcuCtVBMZG+rxon1zx0wAXxFiFYHU15fA@mail.gmail.com>
Subject: Re: svn commit: r351812 - head/usr.sbin/mpsutil
To: Allan Jude <allanjude@freebsd.org>
Cc: Andriy Gapon <avg@freebsd.org>, src-committers <src-committers@freebsd.org>,
 svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
X-Rspamd-Queue-Id: 46NmRx2r5Nz4N82
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org;
	none
X-Spamd-Result: default: False [-6.98 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-0.998,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.98)[-0.981,0]
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 <svn-src-head.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/>
List-Post: <mailto:svn-src-head@freebsd.org>
List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>,
 <mailto:svn-src-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Sep 2019 14:29:49 -0000

On Wed, Sep 4, 2019 at 8:21 AM Allan Jude <allanjude@freebsd.org> wrote:

> On 2019-09-04 09: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?
>
> 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
>

By direct-attach, do you mean SGPIO, or is there some kind of backplane
where the HDD itself controls the LEDs?