From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH v4 5/6] nvme: Add Support for Opal: Unlock from S3 & Opal Allocation/Ioctls
Date: Sun, 8 Jan 2017 06:20:20 -0800 [thread overview]
Message-ID: <20170108142020.GC25986@infradead.org> (raw)
In-Reply-To: <1483039615-22407-6-git-send-email-scott.bauer@intel.com>
> +config BLK_DEV_SED_OPAL
> + bool "Enable support for Opal Enabled NVMe Device"
> + depends on BLK_SED_OPAL
> + default n
> + ---help---
> + This enables support for an Opal enabled NVMe device.
I'd like to hear an opinion from Keith as well, but I personally would
drop this confif option and just enable NVMe OPAL support if core block
OPAL is supported.
> + struct nvme_command cmd = { 0 };
This creates a warning for me:
../drivers/nvme/host/core.c: In function ?nvme_sec_submit?:
../drivers/nvme/host/core.c:771:9: warning: missing braces around initializer [-Wmissing-braces]
struct nvme_command cmd = { 0 };
^
../drivers/nvme/host/core.c:771:9: warning: (near initialization for ?cmd.<anonymous>?) [-Wmissing-braces]
maybe just follow the other examples of nvme_command initializations
in the file.
> + struct nvme_ns *ns = NULL;
> +
> + if (send)
> + cmd.common.opcode = nvme_admin_security_send;
> + else
> + cmd.common.opcode = nvme_admin_security_recv;
> + ns = container_of(ctx, struct nvme_ns, sed_ctx);
> + cmd.common.nsid = cpu_to_le32(ns->ns_id);
Until we support the configurable namespace locking extension we should
have the sed_ctx in the nvme_ctrl structure, and not be tried to a
namespace here. I hope to get some concensus out of the working group
about which value to pass exactly soon.
> +#ifdef CONFIG_BLK_DEV_SED_OPAL
> + if (is_sed_ioctl(cmd))
> + return sed_ioctl(&ns->sed_ctx, cmd, arg);
> +#endif
To avoid these ifdefs I would suggest to provide an always false
inline version of is_sed_ioctl and a no-op inline of sed_ioctl
in the header.
next prev parent reply other threads:[~2017-01-08 14:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 19:26 [PATCH v4 0/6] SED OPAL Library Scott Bauer
2016-12-29 19:26 ` [PATCH v4 1/6] Include: Uapi: Add user ABI for Sed/Opal Scott Bauer
2016-12-29 19:26 ` [PATCH v4 2/6] block: Add Sed-opal library Scott Bauer
2016-12-30 21:02 ` Jon Derrick
2017-01-08 13:32 ` Christoph Hellwig
2017-01-08 14:05 ` Christoph Hellwig
2017-01-11 17:47 ` J Freyensee
2017-01-30 17:08 ` Scott Bauer
2017-01-19 18:28 ` Scott Bauer
2017-01-24 0:20 ` J Freyensee
2017-01-24 7:46 ` Christoph Hellwig
2016-12-29 19:26 ` [PATCH v4 3/6] block: add ioctl interface for interfacing with Opal library Scott Bauer
2017-01-08 14:06 ` Christoph Hellwig
2016-12-29 19:26 ` [PATCH v4 4/6] block: Add Opal Files to Makefile & add config option to Kconfig Scott Bauer
2017-01-08 14:09 ` Christoph Hellwig
2016-12-29 19:26 ` [PATCH v4 5/6] nvme: Add Support for Opal: Unlock from S3 & Opal Allocation/Ioctls Scott Bauer
2017-01-08 14:20 ` Christoph Hellwig [this message]
2017-01-18 18:45 ` Keith Busch
2017-01-24 8:14 ` Christoph Hellwig
2017-01-19 19:32 ` Jon Derrick
2016-12-29 19:26 ` [PATCH v4 6/6] Maintainers: Add maintainer info for SED/Opal library Scott Bauer
2016-12-29 21:00 ` [PATCH v4 0/6] SED OPAL Library Scott Bauer
2016-12-30 8:28 ` Christoph Hellwig
2016-12-30 22:52 ` Scott Bauer
2016-12-31 3:51 ` Christoph Hellwig
2016-12-31 5:41 ` Scott Bauer
2016-12-31 5:47 ` Christoph Hellwig
2017-01-03 22:09 ` Scott Bauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170108142020.GC25986@infradead.org \
--to=hch@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox