cxl: Add ability to reset the card
authorRyan Grimm <grimm@linux.vnet.ibm.com>
Mon, 19 Jan 2015 17:52:51 +0000 (11:52 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Jan 2015 06:31:52 +0000 (17:31 +1100)
commit62fa19d4b4fd781ad37c9155c6332f28a9e97a2c
treebd2a354aa2e928e7fd60b347a784e2e0b6d49d3e
parent1212aa1c8c9ca34642f7737e1edaa96c9ce3d7dd
cxl: Add ability to reset the card

Adds reset to sysfs which will PERST the card. If load_image_on_perst is set
to "user" or "factory", the PERST will cause that image to be loaded.

load_image_on_perst is set to "user" for production.

"none" could be used for debugging. The PSL trace arrays are preserved which
then can be read through debugfs.

PERST also triggers CAPP recovery. An HMI comes in, which is handled by EEH.
EEH unbinds the driver, calls into Sapphire to reinitialize the PHB, then
rebinds the driver.

Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Documentation/ABI/testing/sysfs-class-cxl
drivers/misc/cxl/cxl.h
drivers/misc/cxl/pci.c
drivers/misc/cxl/sysfs.c