Skip to contentSkip to conversation

cxlflash: Regression patch and updating Maintainers list

PATCH Applied Uma Krishnan 4 participants 7 messages Jul 21, 2016 – Jul 22, 2016 SCSI

lore
Share & tools
lore
#0 lore raw

cover cxlflash: Regression patch and updating Maintainers list

First patch in this set fixes a regression that was casued by the Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards"), which is currently staged for 4.8 in next/master. Second patch updates the Maintainers list for cxlflash driver.

This series is intended for 4.8 and is bisectable. These patches are cut against next/master that contains the original commit.

Uma Krishnan (2):
cxlflash: Verify problem state area is mapped before notifying
shutdown
MAINTAINERS: Update cxlflash maintainers

 MAINTAINERS                  |  1 +
 drivers/scsi/cxlflash/main.c | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/2 cxlflash: Verify problem state area is mapped before notifying shutdown

If an EEH or some other hard error occurs while the adapter instance was being initialized, on the subsequent shutdown of the device, the system could crash with:

[c000000f1da03b60] c0000000005eccfc pci_device_shutdown+0x6c/0x100 [c000000f1da03ba0] c0000000006d67d4 device_shutdown+0x1b4/0x2c0 [c000000f1da03c40] c0000000000ea30c kernel_restart_prepare+0x5c/0x80 [c000000f1da03c70] c0000000000ea48c kernel_restart+0x2c/0xc0 [c000000f1da03ce0] c0000000000ea970 SyS_reboot+0x1c0/0x2d0 [c000000f1da03e30] c000000000009204 system_call+0x38/0xb4

This crash is due to the AFU not being mapped when the shutdown notification routine is called and is a regression that was inserted recently with Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards").

As a fix, shutdown notification should only occur when the AFU is mapped.

Fixes 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards")
---
 drivers/scsi/cxlflash/main.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/scsi/cxlflash/main.c +9 -1
index 860008d..661bb94 100644
@@ -778,7 +778,7 @@ static void notify_shutdown(struct cxlflash_cfg *cfg, bool wait)
 {
 	struct afu *afu = cfg->afu;
 	struct device *dev = &cfg->dev->dev;
-	struct sisl_global_map __iomem *global = &afu->afu_map->global;
+	struct sisl_global_map __iomem *global;
 	struct dev_dependent_vals *ddv;
 	u64 reg, status;
 	int i, retry_cnt = 0;
@@ -787,6 +787,14 @@ static void notify_shutdown(struct cxlflash_cfg *cfg, bool wait)
 	if (!(ddv->flags & CXLFLASH_NOTIFY_SHUTDOWN))
 		return;
 
+	if (!afu || !afu->afu_map) {
+		dev_dbg(dev, "%s: The problem state area is not mapped\n",
+			__func__);
+		return;
+	}
+
+	global = &afu->afu_map->global;
+
 	/* Notify AFU */
 	for (i = 0; i < NUM_FC_PORTS; i++) {
 		reg = readq_be(&global->fc_regs[i][FC_CONFIG2 / 8]);
Signature · 1 line
2.1.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] cxlflash: Verify problem state area is mapped before notifying shutdown

Quoted 16 lines · Uma Krishnan

If an EEH or some other hard error occurs while the adapter instance was being initialized, on the subsequent shutdown of the device, the system could crash with:

[c000000f1da03b60] c0000000005eccfc pci_device_shutdown+0x6c/0x100 [c000000f1da03ba0] c0000000006d67d4 device_shutdown+0x1b4/0x2c0 [c000000f1da03c40] c0000000000ea30c kernel_restart_prepare+0x5c/0x80 [c000000f1da03c70] c0000000000ea48c kernel_restart+0x2c/0xc0 [c000000f1da03ce0] c0000000000ea970 SyS_reboot+0x1c0/0x2d0 [c000000f1da03e30] c000000000009204 system_call+0x38/0xb4

This crash is due to the AFU not being mapped when the shutdown notification routine is called and is a regression that was inserted recently with Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards").

Quoted 4 lines

As a fix, shutdown notification should only occur when the AFU is mapped.

Fixes 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards")
Signature · 2 lines
Andrew Donnellan              OzLabs, ADL Canberra
[email protected]  IBM Australia Limited
Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] cxlflash: Verify problem state area is mapped before notifying shutdown

In reply to Uma Krishnan
Quoted 18 lines · Uma Krishnan

If an EEH or some other hard error occurs while the adapter instance was being initialized, on the subsequent shutdown of the device, the system could crash with:

[c000000f1da03b60] c0000000005eccfc pci_device_shutdown+0x6c/0x100 [c000000f1da03ba0] c0000000006d67d4 device_shutdown+0x1b4/0x2c0 [c000000f1da03c40] c0000000000ea30c kernel_restart_prepare+0x5c/0x80 [c000000f1da03c70] c0000000000ea48c kernel_restart+0x2c/0xc0 [c000000f1da03ce0] c0000000000ea970 SyS_reboot+0x1c0/0x2d0 [c000000f1da03e30] c000000000009204 system_call+0x38/0xb4

This crash is due to the AFU not being mapped when the shutdown notification routine is called and is a regression that was inserted recently with Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards").

Quoted 4 lines

As a fix, shutdown notification should only occur when the AFU is mapped.

Fixes 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash cards")
#4 lore raw

PATCH 2/2 MAINTAINERS: Update cxlflash maintainers

In reply to Uma Krishnan

Adding myself as a cxlflash maintainer.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 2dbc028..e5f5882 100644
@@ -3487,6 +3487,7 @@ F:	Documentation/ABI/testing/sysfs-class-cxl
 CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER
 M:	Manoj N. Kumar <[email protected]>
 M:	Matthew R. Ochs <[email protected]>
+M:	Uma Krishnan <[email protected]>
 L:	[email protected]
 S:	Supported
 F:	drivers/scsi/cxlflash/
Signature · 1 line
2.1.0
#6 lore raw
In reply to Uma Krishnan
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Uma" == Uma Krishnan <[email protected]> writes:

Uma> First patch in this set fixes a regression that was casued by the Uma> Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Uma> Flash cards"), which is currently staged for 4.8 in next/master. Uma> Second patch updates the Maintainers list for cxlflash driver.

Uma> This series is intended for 4.8 and is bisectable. These patches Uma> are cut against next/master that contains the original commit.

Applied to 4.8/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering