summaryrefslogtreecommitdiff
path: root/include/linux/nvme.h
AgeCommit message (Collapse)Author
2011-11-04NVMe: Update Identify Controller data structureMatthew Wilcox
The driver was still using an old definition of Identify Controller which only came to light once we started using the 'number of namespaces' field properly. Reported-by: Nisheeth Bhat <nisheeth.bhat@intel.com> Reported-by: Khosrow Panah <Khosrow.Panah@idt.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Implement doorbell stride capabilityMatthew Wilcox
The doorbell stride allows devices to spread out their doorbells instead of packing them tightly. This feature was added as part of ECN 003. This patch also enables support for more than 512 queues :-) Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Rework ioctlsMatthew Wilcox
Remove the special-purpose IDENTIFY, GET_RANGE_TYPE, DOWNLOAD_FIRMWARE and ACTIVATE_FIRMWARE commands. Replace them with a generic ADMIN_CMD ioctl that can submit any admin command. Add a new ID ioctl that returns the namespace ID of the queried device. It corresponds to the SCSI Idlun ioctl. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Time out initialisation after a few secondsMatthew Wilcox
THe device reports (in its capability register) how long it will take to initialise. If that time elapses before the ready bit becomes set, conclude the device is broken and refuse to initialise it. Log a nice error message so the user knows why we did nothing. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Correct the Controller Configuration settingsMatthew Wilcox
The arbitration field was extended by one bit, shifting the shutdown notification bits by one. Also, the SQ/CQ entry size was made configurable for future extensions. Reported-by: Paul Luse <paul.e.luse@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Change the definition of nvme_user_ioMatthew Wilcox
The read and write commands don't define a 'result', so there's no need to copy it back to userspace. Remove the ability of the ioctl to submit commands to a different namespace; it's just asking for trouble, and the use case I have in mind will be addressed througha different ioctl in the future. That removes the need for both the block_shift and nsid arguments. Check that the opcode is one of 'read' or 'write'. Future opcodes may be added in the future, but we will need a different structure definition for them. The nblocks field is redefined to be 0-based. This allows the user to request the full 65536 blocks. Don't byteswap the reftag, apptag and appmask. Martin Petersen tells me these are calculated in big-endian and are transmitted to the device in big-endian. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Correct the definitions of two ioctlsMatthew Wilcox
NVME_IOCTL_SUBMIT_IO has a struct nvme_user_io, not a struct nvme_rw_command as a parameter, and NVME_IOCTL_DOWNLOAD_FW is a Write, not a Read. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Remove outdated commentsMatthew Wilcox
The head can never overrun the tail since we won't allocate enough command IDs to let that happen. The status codes are in sync with the spec. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Update admin opcodes to match the 1.0RC specKrzysztof Wierzbicki
Signed-off-by: Krzysztof Wierzbicki <krzysztof.wierzbicki@intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Update BAR structure to match the current specMatthew Wilcox
Add two reserved registers in the middle of the BAR to match the 1.0 spec plus ECN 0002. Also rename IMC and ISC to INTMC and INTSC to conform with the spec. We still don't need to use them :-) Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Add download / activate firmware ioctlsMatthew Wilcox
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Add remaining status codesMatthew Wilcox
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Add NVME_IOCTL_SUBMIT_IOMatthew Wilcox
Allow userspace to submit synchronous I/O like the SCSI sg interface does. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: Make nvme_common_command more featurefulMatthew Wilcox
Add prp1, prp2 and the metadata prp to the common command, since the fields are generally used this way. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
2011-11-04NVMe: New driverMatthew Wilcox
This driver is for devices that follow the NVM Express standard Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>