scsi: qedf: Use devlink to report errors and recovery
authorJaved Hasan <jhasan@marvell.com>
Wed, 31 Mar 2021 16:49:17 +0000 (09:49 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Apr 2021 04:26:12 +0000 (00:26 -0400)
commit9d6f87c25ad57b52a4dc8c2d904ead37fe829512
tree11ce2b1ff29becdf458d3d079f46d404bc5328d7
parent4aab946f789ed7c2e44481f395ab2eab0b63824a
scsi: qedf: Use devlink to report errors and recovery

Use devlink_health_report() to push error indications.

Implement this in qede via a callback function to make it possible to reuse
it for other drivers sitting on top of qed in future. Also remove forcible
recovery trigger and put it as a normal devlink callback in qed module.

This allows user to enable/disable it via:

    devlink health set pci/xxxx:xx:xx.x reporter fw_fatal auto_recover false

Link: https://lore.kernel.org/r/20210331164917.24662-3-jhasan@marvell.com
Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_main.c