aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mpsutil
Commit message (Collapse)AuthorAgeFilesLines
* mpsutil(8): Remove trailing whitespaceGordon Bergling2020-12-191-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368812
* Improve unit parsing of mpsutil.Juli Mallett2020-06-161-1/+15
| | | | | | | | | | | | | | | | | | Previously, it used atoi(3) to parse the unit parameter, which would silently yield a unit of 0 in the presence of an invalid unit number. As most users of mpsutil(8) are likely to have at least a unit 0, this is could have confusing results. This behaviour was particularly unintuitive if one incorrectly passed an adapter device name, or a device path, instead of a unit number. In addition to using strtoumax(3) instead of atoi(3) to parse unit numbers, support stripping a device name (e.g. mps1) or path (e.g. /dev/mps2) to just its unit number. Reviewed by: scottl (earlier version) Notes: svn path=/head/; revision=362236
* Add support for some IOCFacts fields that are available with mpr (12Gb)Scott Long2020-04-161-0/+7
| | | | | | | | controllers. It's ugly due to the single codebase for mpr and mps and not being able to share their respective headers. Notes: svn path=/head/; revision=360003
* Don't keep a private copy of mpr_ioctl.h and mps_ioctl.h, since theyScott Long2020-04-163-781/+2
| | | | | | | easily get out of sync with the real files from the driver. Notes: svn path=/head/; revision=360002
* Advertise the MPI Message Version that's contained in the IOCFacts messageScott Long2020-02-071-4/+17
| | | | | | | | | | | | in the sysctl block for the driver. mpsutil/mprutil needs this so it can know how big of a buffer to allocate when requesting the IOCFacts from the controller. This eliminates the kernel console messages about wrong allocation sizes. Reported by: imp Notes: svn path=/head/; revision=357651
* Touch up some of the iocfacts fieldsScott Long2020-02-071-2/+4
| | | | Notes: svn path=/head/; revision=357650
* mpsutil slot set statusAndriy Gapon2019-09-044-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=351812
* Pass data pointers to the driver in way in expects.Alexander Motin2019-05-301-4/+9
| | | | | | | | | | | Probably due to historical reasons the driver uses In/Out arguments in odd way. While this tool still never uses Out arguments to see that, make the code to not trigger EINVAL in possible future uses. MFC after: 2 weeks Notes: svn path=/head/; revision=348422
* Regularize the Netflix copyrightWarner Losh2019-02-044-4/+0
| | | | | | | | | | | | | | | Use recent best practices for Copyright form at the top of the license: 1. Remove all the All Rights Reserved clauses on our stuff. Where we piggybacked others, use a separate line to make things clear. 2. Use "Netflix, Inc." everywhere. 3. Use a single line for the copyright for grep friendliness. 4. Use date ranges in all places for our stuff. Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files) Notes: svn path=/head/; revision=343755
* mpsutil: correct styleEitan Adler2018-05-231-2/+1
| | | | | | | Reported by: bapt Notes: svn path=/head/; revision=334085
* mpsutil: add missing bracesEitan Adler2018-05-231-2/+4
| | | | | | | Obtained from: DragonFly (c5d53f11a9510c5c79e196857a1200925fffacc8) Notes: svn path=/head/; revision=334075
* Add a new 'debug' command tree and 'dump_reqs' command to grab and parseScott Long2018-03-125-3/+246
| | | | | | | | | command and chain frames of in-flight I/O from the driver. Sponsored by: Netflix Notes: svn path=/head/; revision=330790
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Fix some broken logic used in obtaining the certain config pages. I'mScott Long2017-07-271-2/+1
| | | | | | | | | | surprised that this even pretended to work. PR: 215793 Submitted by: longwitz@incore.de Notes: svn path=/head/; revision=321604
* Show more fields in the IOCFact messageScott Long2017-05-051-0/+13
| | | | Notes: svn path=/head/; revision=317838
* mpsutil(8): let calloc(3) do the multiplying.Pedro F. Giffuni2017-03-131-1/+1
| | | | Notes: svn path=/head/; revision=315214
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-1/+1
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Plug various resources leakBaptiste Daroussin2016-04-201-1/+13
| | | | | | | | | | | While here fix a test logic Reported by: coverity CID: 1332096, 1332097, 1332098, 1332099, 1332100, 1332101, 1332102 MFC after: 1 week Notes: svn path=/head/; revision=298381
* Plug leaksBaptiste Daroussin2016-04-201-0/+8
| | | | | | | | | Reported by: Coverity CID: 1340155 and 1340156 MFC after: 1 week Notes: svn path=/head/; revision=298374
* Fix type mismatches for malloc(3) and Co.Ulrich Spörlein2015-12-291-1/+1
| | | | | | | | | | | | This is rather pedantic, as for most architectures it holds that sizeof(type *) == sizeof(type **) Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722 Notes: svn path=/head/; revision=292864
* mpsutil/mprutil: add flash subcommandBaptiste Daroussin2015-11-175-4/+338
| | | | | | | | | | | | | | the flash subcommand allows to save/update firmware and bios for LSI Fusion-MPT 2/3 controllers (mps(4) and mpr(4)) Tested by: allanjude Reviewed by: wblock (manpage) Relnotes: yes Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D4026 Notes: svn path=/head/; revision=291002
* Include libutil's headers directly from src to avoid recording a dirdepsBryan Drewery2015-10-282-2/+2
| | | | | | | dependency for META MODE. Notes: svn path=/head/; revision=290115
* Connect mpsutil for META MODE.Bryan Drewery2015-10-281-0/+19
| | | | Notes: svn path=/head/; revision=290113
* Fix a typo in the comment about the include guardBaptiste Daroussin2015-10-281-1/+1
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290098
* Remove more of the mptutil unused codeBaptiste Daroussin2015-10-281-33/+0
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290096
* Remove some unused code from the mptutil(8)Baptiste Daroussin2015-10-282-105/+0
| | | | | | | | | | The code from mptutil living in the same source tree the day those functions will be implemented in the mpsutil(8) it can be copy/paste easily Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290095
* Reduce overlinking, for now neither cam nor libutil are neededBaptiste Daroussin2015-10-281-2/+1
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290093
* Do enforce "-g", DEBUG_FLAGS can be user if one want to set itBaptiste Daroussin2015-10-281-1/+1
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290092
* Replace the manpage with one that actually describes the utilityBaptiste Daroussin2015-10-282-317/+50
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=290091
* Add copyright for Netflix for the files that changed from mptutilScott Long2015-10-273-0/+12
| | | | Notes: svn path=/projects/mpsutil/; revision=290061
* Remove mps_config.c, it's unused.Scott Long2015-10-271-1173/+0
| | | | Notes: svn path=/projects/mpsutil/; revision=290060
* Remove the now not needed diff used to switch the tool from mps to mprBaptiste Daroussin2015-10-161-68/+0
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=289416
* Fix some alignement in the outputBaptiste Daroussin2015-10-151-11/+20
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=289370
* Add generic storage structure for both mpr and mps to simplify codeBaptiste Daroussin2015-10-152-12/+51
| | | | | | | | | | Use correct ioctl on mpr Prevent duplication in headers between mps_ioctl.h and mpr_ioctl.h Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=289366
* Correctly print the device name of the adapterBaptiste Daroussin2015-10-151-1/+1
| | | | | | | Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=289365
* Make mpsutil open the mpr devices when named mprutilBaptiste Daroussin2015-10-155-4/+10
| | | | | | | | | Make mprutil a hardlink to mpsutil Sponsored by: Gandi.net Notes: svn path=/projects/mpsutil/; revision=289364
* Fix buildworldBaptiste Daroussin2015-08-141-1/+1
| | | | | | | Sponsored by: gandi.net Notes: svn path=/projects/mpsutil/; revision=286769
* Iniital hack of mpsutilScott Long2015-08-0210-0/+4302
Notes: svn path=/projects/mpsutil/; revision=286180