Commit graph

19 commits

Author SHA1 Message Date
Mark Johnston d56ce5915c mpsutil: Clean up libutil deps
mpsutil doesn't use libutil, so doesn't need to include libutil.h.  See
commit 76103694a0.

No functional change intended.

MFC after:	1 week
2024-01-24 17:10:24 -05:00
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Alexander Motin 7bca09e2bb mpsutil: Add higher PCIe speeds.
There are already PCIe Gen4 HBAs, reported improperly.

MFC after:	1 week
2023-11-03 11:49:59 -04:00
Warner Losh da5432eda8 Remove $FreeBSD$: alt two-line .c pattern
Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n\n/
2023-08-16 11:54:48 -06:00
Alexander Motin bce02a0ea4 mpsutil: Fix device speed reporting.
Report controller SAS phy speed only for directly attached devices.
For others try to read and report parent expander phy speed.

MFC after:	1 week
2022-05-09 18:03:24 -04:00
Alexander Motin f5b0083302 mpsutil: Fix data truncation by too short buffers.
Length of some string buffers was insufficient for cases of more that
99 targets per HBA or slots per enclosure.  Some others are tuned just
for better alignment.  While there also fix output formatting issues.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2021-11-29 20:20:03 -05:00
Daniel Austin e2ea6942ab mpsutil: extend show adapter information, add NCQ control
'show adapter' now shows PCIe width and speed, IOC Speed, and the
temperature of the controller.

A new command, 'set ncq', is added.
It enables or disables SATA NCQ in the NVRAM of the card.
Its current setting is added to 'show adapter' as well.

PR:		254841
MFC after:	2 weeks
Relnotes:	perhaps
2021-05-07 15:22:22 +03:00
Alfredo Dal'Ava Junior fc9780fd41 mprutil: add big endian support
This fix mprutil on big endian platforms, as follow up of D25785.

Flash operations are still not working, such as MPI2_FUNCTION_FW_UPLOAD
failing due to timeout.

Firmware version used during tests: 16.00.01.00

Submitted by:	Andre Fernando da Silva <andre.silva@eldorado.org.br>
Reviewed by:	luporl, Sreekanth Reddy <sreekanth.reddy@broadcom.com> (by e-mail)
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D26040
2021-04-20 19:19:47 -03:00
Scott Long 3859e5c3c6 Add support for some IOCFacts fields that are available with mpr (12Gb)
controllers.  It's ugly due to the single codebase for mpr and mps and
not being able to share their respective headers.
2020-04-16 04:17:06 +00:00
Scott Long b041593ae7 Touch up some of the iocfacts fields 2020-02-07 11:48:26 +00:00
Warner Losh 52467047aa Regularize the Netflix copyright
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)
2019-02-04 21:28:25 +00:00
Scott Long b3995bb872 Add a new 'debug' command tree and 'dump_reqs' command to grab and parse
command and chain frames of in-flight I/O from the driver.

Sponsored by:	Netflix
2018-03-12 05:03:32 +00:00
Scott Long e8262ee824 Show more fields in the IOCFact message 2017-05-05 17:01:54 +00:00
Baptiste Daroussin 0ce8c4a33c Plug various resources leak
While here fix a test logic

Reported by:	coverity
CID:		1332096, 1332097, 1332098, 1332099, 1332100, 1332101, 1332102
MFC after:	1 week
2016-04-20 21:32:34 +00:00
Scott Long 883bb7e941 Add copyright for Netflix for the files that changed from mptutil 2015-10-27 20:56:57 +00:00
Baptiste Daroussin 9b51f8578a Fix some alignement in the output
Sponsored by:	Gandi.net
2015-10-15 17:16:17 +00:00
Baptiste Daroussin 3f4fe35d6c Correctly print the device name of the adapter
Sponsored by:	Gandi.net
2015-10-15 15:24:13 +00:00
Baptiste Daroussin 48f31f4fef Make mpsutil open the mpr devices when named mprutil
Make mprutil a hardlink to mpsutil

Sponsored by:	Gandi.net
2015-10-15 15:19:38 +00:00
Scott Long 29b76e539f Iniital hack of mpsutil 2015-08-02 03:52:51 +00:00