From owner-svn-src-all@freebsd.org Wed Sep 4 13:50:29 2019 Return-Path: Delivered-To: svn-src-all@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 E0C58F2477; Wed, 4 Sep 2019 13:50:29 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 46NlZY5dW2z4KQh; Wed, 4 Sep 2019 13:50:29 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f54.google.com with SMTP id d10so8112039lfi.0; Wed, 04 Sep 2019 06:50:29 -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=g4XRptIAkYvcbZnAEAkRHbkcYUEyJO1tU9R6wFmPNQw=; b=Xd7WYVuFoYSyaWTeyjd2r8g7gAEygH/DCmvk4LKX7tg4KmnS12EYnfYBdmylSIiPO6 GJEWzWqiGi+zkRg/Fjg/tZNL/xHVts0sFz+yNJPpZ512gkO4T9PNoYD5456Ssv/kWckW MzBZ6Iy8bUCMQ1nTmlindLnT2TRFCIdNGGWxPl4OuCATumq0BHEYeEnFt1ya1inKqY/o QBd89jZYeUHmMCa3E2cAhS61dUe+qMvcL1cGHigsU9u/hDaJX3BML6RZH+z/FPz41dxt xQrCL1cSY9ek5MGTNzEOmDMNmXu/M9eks5Pi8lnIKLT6V48rX8IWeT0p4m9qUH3KwVyX +jEA== X-Gm-Message-State: APjAAAU34eSQ3hht8ZYehASVS9DXwAs4nM37LSsrofOJW0WmcibXQdUY VLQWozahOqDJ/WSJx/eHShLecYiHYQ9QNGXv0/YY5lJhNdI= X-Google-Smtp-Source: APXvYqxpvSYNWSdGzUAdFe1Z9Lg8q4lVxFGs8qH+64bSlyUr4tC/o5SkvXAcMRhzAToM6DC/7HPV9XILa0T/6NIq0Zg= X-Received: by 2002:ac2:51ce:: with SMTP id u14mr17231437lfm.72.1567605027182; Wed, 04 Sep 2019 06:50:27 -0700 (PDT) MIME-Version: 1.0 References: <201909041347.x84Dlcds017291@repo.freebsd.org> In-Reply-To: <201909041347.x84Dlcds017291@repo.freebsd.org> From: Alan Somers Date: Wed, 4 Sep 2019 07:50:15 -0600 Message-ID: Subject: Re: svn commit: r351812 - head/usr.sbin/mpsutil To: Andriy Gapon Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46NlZY5dW2z4KQh 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.983,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2019 13:50:29 -0000 On Wed, Sep 4, 2019 at 7:47 AM Andriy Gapon 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?