Skip to contentSkip to conversation

nvme: Fix known effects

PATCH New Keith Busch 5 participants 5 messages May 17, 2019 – May 21, 2019 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: Fix known effects

We're trying to append known effects to the ones reported in the controller's log. The original patch accomplished this, but something went wrong when patch was merged causing the effects log to override the known effects.

Cc Maxim Levitsky <mlevitsk at redhat.com>
Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index f2411d50e764..5175451916d1 100644
@@ -1273,9 +1273,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
 		return 0;
 	}
 
-	effects |= nvme_known_admin_effects(opcode);
 	if (ctrl->effects)
 		effects = le32_to_cpu(ctrl->effects->acs[opcode]);
+	effects |= nvme_known_admin_effects(opcode);
 
 	/*
 	 * For simplicity, IO to all namespaces is quiesced even if the command
Signature · 1 line
2.14.4
#1 lore raw

PATCH 1/1 nvme: Fix known effects

Quoted 18 lines · Keith Busch

We're trying to append known effects to the ones reported in the controller's log. The original patch accomplished this, but something went wrong when patch was merged causing the effects log to override the known effects.

Cc Maxim Levitsky <mlevitsk at redhat.com>
Signed-off-by Keith Busch <keith.busch at intel.com>
---
  drivers/nvme/host/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +0 -0
index f2411d50e764..5175451916d1 100644

drivers/nvme/host/core.c static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns, · line 1281

Quoted 10 lines
drivers/nvme/host/core.c +1 -1
@@ -1273,9 +1273,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
  		return 0;
  	}
 
-	effects |= nvme_known_admin_effects(opcode);
  	if (ctrl->effects)
  		effects = le32_to_cpu(ctrl->effects->acs[opcode]);
+	effects |= nvme_known_admin_effects(opcode);
 
  	/*
  	 * For simplicity, IO to all namespaces is quiesced even if the command

LGTM

Ed

#2 lore raw

PATCH 1/1 nvme: Fix known effects

In reply to Keith Busch

Looks good.

Reviewed-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Quoted 27 lines · Keith Busch

We're trying to append known effects to the ones reported in the controller's log. The original patch accomplished this, but something went wrong when patch was merged causing the effects log to override the known effects.

Cc Maxim Levitsky <mlevitsk at redhat.com>
Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index f2411d50e764..5175451916d1 100644
@@ -1273,9 +1273,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
 		return 0;
 	}
 
-	effects |= nvme_known_admin_effects(opcode);
 	if (ctrl->effects)
 		effects = le32_to_cpu(ctrl->effects->acs[opcode]);
+	effects |= nvme_known_admin_effects(opcode);
 
 	/*
 	 * For simplicity, IO to all namespaces is quiesced even if the command