2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 19:53:59 +08:00
linux-next/drivers/scsi/cxlflash
Uma Krishnan 1bd2b2823e 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 704c4b0ddc ("cxlflash: Shutdown notify support
for CXL Flash cards").

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

Fixes: 704c4b0ddc ("cxlflash: Shutdown notify support for CXL Flash cards")
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-07-27 00:32:06 -04:00
..
common.h powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
Kconfig
lunmgt.c cxlflash: Fix to avoid corrupting port selection mask 2015-10-30 17:23:55 +09:00
main.c cxlflash: Verify problem state area is mapped before notifying shutdown 2016-07-27 00:32:06 -04:00
main.h cxlflash: Shutdown notify support for CXL Flash cards 2016-07-12 23:16:31 -04:00
Makefile cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sislite.h cxlflash: Shutdown notify support for CXL Flash cards 2016-07-12 23:16:31 -04:00
superpipe.c cxlflash: Fix to resolve dead-lock during EEH recovery 2016-05-05 21:02:17 -04:00
superpipe.h cxlflash: Split out context initialization 2016-03-08 21:17:33 -05:00
vlun.c cxlflash: Fix to avoid virtual LUN failover failure 2016-01-06 20:50:08 -05:00
vlun.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00