* [PATCH] NVMe: use namespace id for nvme_get_features
@ 2012-07-25 22:06 Keith Busch
2012-07-26 16:46 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2012-07-25 22:06 UTC (permalink / raw)
The specification does not provide a use for command dword11 in the NVMe Get
Features command, but does use the NSID for some features.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/block/nvme.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 38b9c73..c4ba0f7 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -840,15 +840,15 @@ static int nvme_identify(struct nvme_dev *dev, unsigned nsid, unsigned cns,
}
static int nvme_get_features(struct nvme_dev *dev, unsigned fid,
- unsigned dword11, dma_addr_t dma_addr)
+ unsigned nsid, dma_addr_t dma_addr)
{
struct nvme_command c;
memset(&c, 0, sizeof(c));
c.features.opcode = nvme_admin_get_features;
+ c.features.nsid = cpu_to_le32(nsid);
c.features.prp1 = cpu_to_le64(dma_addr);
c.features.fid = cpu_to_le32(fid);
- c.features.dword11 = cpu_to_le32(dword11);
return nvme_submit_admin_cmd(dev, &c, NULL);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] NVMe: use namespace id for nvme_get_features
2012-07-25 22:06 [PATCH] NVMe: use namespace id for nvme_get_features Keith Busch
@ 2012-07-26 16:46 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2012-07-26 16:46 UTC (permalink / raw)
On Wed, Jul 25, 2012@04:06:38PM -0600, Keith Busch wrote:
> The specification does not provide a use for command dword11 in the NVMe Get
> Features command, but does use the NSID for some features.
... proof that one shouldn't write both sides of a protocol.
Thanks, applied.
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> ---
> drivers/block/nvme.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
> index 38b9c73..c4ba0f7 100644
> --- a/drivers/block/nvme.c
> +++ b/drivers/block/nvme.c
> @@ -840,15 +840,15 @@ static int nvme_identify(struct nvme_dev *dev, unsigned nsid, unsigned cns,
> }
>
> static int nvme_get_features(struct nvme_dev *dev, unsigned fid,
> - unsigned dword11, dma_addr_t dma_addr)
> + unsigned nsid, dma_addr_t dma_addr)
> {
> struct nvme_command c;
>
> memset(&c, 0, sizeof(c));
> c.features.opcode = nvme_admin_get_features;
> + c.features.nsid = cpu_to_le32(nsid);
> c.features.prp1 = cpu_to_le64(dma_addr);
> c.features.fid = cpu_to_le32(fid);
> - c.features.dword11 = cpu_to_le32(dword11);
>
> return nvme_submit_admin_cmd(dev, &c, NULL);
> }
> --
> 1.7.0.4
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://merlin.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-26 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 22:06 [PATCH] NVMe: use namespace id for nvme_get_features Keith Busch
2012-07-26 16:46 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).