summaryrefslogtreecommitdiffstats
path: root/sbin/nvmecontrol
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260381:jimharris2014-05-071-2/+2
| | | | | | For "nvmecontrol devlist", show namespace sizes in terms of MB instead of GB to improve granularity of the reporting - especially for namespaces that are on the order of 1 or 2 GB.
* MFC r258071:jimharris2014-05-071-11/+24
| | | | | | Check for special status code from FIRMWARE_ACTIVATE command signifying that a reboot is required to complete activation of the requested firmware image.
* MFC r257531:jimharris2013-11-051-2/+0
| | | | | | | Do not exit with error status after printing data for perftest. Sponsored by: Intel Approved by: re (glebius)
* Extend some 32-bit fields and variables to 64-bit to prevent overflowjimharris2013-10-081-5/+7
| | | | | | | | | | when calculating stats in nvmecontrol perftest. Sponsored by: Intel Reported by: Joe Golio <joseph.golio@emc.com> Reviewed by: carl Approved by: re (hrs) MFC after: 1 week
* Add message when nvd disks are attached and detached.jimharris2013-07-193-8/+14
| | | | | | | | | | | | As part of this commit, add an nvme_strvis() function which borrows heavily from cam_strvis(). This will allow stripping of leading/trailing whitespace and also handle unprintable characters in model/serial numbers. This function goes into a new nvme_util.c file which is used by both the driver and nvmecontrol. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.jimharris2013-07-191-1/+1
| | | | | | | | | | Recent testing with QEMU that has variable sector size support for NVMe uncovered some of these issues. Chatham prototype boards supported only 512 byte sectors. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Use _PATH_DEV (from paths.h) for the "/dev/" string, rather thanjimharris2013-07-182-2/+4
| | | | | | | | | hard-coding it. Sponsored by: Intel Suggested by: kib Reviewed by: kib, carl MFC after: 3 days
* Simplify open_dev() by returning errno values rather than just 0 or 1.jimharris2013-07-182-15/+4
| | | | | | | | | Also remove stat() call and just rely on errno from open() call to discern whether dev node exists or not. Sponsored by: Intel Reviewed by: kib, carl MFC after: 3 days
* Define constants for the lengths of the serial number, model numberjimharris2013-07-172-4/+7
| | | | | | | | | | | and firmware revision in the controller's identify structure. Also modify consumers of these fields to ensure they only use the specified number of bytes for their respective fields. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Always initialize fd to 0 in open_dev().jimharris2013-07-171-0/+2
| | | | | | Sponsored by: Intel Reviewed by: carl MFC after: 3 days
* Do not throw an error if the user requests to activate the image fromjimharris2013-07-161-1/+1
| | | | | | | | | an empty firmware slot, as long as the user has specified a firmware image to download into the empty firmware slot. Sponsored by: Intel Reported by: Joe Golio <joseph.golio@emc.com> MFC after: 3 days
* %d should be used for printing int32_t instead of %zd.jimharris2013-07-121-1/+1
| | | | | | clang does not complain about this - only gcc. MFC after: 3 days
* Ensure controller or namespace node name is specified before trying tojimharris2013-07-092-1/+5
| | | | | | | | | | access it. While here, also fix the identify usage message to show the -v and -x parameters. Sponsored by: Intel MFC after: 3 days
* Condense the output for displaying LBA formats.jimharris2013-07-091-6/+4
| | | | | Sponsored by: Intel MFC after: 3 days
* Send per-namespace logpage commands to the controller devnode, so theyjimharris2013-07-094-57/+53
| | | | | | | | | | | are processed as admin commands, not I/O commands. As part of this change, pull out the code for parsing a namespace node string into a separate function, since it is used for both identify and logpage commands. Sponsored by: Intel MFC after: 3 days
* Try to read firmware image before prompting the user to confirmjimharris2013-07-091-1/+3
| | | | | | | | | firmware download. This correctly prints an error and exits for an incorrect firmware image name before prompting the user to confirm the download. Sponsored by: Intel MFC after: 3 days
* Incorporate feedback from bde@ based on r252672 changes:jimharris2013-07-097-204/+134
| | | | | | | | | | | | * Use 0/1 instead of sysexits. Man pages are confusing on this topic, but 0/1 is sufficient for nvmecontrol. * Use err function family where possible instead of fprintf/exit. * Fix some typing errors. * Clean up some error message inconsistencies. Sponsored by: Intel Submitted by: bde (parts of firmware.c changes) MFC after: 3 days
* Fix printf argument mismatch reported by gcc on i386.jimharris2013-07-041-2/+2
| | | | Reported by: kargl
* Fix build.glebius2013-06-272-2/+2
|
* Add firmware replacement and activation support to nvmecontrol(8) throughjimharris2013-06-275-1/+362
| | | | | | | | | | | | | | | | | | | | a new firmware command. NVMe controllers may support up to 7 firmware slots for storing of different firmware revisions. This new firmware command supports firmware replacement (i.e. firmware download) with or without immediate activation, or activation of a previously stored firmware image. It also supports selection of the firmware slot during replacement operations, using IDENTIFY information from the controller to check that the specified slot is valid. Newly activated firmware does not take effect until the new controller reset, either via a reboot or separate 'nvmecontrol reset' command to the same controller. Submitted by: Joe Golio <joseph.golio@emc.com> Obtained from: EMC / Isilon Storage Division MFC after: 3 days
* Add log page support to nvmecontrol(8) through a new logpage command.jimharris2013-06-265-1/+412
| | | | | | | | | | This includes pretty printers for all of the standard NVMe log pages (Error, SMART/Health, Firmware), as well as hex output for non-standard or vendor-specific log pages. Submitted by: Joe Golio <joseph.golio@emc.com> Obtained from: EMC / Isilon Storage Division MFC after: 3 days
* Add generalized helper functions for printing hex data as part ofjimharris2013-06-263-40/+51
| | | | | | | | nvmecontrol commands. Submitted by: Joe Golio <joseph.golio@emc.com> Obtained from: EMC / Isilon Storage Division MFC after: 3 days
* Ensure that a device node is specified when invoking the identify or resetjimharris2013-06-263-3/+27
| | | | | | | | | | commands. Also improve the checking of device node names, so that better error messages are displayed when incorrect names are specified. Sponsored by: Intel MFC after: 3 days
* Create #defines for NVME_CTRLR_PREFIX and NVME_NS_PREFIX for the "nvme"jimharris2013-06-263-4/+8
| | | | | | | | and "ns" strings, rather than hardcoding the string values throughout the nvmecontrol code base. Sponsored by: Intel MFC after: 3 days
* Add an nvme_function structure array, defining the name, C function andjimharris2013-06-262-16/+32
| | | | | | | | | | | | usage message for each nvmecontrol command. This helps reduce some code clutter both now and for future commits which will add logpage and firmware support to nvmecontrol(8). Also move helper function prototypes to the end of the header file, after the per-command functions. Sponsored by: Intel MFC after: 3 days
* Break out code related to the reset command into a separate source file.jimharris2013-06-264-32/+74
| | | | | Sponsored by: Intel MFC after: 3 days
* Break out code related to the perftest command into a separate file.jimharris2013-06-264-140/+183
| | | | | Sponsored by: Intel MFC after: 3 days
* Break out code related to the identify command into a separate source file.jimharris2013-06-264-280/+323
| | | | | Sponsored by: Intel MFC after: 3 days
* Break out code related to the devlist command into a separate source file.jimharris2013-06-264-92/+175
| | | | | Sponsored by: Intel MFC after: 3 days
* Add separate *_usage() functions for each nvmecontrol command.jimharris2013-06-261-7/+31
| | | | | Sponsored by: Intel MFC after: 3 days
* Add an open_dev() helper function to be used in the various placesjimharris2013-06-261-103/+63
| | | | | | | | where nvmecontrol needs to open a handle to a controller or namespace device node. Sponsored by: Intel MFC after: 3 days
* Remove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and ↵jimharris2013-04-121-34/+86
| | | | | | | | replace them with the NVMe passthrough equivalent. Sponsored by: Intel
* Fix typo (devicde -> device).jimharris2013-04-031-1/+1
|
* Use errno and strerror to print more descriptive messages when operationsjimharris2013-03-261-27/+41
| | | | | | | | | | | fail in nvmecontrol(8). While here, use consistent checks of return values from stat, open and ioctl. Sponsored by: Intel Suggested by: carl Reviewed by: carl
* Add controller reset capability to nvme(4) and ability to explicitlyjimharris2013-03-262-2/+51
| | | | | | | | | | | | | | invoke it from nvmecontrol(8). Controller reset will be performed in cases where I/O are repeatedly timing out, the controller reports an unrecoverable condition, or when explicitly requested via IOCTL or an nvme consumer. Since the controller may be in such a state where it cannot even process queue deletion requests, we will perform a controller reset without trying to clean up anything on the controller first. Sponsored by: Intel Reviewed by: carl
* mdoc: remove superfluous paragraph macro.joel2012-09-181-1/+0
|
* Add nvmecontrol(8) source code and beginnings of a man page to the tree.jimharris2012-09-173-0/+693
Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>
OpenPOWER on IntegriCloud