aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2012-09-21 12:52:13 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2012-11-13 09:13:49 -0500
commit08df1e05657fc6712e520e7c09cc6c86160ceb35 (patch)
treee0216bcc27599c8ce59af5b4221e4b5eae9a9cdd /drivers/block
parentf4f117f64baf8840d22266d518227b2a186d294b (diff)
NVMe: Add result to nvme_get_features
nvme_get_features() was not returning the result. Add a parameter to return the result in (similar to nvme_set_features()) and change all callers. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nvme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 47c860454289..c1d5444f0cb3 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -838,8 +838,8 @@ static int nvme_identify(struct nvme_dev *dev, unsigned nsid, unsigned cns,
838 return nvme_submit_admin_cmd(dev, &c, NULL); 838 return nvme_submit_admin_cmd(dev, &c, NULL);
839} 839}
840 840
841static int nvme_get_features(struct nvme_dev *dev, unsigned fid, 841static int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
842 unsigned nsid, dma_addr_t dma_addr) 842 dma_addr_t dma_addr, u32 *result)
843{ 843{
844 struct nvme_command c; 844 struct nvme_command c;
845 845
@@ -849,7 +849,7 @@ static int nvme_get_features(struct nvme_dev *dev, unsigned fid,
849 c.features.prp1 = cpu_to_le64(dma_addr); 849 c.features.prp1 = cpu_to_le64(dma_addr);
850 c.features.fid = cpu_to_le32(fid); 850 c.features.fid = cpu_to_le32(fid);
851 851
852 return nvme_submit_admin_cmd(dev, &c, NULL); 852 return nvme_submit_admin_cmd(dev, &c, result);
853} 853}
854 854
855static int nvme_set_features(struct nvme_dev *dev, unsigned fid, 855static int nvme_set_features(struct nvme_dev *dev, unsigned fid,
@@ -1535,7 +1535,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
1535 continue; 1535 continue;
1536 1536
1537 res = nvme_get_features(dev, NVME_FEAT_LBA_RANGE, i, 1537 res = nvme_get_features(dev, NVME_FEAT_LBA_RANGE, i,
1538 dma_addr + 4096); 1538 dma_addr + 4096, NULL);
1539 if (res) 1539 if (res)
1540 continue; 1540 continue;
1541 1541