* [PATCH] nvme_fc: require target or discovery role for fc-nvme targets
@ 2017-05-05 23:13 jsmart2021
2017-05-08 11:04 ` Johannes Thumshirn
2017-05-10 17:09 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: jsmart2021 @ 2017-05-05 23:13 UTC (permalink / raw)
From: James Smart <jsmart2021@gmail.com>
In order to create an association, the remoteport must be
serving either a target role or a discovery role.
Signed-off-by: James Smart <james.smart at broadcom.com>
---
drivers/nvme/host/fc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 9993ff8d5656..e8f4cbdb9b5f 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2712,6 +2712,12 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
unsigned long flags;
int ret, idx;
+ if (!(rport->remoteport.port_role &
+ (FC_PORT_ROLE_NVME_DISCOVERY | FC_PORT_ROLE_NVME_TARGET))) {
+ ret = -EBADR;
+ goto out_fail;
+ }
+
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
ret = -ENOMEM;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] nvme_fc: require target or discovery role for fc-nvme targets
2017-05-05 23:13 [PATCH] nvme_fc: require target or discovery role for fc-nvme targets jsmart2021
@ 2017-05-08 11:04 ` Johannes Thumshirn
2017-05-10 17:09 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-05-08 11:04 UTC (permalink / raw)
On 05/06/2017 01:13 AM, jsmart2021@gmail.com wrote:
> From: James Smart <jsmart2021 at gmail.com>
>
> In order to create an association, the remoteport must be
> serving either a target role or a discovery role.
>
> Signed-off-by: James Smart <james.smart at broadcom.com>
> ---
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] nvme_fc: require target or discovery role for fc-nvme targets
2017-05-05 23:13 [PATCH] nvme_fc: require target or discovery role for fc-nvme targets jsmart2021
2017-05-08 11:04 ` Johannes Thumshirn
@ 2017-05-10 17:09 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-05-10 17:09 UTC (permalink / raw)
Applied to nvme-4.12.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-10 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 23:13 [PATCH] nvme_fc: require target or discovery role for fc-nvme targets jsmart2021
2017-05-08 11:04 ` Johannes Thumshirn
2017-05-10 17:09 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.