aboutsummaryrefslogtreecommitdiff
path: root/sbin/nvmecontrol/identify_ext.c
Commit message (Collapse)AuthorAgeFilesLines
* nvmecontrol: Display additional Fabrics-related fields for cdataJohn Baldwin2024-03-231-0/+51
| | | | | | | | | | | Some of these fields are specific to Fabrics controllers (such as the size of capsules) while other fields are shared with PCI-e controllers, but are more relevant for Fabrics controllers (such as KeepAlive timer properties). Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44449
* nvmecontrol: Use the NVMEV macro instead of expanded versionsJohn Baldwin2024-01-291-90/+59
| | | | | | Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43597
* sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | 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
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* nvmecontrol: Fix IEEE OUI Identifier outputWanpeng Qian2022-11-201-1/+1
| | | | | | | | | | | | Current sequence of IEEE OUI Identifier output is wrong. For Intel, current output is e4 d2 5c, specification is 5CD2E4h For Samsung, current output is 38 25 00, specification is 002538h also check with Linux nvme-cli. Reviewed by: imp, chuck MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33856
* nvmecontrol: Fix condition when print number of Firmware Slots and Firmware ↵Wanpeng Qian2022-11-151-10/+2
| | | | | | | | | | | | | Slot1 Readonly. The Number of Firmware Slots should never be zero. So, a Firmware Slot 1 should always exist. For that reason, always print the Number of Firmware Slots and the Firmware Slot 1 Read-Only value. Reviewed by: imp Approved by: manu (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34700
* nvmecontrol: Display Metadata and Sanitize capabilities of the deviceAllan Jude2021-09-211-0/+32
| | | | | | | | | | | | | | | | Determine if a device supports "Extended" or "Separate" metadata, and what the current metadata setting is (None, Extended, Separate) Also determine if the device supports: - Sanitize Crypto Erase - Sanitize Block Erase - Sanitize Overwrite Reviewed by: chuck Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. X-NetApp-PR: #49 Differential Revision: https://reviews.freebsd.org/D31067
* nvmecontrol: fix typo (s/Managment/Management/)Edward Tomasz Napierala2021-05-071-1/+1
| | | | Reported By: pstef
* Honor the FWUG value of some drives in nvmecontrolDavid Bright2020-09-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | nvmecontrol tries to upload firmware in chunks as large as it thinks the device permits. It fails to take into account the FWUG value used by some drives to advertise the size and alignment limits for firmware chunks. - Use the firwmare update granularity value from the - If the granularity is not reported or not restricted, fall back to the previously existing logic that calculates the max transfer size based on MDTS. - Add firmware update granularity to the identify-controller output. Reviewed by: imp (previous version), chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390 Notes: svn path=/head/; revision=365948
* Fix host memory buffer sizes reporting.Alexander Motin2020-01-061-2/+4
| | | | | | | | | Hardware reports values in 4KB units, not in bytes. MFC after: 3 days Notes: svn path=/head/; revision=356392
* Report the Host Buffer Memory minimum and preferred sizes.Warner Losh2019-09-041-0/+2
| | | | | | | | | | The Host Buffer feature (NVMe 1.4 section 89) allows for the NVMe card request the host provide it buffer for lookaside tables and maybe other things. Report the card's minimum and preferred sizes with nvmecontrol/camcontrol identify. Notes: svn path=/head/; revision=351824
* Print few more useful identify fields.Alexander Motin2019-08-141-10/+11
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=351038
* Add `nvmecontrol sanitize` command.Alexander Motin2019-08-031-3/+3
| | | | | | | | | | | | | | | It allows to delete all user data from NVM subsystem in one of 3 methods. It is a close equivalent of SCSI SANITIZE command of `camcontrol sanitize`, so I tried to keep arguments as close as possible. While there, fix supported sanitize methods reporting in `identify`. MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350563
* Add IOCTL to translate nvdX into nvmeY and NSID.Alexander Motin2019-08-011-0/+1
| | | | | | | | | | | | | | | While very useful by itself, it also makes `nvmecontrol` not depend on hardcoded device names parsing, that in its turn makes simple to take nvdX (and potentially any other) device names as arguments. Also added IOCTL bypass from nvdX to respective nvmeYnsZ makes them interchangeable for management purposes. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350523
* Feature-complete NVMe Namespace Management.Alexander Motin2019-07-311-1/+1
| | | | | | | | | | | | | | | | | | This adds several previously missed but important subcommands to list namespaces and controllers. It also fixes few previously added but just found with real testing to be broken subcommands. Also while there, add possibility to explicitly specify nsid for `nvmecontrol identify` subcommand. It may be useful to specify nsids not having own devices, for example 0xffffffff, or just newly created ones. MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350477
* Add some new fields and bits from NVMe 1.4.Alexander Motin2019-07-291-7/+30
| | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350399
* Make it possible to use print_controller from another programWarner Losh2018-06-131-0/+223
Rename print_controller to nvme_print_controller. Put it in its own file for easy inclusion. Move util.c to be nc_util.c to not conflict with camcontrol. add nvecontrol_ext.h to define shared interfaces. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D15371 Notes: svn path=/head/; revision=335091