Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670953
| From | Jerry Hoemann <jerry.hoemann@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/7] libnvdimm: passthru functions clear to send |
| Date | 2017-06-20 19:00 +0200 |
| Message-ID | <tUuFs-2G9-17@gated-at.bofh.it> (permalink) |
| References | <tUuFr-2G9-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Have dsm functions called via the pass thru mechanism also
be checked against clear to send.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
drivers/nvdimm/bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index e9361bf..e16427d 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -907,6 +907,7 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
static char in_env[ND_CMD_MAX_ENVELOPE];
const struct nd_cmd_desc *desc = NULL;
unsigned int cmd = _IOC_NR(ioctl_cmd);
+ unsigned int func = cmd;
void __user *p = (void __user *) arg;
struct device *dev = &nvdimm_bus->dev;
struct nd_cmd_pkg pkg;
@@ -972,6 +973,7 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
}
if (cmd == ND_CMD_CALL) {
+ func = pkg.nd_command;
dev_dbg(dev, "%s:%s, idx: %llu, in: %zu, out: %zu, len %zu\n",
__func__, dimm_name, pkg.nd_command,
in_len, out_len, buf_len);
@@ -1020,7 +1022,7 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
}
nvdimm_bus_lock(&nvdimm_bus->dev);
- rc = nd_cmd_clear_to_send(nvdimm_bus, nvdimm, cmd, buf);
+ rc = nd_cmd_clear_to_send(nvdimm_bus, nvdimm, func, buf);
if (rc)
goto out_unlock;
--
1.8.5.6
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] Enable DSM pass thru for root functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
[PATCH v2 1/7] libnvdimm: passthru functions clear to send Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
[PATCH v2 3/7] libnvdimm: Add bus level dsm mask. Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
[PATCH v2 7/7] acpi, nfit: override mask Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
[PATCH v2 4/7] acpi, nfit: Use bus_dsm_mask for passthru Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
Re: [PATCH v2 4/7] acpi, nfit: Use bus_dsm_mask for passthru Dan Williams <dan.j.williams@intel.com> - 2017-06-28 23:10 +0200
[PATCH v2 6/7] libnvdimm: New ACPI 6.2 DSM functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-20 19:00 +0200
Re: [PATCH v2 6/7] libnvdimm: New ACPI 6.2 DSM functions Dan Williams <dan.j.williams@intel.com> - 2017-06-28 23:20 +0200
Re: [PATCH v2 0/7] Enable DSM pass thru for root functions Jerry Hoemann <jerry.hoemann@hpe.com> - 2017-06-26 19:40 +0200
csiph-web