summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_ns_cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Commit the bits of nda that were missed. This should fix the build.imp2016-06-101-37/+5
| | | | Approved by: re@
* Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.jimharris2013-07-191-3/+4
| | | | | | | | | | 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
* Add unmapped bio support to nvme(4) and nvd(4).jimharris2013-04-011-0/+58
| | | | Sponsored by: Intel
* Add "type" to nvme_request, signifying if its payload is a VADDR, UIO, orjimharris2013-03-291-4/+5
| | | | | | | NULL. This simplifies decisions around if/how requests are routed through busdma. It also paves the way for supporting unmapped bios. Sponsored by: Intel
* Make the DSM range count 0-based. Previously we were deallocating one morejimharris2013-03-261-1/+1
| | | | | | LBA than we should have been. Sponsored by: Intel
* Add nvme_ctrlr_submit_[admin|io]_request functions which consolidatesjimharris2012-10-181-33/+8
| | | | | | | code for allocating nvme_tracker objects and making calls into bus_dmamap_load for commands which have payloads. Sponsored by: Intel
* Add struct nvme_request object which contains all of the parameters passedjimharris2012-10-181-14/+24
| | | | | | | | | | | from an NVMe consumer. This allows us to mostly build NVMe command buffers without holding the qpair lock, and also allows for future queueing of nvme_request objects in cases where the submission queue is full and no nvme_tracker objects are available. Sponsored by: Intel
* Merge struct nvme_prp_list into struct nvme_tracker.jimharris2012-10-181-3/+3
| | | | | | | | | | | | | This simplifies the driver significantly where it is constructing commands to be submitted to hardware. By reducing the number of PRPs (NVMe parlance for SGE) from 128 to 32, it ensures we do not allocate too much memory for more common smaller I/O sizes, while still supporting up to 128KB I/O sizes. This also paves the way for pre-allocation of nvme_tracker objects for each queue which will simplify the I/O path even further. Sponsored by: Intel
* Add return codes to all functions used for submitting commands to I/Ojimharris2012-10-181-4/+24
| | | | | | queues. Sponsored by: Intel
* This is the first of several commits which will add NVM Express (NVMe)jimharris2012-09-171-0/+120
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>
OpenPOWER on IntegriCloud