History log of /freebsd-head/usr.sbin/mfiutil/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bf78455d4964ea12399464b383d140a992f5ad84 13-Oct-2018 allanjude <allanjude@FreeBSD.org> Make `mfiutil show progress` print out the elapsed time estimate in a
more humanized way

PR: 225993
Submitted by: Enji Cooper <yaneurabeya@gmail.com>
Reviewed by: jhb (previous version)
Approved by: re (rgrimes)
fi_cmd.c
7551d83c353e040b32c6ac205e577dbc5f2c8955 27-Nov-2017 pfg <pfg@FreeBSD.org> various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
fi_bbu.c
fi_cmd.c
fi_config.c
fi_drive.c
fi_evt.c
fi_flash.c
fi_foreign.c
fi_patrol.c
fi_properties.c
fi_show.c
fi_volume.c
fiutil.c
fiutil.h
a598c4b809a73772d7452991213407cdac302156 31-Oct-2017 bdrewery <bdrewery@FreeBSD.org> DIRDEPS_BUILD: Update dependencies.

Sponsored by: Dell EMC Isilon
akefile.depend
c5763809c3c4098a2baaa62d652e3d39a416949f 09-Jan-2017 dim <dim@FreeBSD.org> Avoid taking the address of a packed struct member in mfiutil

Fix a clang 4.0.0 warning about taking the address of a packed member of
struct mfi_evt in mfiutil:

usr.sbin/mfiutil/mfi_evt.c:583:30: error: taking address of packed
member 'members' of class or structure 'mfi_evt' may result in an
unaligned pointer value [-Werror,-Waddress-of-packed-member]
if (parse_locale(optarg, &filter.members.locale) < 0) {
^~~~~~~~~~~~~~~~~~~~~

Use a local variable instead, and copy that into the struct.

Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9069
fi_evt.c
21a3003f8f5c49c0acbcb49462e5b221076076d0 21-Oct-2015 eadler <eadler@FreeBSD.org> Fix a ton of speelling errors

arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
fiutil.8
49665ccf8436f3b237a1238ba6d27222ff11f628 03-Jul-2015 emaste <emaste@FreeBSD.org> mfiutil: increase buffer size to accommodate sprintf string

PR: 201289
MFC after: 1 week
fi_foreign.c
008d7c831feeec7a3430b92f009e28762c6740f1 13-Jun-2015 sjg <sjg@FreeBSD.org> Add META_MODE support.

Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision: D2796
Reviewed by: brooks imp
75a137820de70f75cd932fd2fa365fabaf06fa90 08-Jun-2015 sjg <sjg@FreeBSD.org> dirdeps.mk now sets DEP_RELDIR
akefile.depend
65145fa4c81da358fcbc3b650156dab705dfa34e 27-May-2015 sjg <sjg@FreeBSD.org> Merge sync of head
a191ba5195ecb988c5e5c3b13fc364bde87bd41c 25-Nov-2014 bapt <bapt@FreeBSD.org> Convert usr.sbin to LIBADD
Reduce overlinking
akefile
b137080f19736ee33fede2e88bb54438604cf86b 19-Nov-2014 sjg <sjg@FreeBSD.org> Merge from head@274682
760632e68b9840cf3eaffa7b03b9a39b2ba4e2f1 19-Sep-2014 smh <smh@FreeBSD.org> Style (9) fixes, spaces to tabs.

Fix style issues noticed when I went to MFC r257820

MFC after: 2 days
X-MFC-With: r257820
Sponsored by: Multiplay
fi_properties.c
5860f0d10657dc9748acf6637885ee7fbf6fb212 16-May-2014 sjg <sjg@FreeBSD.org> Updated dependencies
akefile.depend
1a7e48acf1acf8cb3ef3ba6787cc57e18faa8479 10-May-2014 sjg <sjg@FreeBSD.org> Updated dependencies
akefile.depend
5e568154a01fb6be74908baed265f265a56f002f 28-Apr-2014 sjg <sjg@FreeBSD.org> Merge head
5022630d02f5b911fe694cc20729470ba0fd4ba9 22-Apr-2014 jhb <jhb@FreeBSD.org> - Fix an off by one error when checking for the stop event. This resulted
in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop fetching
more events.

MFC after: 1 week
fi_evt.c
e0eab30ea6b68b98dc68f4728bbc07d8c02fd52d 22-Apr-2014 jhb <jhb@FreeBSD.org> Don't claim the adapter is idle if it is clearing a drive.

MFC after: 1 week
fi_show.c
3c9bc33d22e5a91db618a04de190a08403ef2833 05-Jan-2014 dim <dim@FreeBSD.org> Split the last gcc-specific flags off into CFLAGS.gcc. This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC after: 3 days
akefile
331df588a3a00383921f95802a9cd6c8aea90385 04-Dec-2013 sbruno <sbruno@FreeBSD.org> svn r251516 resized the buf argument a bit too much. Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR: 184405
Submitted by: jhb
MFC after: 2 weeks
fi_show.c
4372cfee12af5dfa890561beb0fecc90957ba058 12-Nov-2013 sbruno <sbruno@FreeBSD.org> Noted that the stripe_size argument was not being displayed in the usage
message

MFC after: 2 weeks
fiutil.c
de41d3d4e5addeb2e234ae470687de1fa91388f3 08-Nov-2013 joel <joel@FreeBSD.org> mdoc: remove superfluous paragraph macro.
fiutil.8
589c16735a5f7c7aa16ed0e7aa16c2b30ff3f799 07-Nov-2013 sbruno <sbruno@FreeBSD.org> Add support for controlling mfi(4) controller properties:

allow user control of rebuild rate
allow user control of silence/enable alarm

MFC after: 2 weeks
Sponsored by: Yahoo! Inc.
akefile
fi_properties.c
fiutil.8
fiutil.c
62bb1062226d3ce6a2350808256a25508978352d 05-Sep-2013 sjg <sjg@FreeBSD.org> Merge from head
e4264da0148d9f7d7d4e66dad41550def2e64dbe 26-Aug-2013 sbruno <sbruno@FreeBSD.org> Add support to reconfigure a drive as SYSPD (real JBOD in LSI
terminology).

Adds command "mfiutil syspd <drive#>" to change a drive to SYSPD. Drive
will then be scanned/reported immediately as /dev/mfisyspdX by the host.

"mfiutil good <drive#>" clears SYSPD mode, remove /dev/mfisyspdX and
sets disk into UNCONFIGURED mode.

Tested on Dell H310 SAS/SATA RAID controller.

MFC after: 2 weeks
Sponsored by: Yahoo! Inc.
fi_drive.c
fiutil.8
fiutil.c
37b928c8dd24faa44a546c9964740f90d7d4a9f0 08-Jun-2013 sbruno <sbruno@FreeBSD.org> Implement foreign volume handling. Allows admins to view foreign metadata
and clear or import it for use.

PR: kern/172091
Submitted by: smh@freebsd.org
Reviewed by: jhb@freebsd.org
MFC after: 2 weeks
akefile
fi_config.c
fi_foreign.c
fi_show.c
fiutil.8
fiutil.c
fiutil.h
3ab4b4db19663ed22fdaf264f9401d1d2a38371d 13-May-2013 markj <markj@FreeBSD.org> Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.

MFC in: 3 days
Sponsored by: Sandvine Inc.
fiutil.8
97d8b9495668afa398ab17c8c5f7e223b5fd2e89 12-Apr-2013 sjg <sjg@FreeBSD.org> sync from head
52f6f6d83eb2c4356b916617d45ecd58d775c3bd 08-Apr-2013 markj <markj@FreeBSD.org> Switch to a 2-clause license.

Approved by: emaste (co-mentor)
X-MFC with: r249257
fi_bbu.c
a0696b397d54d11a134b0d601561b8b3a89a74c5 08-Apr-2013 markj <markj@FreeBSD.org> Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.

Reviewed by: sbruno, rstone
Tested by: sbruno
Approved by: rstone (co-mentor)
MFC after: 2 weeks
Sponsored by: Sandvine Incorporated
akefile
fi_bbu.c
fi_show.c
fi_volume.c
fiutil.8
fiutil.c
fiutil.h
6d37b86f2b6abb5c0c11a9162e37ddc0ad94f01d 11-Mar-2013 sjg <sjg@FreeBSD.org> Updated dependencies
akefile.depend
0ee5295509f95c5780976697a2d3539b994458ca 16-Feb-2013 sjg <sjg@FreeBSD.org> Updated dependencies
akefile.depend
778e93c51a9acec095f583b174c7e6692442a9aa 04-Nov-2012 sjg <sjg@FreeBSD.org> Sync from head
e65c2d3d073186914cbb3ad3494d5da8b3bde8d5 20-Oct-2012 ed <ed@FreeBSD.org> Remove redundant code.

Both mfi_flash.c and mfi_show.c contain very similar functions to print
a list of firmwares. Move these routines into mfiutil.c.

Reported by: jhb
fi_flash.c
fi_show.c
fiutil.c
fiutil.h
af31e8843c2cc0ba388a33f341de8da1b50de433 19-Oct-2012 ed <ed@FreeBSD.org> More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
fi_flash.c
fi_show.c
fiutil.c
fiutil.h
9dd41e3647df728006e0749ac139cfeb773c3873 22-Aug-2012 marcel <marcel@FreeBSD.org> Sync FreeBSD's bmake branch with Juniper's internal bmake branch.

Requested by: Simon Gerraty <sjg@juniper.net>
akefile.depend
3d41a91978714ce2f467baf0c969a46da9e33131 20-Jun-2012 mjacob <mjacob@FreeBSD.org> Fix ARM compilation issue.

X-MFC: 237260
fi_drive.c
27063437e23a5e5e7debf9144ee974d21b6a6774 19-Jun-2012 eadler <eadler@FreeBSD.org> Add __unused macros to appropriate places in order to allow building
with WARNS=6 on base gcc, gcc46, and clang

Approved by: cperciva
MFC after: 1 week
akefile
fi_config.c
fi_evt.c
fi_patrol.c
fi_show.c
fiutil.c
a60d1f6e5a0fe73d35acfcd458741ca308c560d9 19-Jun-2012 eadler <eadler@FreeBSD.org> Allow users with RO privilege to the device to read the RO attributes.

PR: bin/167302
Submitted by: markham breitbach <markham@ssimicro.com>
Discussed with: pjd (briefly)
Approved by: cperciva
MFC after: 1 week
fi_cmd.c
fi_config.c
fi_drive.c
fi_evt.c
fi_flash.c
fi_patrol.c
fi_show.c
fi_volume.c
fiutil.c
fiutil.h
90b88756cf2b35e91f98b7526964eb9550d7eb5a 18-May-2012 sbruno <sbruno@FreeBSD.org> Decode new battery status indications.

Requires r235634

Reviewed by: ambrisko@
MFC after: 3 days
fi_show.c
06e0880c2c6395d0f2da6dcae05e046e60125225 30-Mar-2012 ambrisko <ambrisko@FreeBSD.org> MFhead_mfi r233621
Remove the magic mfi_array is 288 bytes and just use the
sizeof the array since it is not 288 bytes.

Change reporting of a "SYSTEM" disk to "JBOD" to match
LSI MegaCli and firmware reporting.

This means that fiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what
LSI defines JBOD to be. This should be fixed in the future
and support added to really create LSI JBOD and enable that
feature on cards that support it.
fi_config.c
fi_drive.c
906214101c2afe043c4e6b86c05dad9039220a42 26-Mar-2012 joel <joel@FreeBSD.org> mdoc: correct .Bd/.Bl arguments.

Reviewed by: brueffer
fiutil.8
e3d7180447c5fc74affad803a76f4a7321bc99b2 25-Mar-2012 joel <joel@FreeBSD.org> Remove superfluous paragraph macro.
fiutil.8
d43195ec0022154719bf601524dc427f9725a4f2 05-Dec-2011 jhb <jhb@FreeBSD.org> Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP
arguments.

MFC after: 2 weeks
fi_evt.c
b050d953ee0f6fb7e2303645b5089b4e0b456f0c 29-Nov-2011 delphij <delphij@FreeBSD.org> In build_volume(), check if arrays is allocated before traversing its
items. While parsing the arrays input, it's possible that we reach the
error path before initializing the 'arrays' pointer, which in turn leads
to a NULL deference.

Submitted by: Garrett Cooper
MFC after: 1 week
fi_config.c
d213dca17e7d1aaff815178dbdbc90e9ef95f20a 23-Nov-2011 emaste <emaste@FreeBSD.org> Avoid double free creating a new RAID with invalid command line arguments.

Submitted by: Xin Huang <xhuang sandvine com>
Reviewed by: rstone@
MFC after: 1 week
fi_config.c
42f9fc1b3f7f58b22e97447de2612dea4d1caae3 27-Sep-2011 emaste <emaste@FreeBSD.org> Improve battery capacity reporting

When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case. This should fix incorrect reporting for
systems with a dead or no battery.

Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display. LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)

Reviewd by: jhb, bz
Tested by: pluknet@, Garrett Cooper
PR: bin/160581
MFC after: 1 week
fi_show.c
8e8f8c09710429a771262ed9bbbf4d2475ef30bb 02-Sep-2011 jhb <jhb@FreeBSD.org> Move the logic to parse volume cache commands out into a separate function
and use a loop so that multiple cache commands can be strung together on
the command line into a single update to the volume's properties.

Reviewed by: bz
Approved by: re (kib)
MFC after: 1 week
fi_volume.c
fiutil.8
d491106e41e82491cb69f865172f26c93efad73b 25-Aug-2011 bz <bz@FreeBSD.org> If a drive is not part of the array (i.e. missing) we need to print the
new line after the pd state information as well, so move it to the outside
of the block.

Submitted by: Mark Johnston at Sandvine Inc
MFC atfer: 3 days
Approved by: re (kib)
fi_show.c
3b6f1df0b0ea32496af31645202e47a2cde44943 29-Jul-2011 jhb <jhb@FreeBSD.org> Properly initialize an error variable to avoid returning uninitialized
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.

Reviewed by: bz
Approved by: re (kib)
MFC after: 3 days
fi_show.c
418b801093824d8d298b6dac4f1dac43eb52a0ec 20-Jun-2011 bz <bz@FreeBSD.org> Add global -d and -e options to either print device numbers
(usually default) or enclosure:slot information as (Exx:Sxx)
or both.

Discussed with: jhb
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week
fi_config.c
fi_drive.c
fi_patrol.c
fi_show.c
fiutil.8
fiutil.c
fiutil.h
da942889984f18ff6a60c69d0cad0e0410452e1f 18-Jun-2011 bz <bz@FreeBSD.org> Add 'show logstate' to usage().

MFC after: 1 week
fiutil.c
7c90f6cd22233b1b4a920e14e037a09b3f7c936e 09-Jun-2011 bz <bz@FreeBSD.org> Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by: Mark Johnston (1)
Reported by: attilio (2)
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week
fi_config.c
fi_drive.c
fi_evt.c
fi_flash.c
fi_patrol.c
fi_show.c
fi_volume.c
11e6bdb86e206bb45b2edb0ce2c5c7496bb19032 02-Jun-2011 emaste <emaste@FreeBSD.org> There are a couple of structs in mfireg.h with members named 'class'.
These cause problems when trying to include the header in a C++ project.
Rename them to 'evt_class', and track the change in mfi and mfiutil.

Submitted by: Mark Johnston
Sponsored by: Sandvine Incorporated
Reviewed by: jhb@
MFC after: 1 week
fi_evt.c
bcef521d66b1338ea7358d1a0093997a550257dd 29-Apr-2011 jhb <jhb@FreeBSD.org> Add a 'show progress' command that shows a summary of all in-progress
commands for a given adapter. Specifically, it shows the status of any
drive or volume activities currently in progress similar to the
'drive process' and 'volume progress' commands.

Reviewed by: emaste
MFC after: 1 week
fi_show.c
fiutil.8
fiutil.c
334823faa14810bc193788d6b1455a64f857f842 27-Apr-2011 pluknet <pluknet@FreeBSD.org> Fix typo in "continuously" argument used in patrol auto command.

Obtained from: Sascha Wildner <saw att online dott de>
Approved by: jhb
MFC after: 3 days
fi_patrol.c
4fde1ce654bbaabe7c045d8f2cc469c73b079816 05-Apr-2011 jhb <jhb@FreeBSD.org> Add the ability to manage the state of write caching when the battery
back-up is missing or dead. The current state of this field is reported
in 'mfiutil cache <volume>' and can be adjusted via
'mfiutil cache <volume> bad-bbu-write-cache <enable|disable>'. This
setting should generally be disabled to avoid data loss.

MFC after: 1 week
fi_volume.c
fiutil.8
1ad2b561109c6521ad0385ceeb1aefa4cd6308f4 17-Mar-2011 jhb <jhb@FreeBSD.org> Preserve errno in an error case.

Submitted by: gcooper
fi_show.c
01b38dc45fe2977581079baaa0d9ae652c44be67 17-Mar-2011 jhb <jhb@FreeBSD.org> Add more details to the 'show battery' command including more raw
capacity values, charge cycle count, temperature, and more detailed
status.

Reviewed by: bz, emaste (older version)
MFC after: 1 week
fi_show.c
7d4c7b1304581c3271a1ded2c9595ec5df95f8eb 25-Feb-2011 pluknet <pluknet@FreeBSD.org> Fix division by zero, causing floating point exception in a drive progress
command.

It was possible to read a value of zero from a busy controller used
as the divisor to calculate the remaining rebuild time.

Reported by: Pavel Udovenko <udovenko att nic.ru>
Discussed with: jhb
Approved by: kib (mentor)
MFC after: 1 week
fi_cmd.c
449d913c20819058a063d7c371493b6ecfb9d567 19-Nov-2010 jhb <jhb@FreeBSD.org> Handle malloc() failures more gracefully by error'ing out rather than
segfaulting.

Submitted by: gcooper
MFC after: 1 week
fi_config.c
fi_evt.c
fi_flash.c
8362b61a773d05139a09c6c1b359e8f7248ec4a0 04-Nov-2010 bcr <bcr@FreeBSD.org> Fix typo.
fi_cmd.c
ab04f918b77c07762793bcfd5fa21844569f68e5 26-Oct-2010 jhb <jhb@FreeBSD.org> - Save errno values before calling warn(3) so that errors are correctly
reported.
- Use powerof2() from <sys/param.h> rather than a copy and paste version.

Submitted by: gcooper
MFC after: 1 week
fi_config.c
fi_drive.c
fi_evt.c
fi_flash.c
fi_patrol.c
fi_show.c
fi_volume.c
5697d0d3c3405d5be9f932e83ff517492d3251bb 21-Oct-2010 pluknet <pluknet@FreeBSD.org> Enable copyback and system PD states.

Reviewed by: jhb
Approved by: avg (mentor)
MFC after: 1 week
X-MFC-After: r214130
fi_drive.c
f3e9ac8a0e36d292c00b1ccd9b765977050ce24a 10-Oct-2010 randi <randi@FreeBSD.org> Fix compile with -DDEBUG by using the correct mfi_pd_ref union definition
in mfireg.h.

Submitted by: gcooper
Reviewed by: jhb
Approved by: cperciva (mentor)
MFC after: 1 week
fi_config.c
0c20df57142d35275da70129f25b2bd2a67d7d60 10-Oct-2010 randi <randi@FreeBSD.org> Report subcommand handler errors in mfiutil/mptutil so that tools that
invoke the utilities can robustly report errors.

Submitted by: gcooper
Reviewed by: jhb
Approved by: cperciva (mentor)
MFC after: 1 week
fiutil.c
f4e8725880aad15a64790723505167159829163a 06-Aug-2010 joel <joel@FreeBSD.org> Fix typos and spelling mistakes.
fiutil.8
224caf9be079f885897539cd3f0e35e3573a62f6 01-Aug-2010 joel <joel@FreeBSD.org> Spelling fixes.
fiutil.8
4d27ff91d01ec406d08089baae33529e85e9868f 25-Feb-2010 ru <ru@FreeBSD.org> Fixed dependencies (make checkdpadd).
akefile
0efc788ababf17bf1f75626f7ba8a62b66a1ca56 17-Aug-2009 scottl <scottl@FreeBSD.org> Update the man page for manual section 8

Approved by: re
fiutil.8
5d1f91733260e4a962e02c416ad49a3cdb8c16f4 17-Aug-2009 scottl <scottl@FreeBSD.org> Update the man page for FreeBSD 8.0

Approved by: re
fiutil.8
6192c3dbaf79969f3291106bcc73edcb3b382dfc 17-Aug-2009 scottl <scottl@FreeBSD.org> Move mfiutil.1 to mfiutil.8 for consistency. Remove superfulous README.

Approved by: re
akefile
EADME
fiutil.1
fiutil.8
4677d973d9b64776848cc45552ca132a52e768de 14-Aug-2009 scottl <scottl@FreeBSD.org> Fix is 32bit bug missed in testing.

Approved by: re
fi_drive.c
f0c0cd58a9223f8725e2816f60d24a24e70e56af 13-Aug-2009 scottl <scottl@FreeBSD.org> ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6
controllers. Controller, array, and drive status can be checked, basic
attributes can be changed, and arrays and spares can be created and deleted.
Controller firmware can also be flashed.

This does not replace MegaCLI, found in ports, as that is officially sanctioned
and supported by LSI and includes vastly more functionality. However, mfiutil
is open source and guaranteed to provide basic functionality, which can be
especially useful if you have a problem and can't get MegaCLI to work.

Approved by: re
Obtained from: Yahoo! Inc.
akefile
EADME
fi_cmd.c
fi_config.c
fi_drive.c
fi_evt.c
fi_flash.c
fi_patrol.c
fi_show.c
fi_volume.c
fiutil.1
fiutil.c
fiutil.h