scsi: pm80xx: Add controller SCSI host fatal error uevents
authorSalomon Dushimirimana <salomondush@google.com>
Mon, 16 Jun 2025 19:00:18 +0000 (19:00 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 23 Jun 2025 17:17:21 +0000 (13:17 -0400)
commitc7ee6c8f2f1e3d4b8efa6ac957289676a3f5cd51
treec54f679a3fadd7cde32acd1bd37073e971d1df63
parent94bb40796face4327a5227d8763fd1cf2cbfc6f5
scsi: pm80xx: Add controller SCSI host fatal error uevents

Add pm80xx_fatal_error_uevent_emit() which is called when the pm80xx
driver encouters a fatal error. The uevent has the following additional
custom key/value pair sets:

 - DRIVER: driver name, pm80xx in this case
 - HBA_NUM: the scsi host id of the device
 - EVENT_TYPE: to indicate a fatal error
 - REPORTED_BY: either driver or firmware

The uevent is anchored to the kernel object that represents the SCSI
controller, which includes other useful core variables, such as, ACTION,
DEVPATH, SUBSYSTEM, and more.

The fatal_error_uevent_emit() function is called when the controller
fatal error state changes. Since this doesn't happen often for a
specific SCSI host, there is no worries of a uevent storm.

Signed-off-by: Salomon Dushimirimana <salomondush@google.com>
Link: https://lore.kernel.org/r/20250616190018.2136260-1-salomondush@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_sas.h
drivers/scsi/pm8001/pm80xx_hwi.c