#
350996 |
|
13-Aug-2019 |
mav |
MFC kernel part of r350523, r350524, r350961: Add IOCTL to translate nvdX into nvmeY and NSID.
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.
|
#
346249 |
|
15-Apr-2019 |
mav |
MFC r330760: Add new opcodes and statuses from NVMe 1.3a.
|
#
335166 |
|
14-Jun-2018 |
mav |
MFC r325794, r325838 (by imp): Provide link speed data in XPT_GET_TRAN_SETTINGS. Provide full version information for that and XPT_PATH_INQ. Provide macros to encode/decode major/minor versions. Read the link speed and lane count to compute the base_transfer_speed for XPT_PATH_INQ.
|
#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
328703 |
|
01-Feb-2018 |
mav |
MFC r324644 (by imp): Closer examination shows that nvme and CAM both normally zero-fill allocations (for req and ccb, which ultimately contain the nvme_cmd). As such, we can micro-optimize these routines. Add a comment to this effect, and bzero the ccb used to make the requests for the nda dump rotuine so it more closely matches a ccb allocated with xpt_get_ccb().
|
#
328700 |
|
01-Feb-2018 |
mav |
MFC r324631 (by imp): Explicitly set reserved fields and 'fuse' to 0. This prevents us from acidentally sending bogus values in these fields, which some drives may reject with an error or worse (undefined behavior).
This is especially needed for the ndadump routine which allocates the cmd from stack garbage....
|
#
328697 |
|
01-Feb-2018 |
mav |
MFC r322998 (by imp): Fix a few overlooked spots where the coded uses 16-bit NSIDs. Chuck Tuffli had submitted a more thorough patch that I was unaware of when I did my work and this brings in the bits I missed from that patch.
|
#
328690 |
|
01-Feb-2018 |
mav |
MFC r322903 (by imp): Fill in reserved areas from NVMe spec in the IDENTIFY structure (struct nvme_controller_data) as defined in the NVM Express specification, revsion 1.3.
|
#
328688 |
|
01-Feb-2018 |
mav |
MFC r322901 (by imp): Add feature codes from NVMe 1.3 specification:
o Automomous Power State Transition o Host Memory Buffer o Timestamp o Keep Alive Timer o Host Controlled Thermal Management o Non-Operational Power State Config
Also note that feature codes 0x78-0x7f are reserved for the NVMe Management Interface.
|
#
328687 |
|
01-Feb-2018 |
mav |
MFC r322874, r322875 (by imp): Sanity check sizes
Add compile time sanity checks to make sure that packed structures are the proper size, typically as defined in the NVMe standard.
|
#
328681 |
|
01-Feb-2018 |
mav |
MFC r322036 (by imp): Make nvd vs nda choice boot-time rather than build-time
Introduce hw.nvme.use_nvd tunable. This tunable allows both nvd and nda to be installed in the kernel, while allowing only one of them to create devices. This is an all-or-nothing setting, and you can't change it after boot-time. However, it will allow easier A/B testing.
|
#
328678 |
|
01-Feb-2018 |
mav |
MFC r320424 (by imp): Add new definitions for namespaces.
|
#
328674 |
|
01-Feb-2018 |
mav |
MFC r308855 (by imp): Implement HGST Log page 0xc1, as documented in the HGST SN100 and SN150 product manuals. Subpage 0x32 is documented, but not implemented.
|
#
328673 |
|
01-Feb-2018 |
mav |
MFC r308854 (by imp): Print Intel's expanded Temperature log page.
|
#
328671 |
|
01-Feb-2018 |
mav |
MFC r308853 (by imp): Add log pages that Intel SSDs provide. It turns out that many of these are widely implemented beyond just Intel drives.
|
#
328670 |
|
01-Feb-2018 |
mav |
MFC r308852 (by imp): Add log pages defined through NVM Express 1.2.1.
|
#
328669 |
|
01-Feb-2018 |
mav |
MFC r308851 (by imp): Expand the SMART / Health Information Log Page (Page 02) printout based on NVM Express 1.2.1 Standard.
|
#
328663 |
|
01-Feb-2018 |
mav |
MFC r303017 (by imp): Implement crashdump support on NVME
|
#
323148 |
|
03-Sep-2017 |
des |
MFH (r314888): silence aliasing warning in nvme.h
Approved by: imp
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
301778 |
|
10-Jun-2016 |
imp |
Commit the bits of nda that were missed. This should fix the build.
Approved by: re@
|
#
296617 |
|
10-Mar-2016 |
mav |
Revert r292074 (by smh): Limit stripesize reported from nvd(4) to 4K
I believe that this patch handled the problem from the wrong side. Instead of making ZFS properly handle large stripe sizes, it made unrelated driver to lie in reported parameters to workaround that.
Alternative solution for this problem from ZFS side was committed at r296615.
Discussed with: smh
|
#
295087 |
|
30-Jan-2016 |
imp |
Implement power command to list all power modes, find out the power mode we're in and to set the power mode.
|
#
292074 |
|
11-Dec-2015 |
smh |
Limit stripesize reported from nvd(4) to 4K
Intel NVMe controllers have a slow path for I/Os that span a 128KB stripe boundary but ZFS limits ashift, which is derived from d_stripesize, to 13 (8KB) so we limit the stripesize reported to geom(8) to 4KB.
This may result in a small number of additional I/Os to require splitting in nvme(4), however the NVMe I/O path is very efficient so these additional I/Os will cause very minimal (if any) difference in performance or CPU utilisation.
This can be controller by the new sysctl kern.nvme.max_optimal_sectorsize.
MFC after: 1 week Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4446
|
#
290199 |
|
30-Oct-2015 |
jimharris |
nvd, nvme: report stripesize through GEOM disk layer
MFC after: 3 days Sponsored by: Intel
|
#
256152 |
|
08-Oct-2013 |
jimharris |
Extend some 32-bit fields and variables to 64-bit to prevent overflow 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
|
#
256151 |
|
08-Oct-2013 |
jimharris |
Add driver-assisted striping for upcoming Intel NVMe controllers that can benefit from it.
Sponsored by: Intel Reviewed by: kib (earlier version), carl Approved by: re (hrs) MFC after: 1 week
|
#
254302 |
|
13-Aug-2013 |
jimharris |
Send a shutdown notification in the driver unload path, to ensure notification gets sent in cases where system shuts down with driver unloaded.
Sponsored by: Intel Reviewed by: carl MFC after: 3 days
|
#
253476 |
|
19-Jul-2013 |
jimharris |
Add message when nvd disks are attached and detached.
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
|
#
253437 |
|
17-Jul-2013 |
jimharris |
Define constants for the lengths of the serial number, model number 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
|
#
253209 |
|
11-Jul-2013 |
jimharris |
Fix a poorly worded comment in nvme(4).
MFC after: 3 days
|
#
253112 |
|
09-Jul-2013 |
jimharris |
Update copyright dates.
MFC after: 3 days
|
#
252278 |
|
26-Jun-2013 |
jimharris |
Add firmware replacement and activation support to nvmecontrol(8) through 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
|
#
252271 |
|
26-Jun-2013 |
jimharris |
Use MAXPHYS to specify the maximum I/O size for nvme(4).
Also allow admin commands to transfer up to this maximum I/O size, rather than the artificial limit previously imposed. The larger I/O size is very beneficial for upcoming firmware download support. This has the added benefit of simplifying the code since both admin and I/O commands now use the same maximum I/O size.
Sponsored by: Intel MFC after: 3 days
|
#
249422 |
|
12-Apr-2013 |
jimharris |
Remove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace them with the NVMe passthrough equivalent.
Sponsored by: Intel
|
#
249421 |
|
12-Apr-2013 |
jimharris |
Add support for passthrough NVMe commands.
This includes a new IOCTL to support a generic method for nvmecontrol(8) to pass IDENTIFY, GET_LOG_PAGE, GET_FEATURES and other commands to the controller, rather than separate IOCTLs for each.
Sponsored by: Intel
|
#
248977 |
|
01-Apr-2013 |
jimharris |
Add unmapped bio support to nvme(4) and nvd(4).
Sponsored by: Intel
|
#
248767 |
|
26-Mar-2013 |
jimharris |
Add the ability to internally mark a controller as failed, if it is unable to start or reset. Also add a notifier for NVMe consumers for controller fail conditions and plumb this notifier for nvd(4) to destroy the associated GEOM disks when a failure occurs.
This requires a bit of work to cover the races when a consumer is sending I/O requests to a controller that is transitioning to the failed state. To help cover this condition, add a task to defer completion of I/Os submitted to a failed controller, so that the consumer will still always receive its completions in a different context than the submission.
Sponsored by: Intel Reviewed by: carl
|
#
248760 |
|
26-Mar-2013 |
jimharris |
Pass associated log page data to async event consumers, if requested.
Sponsored by: Intel Reviewed by: carl
|
#
248758 |
|
26-Mar-2013 |
jimharris |
Add structure definitions and controller command function for firmware log pages.
Sponsored by: Intel Reviewed by: carl
|
#
248757 |
|
26-Mar-2013 |
jimharris |
Add structure definitions and a controller command function for error log pages.
Sponsored by: Intel Reviewed by: carl
|
#
248756 |
|
26-Mar-2013 |
jimharris |
Create struct nvme_status.
NVMe error log entries include status, so breaking this out into its own data structure allows it to be included in both the nvme_completion data structure as well as error log entry data structures.
While here, expose nvme_completion_is_error(), and change all of the places that were explicitly looking at sc/sct bits to use this macro instead.
Sponsored by: Intel Reviewed by: carl
|
#
248747 |
|
26-Mar-2013 |
jimharris |
Add API for nvme consumers to access controller and namespace identify data.
Sponsored by: Intel Reviewed by: carl
|
#
248746 |
|
26-Mar-2013 |
jimharris |
Add controller reset capability to nvme(4) and ability to explicitly 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
|
#
248740 |
|
26-Mar-2013 |
jimharris |
Create a generic nvme_ctrlr_cmd_get_log_page function, and change the health information log page function to use it.
Sponsored by: Intel
|
#
248739 |
|
26-Mar-2013 |
jimharris |
Expose the get/set features API to nvme consumers.
Sponsored by: Intel
|
#
248738 |
|
26-Mar-2013 |
jimharris |
Add an interface for nvme shim drivers (i.e. nvd) to register for notifications when new nvme controllers are added to the system.
Sponsored by: Intel
|
#
248737 |
|
26-Mar-2013 |
jimharris |
Enable asynchronous event requests on non-Chatham devices.
Also add logic to clean up all outstanding asynchronous event requests when resetting or shutting down the controller, since these requests will not be explicitly completed by the controller itself.
Sponsored by: Intel
|
#
241665 |
|
17-Oct-2012 |
jimharris |
Add ability to queue nvme_request objects if no nvme_trackers are available.
This eliminates the need to manage queue depth at the nvd(4) level for Chatham prototype board workarounds, and also adds the ability to accept a number of requests on a single qpair that is much larger than the number of trackers allocated.
Sponsored by: Intel
|
#
241657 |
|
17-Oct-2012 |
jimharris |
Add return codes to all functions used for submitting commands to I/O queues.
Sponsored by: Intel
|
#
240671 |
|
18-Sep-2012 |
jimharris |
Add __aligned(4) to NVMe defined data structures.
This fixes issue in nvmecontrol(8), where clang throws a cast-align warning when casting a __packed structure pointer to a uint32_t pointer as part of printing raw hex output.
Reported by: dhw
|
#
240616 |
|
17-Sep-2012 |
jimharris |
This is the first of several commits which will add NVM Express (NVMe) support to FreeBSD. A full description of the overall functionality being added is below. nvmexpress.org defines NVM Express as "an optimized register interface, command set and feature set fo PCI Express (PCIe)-based Solid-State Drives (SSDs)."
This commit adds nvme(4) and nvd(4) driver source code and Makefiles to the tree.
Full NVMe functionality description: Add nvme(4) and nvd(4) drivers and nvmecontrol(8) for NVM Express (NVMe) device support.
There will continue to be ongoing work on NVM Express support, but there is more than enough to allow for evaluation of pre-production NVM Express devices as well as soliciting feedback. Questions and feedback are welcome.
nvme(4) implements NVMe hardware abstraction and is a provider of NVMe namespaces. The closest equivalent of an NVMe namespace is a SCSI LUN. nvd(4) is an NVMe consumer, surfacing NVMe namespaces as GEOM disks. nvmecontrol(8) is used for NVMe configuration and management.
The following are currently supported: nvme(4) - full mandatory NVM command set support - per-CPU IO queues (enabled by default but configurable) - per-queue sysctls for statistics and full command/completion queue dumps for debugging - registration API for NVMe namespace consumers - I/O error handling (except for timeoutsee below) - compilation switches for support back to stable-7
nvd(4) - BIO_DELETE and BIO_FLUSH (if supported by controller) - proper BIO_ORDERED handling
nvmecontrol(8) - devlist: list NVMe controllers and their namespaces - identify: display controller or namespace identify data in human-readable or hex format - perftest: quick and dirty performance test to measure raw performance of NVMe device without userspace/physio/GEOM overhead
The following are still work in progress and will be completed over the next 3-6 months in rough priority order: - complete man pages - firmware download and activation - asynchronous error requests - command timeout error handling - controller resets - nvmecontrol(8) log page retrieval
This has been primarily tested on amd64, with light testing on i386. I would be happy to provide assistance to anyone interested in porting this to other architectures, but am not currently planning to do this work myself. Big-endian and dmamap sync for command/completion queues are the main areas that would need to be addressed.
The nvme(4) driver currently has references to Chatham, which is an Intel-developed prototype board which is not fully spec compliant. These references will all be removed over time.
Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>
|