summaryrefslogtreecommitdiffstats
path: root/drivers/block/nvme-scsi.c
Commit message (Collapse)AuthorAgeFilesLines
* NVMe: Use kzalloc instead of kmalloc+memsetTushar Behera2013-06-191-16/+8
| | | | | | | | Use kzalloc instead of kmalloc and a susbsequent memset. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: Fix a signedness bug in nvme_trans_modesel_get_mpVishal Verma2013-05-171-1/+1
| | | | | | | | | nvme_trans_modesel_get_mp() was defined with a unsigned return type, but can return signed values. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: Remove redundant version.h header includeSachin Kamat2013-05-171-1/+0
| | | | | | | | | version.h header inclusion is not necessary as detected by checkversion.pl. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: Simplify Firmware Activate code slightlyMatthew Wilcox2013-05-081-4/+2
| | | | | | | | | Add definitions for the three Firmware Activate actions, and change the SCSI translation code to construct the command into a temporary variable instead of translating the endianness back-and-forth. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Vishal Verma <vishal.l.verma@linux.intel.com>
* NVMe: Add scsi unmap to SG_IOKeith Busch2013-05-021-0/+78
| | | | | | | | | Translates a scsi unmap request from SG_IO ioctl to NVMe data-set-management deallocate. Signed-off-by: Keith Busch <keith.busch@intel.com> Acked-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: queue usage fixes in nvme-scsiKeith Busch2013-05-021-5/+20
| | | | | | | | | | Fixes nvme queue usages in scsi-to-nvme translation code to not get a queue more often than it is being put, and not use the queue in an unsafe way without it being locked. Signed-off-by: Keith Busch <keith.busch@intel.com> Acked-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: Fix sparse warnings in scsi emulationVishal Verma2013-04-161-39/+60
| | | | | | | | | Sparse produced warnings for some instances of mismatched types and direct userspace dereferences. This patch fixes those for the scsi emulation layer. Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* NVMe: Abstract out sector to block number conversionMatthew Wilcox2013-04-161-1/+1
| | | | | | | | | Introduce nvme_block_nr() to help convert sectors to block numbers. This fixes an integer overflow in the SCSI conversion layer, and it's slightly less typing than opencoding it. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Acked-by: Keith Busch <keith.busch@intel.com>
* NVMe: Add nvme-scsi.cVishal Verma2013-03-281-0/+2941
Translates SCSI commands in SG_IO ioctl to NVMe commands. Uses the scsi-nvme translation spec from nvmexpress.org as reference. Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>