scsi: pm80xx: add controller scsi host fatal error uevents
Subsystems (2)
PATCH 1/1 scsi: pm80xx: add controller scsi host fatal error uevents
Adds pm80xx_fatal_error_uevent_emit(), 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.
--- drivers/scsi/pm8001/pm8001_sas.h | 10 +++++++ drivers/scsi/pm8001/pm80xx_hwi.c | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+)
drivers/scsi/pm8001/pm8001_sas.h +10 -0
@@ -170,6 +170,14 @@ struct forensic_data {#define SPCV_MSGU_CFG_TABLE_TRANSFER_DEBUG_INFO 0x80#define MAIN_MERRDCTO_MERRDCES 0xA0/* DWORD 0x28) */ +/** +* enum fatal_error_reporter: Indicates the originator of the fatal error +*/ +enum fatal_error_reporter { +REPORTER_DRIVER , +REPORTER_FIRMWARE , +}; +struct pm8001_dispatch {char *name;int (*chip_init)(struct pm8001_hba_info *pm8001_ha);
@@ -715,6 +723,8 @@ ssize_t pm80xx_get_non_fatal_dump(struct device *cdev, struct device_attribute *attr, char *buf);ssize_t pm8001_get_gsm_dump (struct device *cdev,u32 ,char *buf);int pm80xx_fatal_errors (struct pm8001_hba_info *pm8001_ha); +void pm80xx_fatal_error_uevent_emit (struct pm8001_hba_info *pm8001_ha, +enum fatal_error_reporter error_reporter);void pm8001_free_dev (struct pm8001_device *pm8001_dev);/* ctl shared API */ extern const struct attribute_group *pm8001_host_groups[];
drivers/scsi/pm8001/pm80xx_hwi.c +48 -0
66 lines not on this page · raw message
Signature · 1 line
2.50.0.rc2.696.g1fc2a0284f-goog
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Salomon,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v6.16-rc1 next-20250613] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Salomon-Dushimirimana/scsi-pm80xx-add-controller-scsi-host-fatal-error-uevents/20250613-052945 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next patch link: https://lore.kernel.org/r/20250612212504.512786-1-salomondush%40google.com patch subject: [PATCH] scsi: pm80xx: add controller scsi host fatal error uevents config: x86_64-kexec (https://download.01.org/0day-ci/archive/20250613/[email protected]/config) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250613/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> Warning: drivers/scsi/pm8001/pm80xx_hwi.c:1560 function parameter 'error_reporter' not described in 'pm80xx_fatal_error_uevent_emit' >> Warning: drivers/scsi/pm8001/pm80xx_hwi.c:1560 Excess function parameter 'error_type' description in 'pm80xx_fatal_error_uevent_emit'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH v2 1/1 scsi: pm80xx: add controller scsi host fatal error uevents
In reply to Salomon DushimirimanaAdds pm80xx_fatal_error_uevent_emit(), 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.
---
Changelog since v2:
- Fix kernel test robot build warnings.
drivers/scsi/pm8001/pm8001_sas.h | 10 +++++++ drivers/scsi/pm8001/pm80xx_hwi.c | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+)
drivers/scsi/pm8001/pm8001_sas.h +10 -0
@@ -170,6 +170,14 @@ struct forensic_data {#define SPCV_MSGU_CFG_TABLE_TRANSFER_DEBUG_INFO 0x80#define MAIN_MERRDCTO_MERRDCES 0xA0/* DWORD 0x28) */ +/** +* enum fatal_error_reporter: Indicates the originator of the fatal error +*/ +enum fatal_error_reporter { +REPORTER_DRIVER , +REPORTER_FIRMWARE , +}; +struct pm8001_dispatch {char *name;int (*chip_init)(struct pm8001_hba_info *pm8001_ha);
@@ -715,6 +723,8 @@ ssize_t pm80xx_get_non_fatal_dump(struct device *cdev, struct device_attribute *attr, char *buf);ssize_t pm8001_get_gsm_dump (struct device *cdev,u32 ,char *buf);int pm80xx_fatal_errors (struct pm8001_hba_info *pm8001_ha); +void pm80xx_fatal_error_uevent_emit (struct pm8001_hba_info *pm8001_ha, +enum fatal_error_reporter error_reporter);void pm8001_free_dev (struct pm8001_device *pm8001_dev);/* ctl shared API */ extern const struct attribute_group *pm8001_host_groups[];
drivers/scsi/pm8001/pm80xx_hwi.c +48 -0
66 lines not on this page · raw message
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
PATCH v3 1/1 scsi: pm80xx: add controller scsi host fatal error uevents
In reply to Salomon DushimirimanaAdds pm80xx_fatal_error_uevent_emit(), 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.
---
Changelog since v2:
- Same intention as v2 but actually includes the changes to fix build warnings
drivers/scsi/pm8001/pm8001_sas.h | 10 +++++++ drivers/scsi/pm8001/pm80xx_hwi.c | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+)
drivers/scsi/pm8001/pm8001_sas.h +10 -0
@@ -170,6 +170,14 @@ struct forensic_data {#define SPCV_MSGU_CFG_TABLE_TRANSFER_DEBUG_INFO 0x80#define MAIN_MERRDCTO_MERRDCES 0xA0/* DWORD 0x28) */ +/** +* enum fatal_error_reporter: Indicates the originator of the fatal error +*/ +enum fatal_error_reporter { +REPORTER_DRIVER , +REPORTER_FIRMWARE , +}; +struct pm8001_dispatch {char *name;int (*chip_init)(struct pm8001_hba_info *pm8001_ha);
@@ -715,6 +723,8 @@ ssize_t pm80xx_get_non_fatal_dump(struct device *cdev, struct device_attribute *attr, char *buf);ssize_t pm8001_get_gsm_dump (struct device *cdev,u32 ,char *buf);int pm80xx_fatal_errors (struct pm8001_hba_info *pm8001_ha); +void pm80xx_fatal_error_uevent_emit (struct pm8001_hba_info *pm8001_ha, +enum fatal_error_reporter error_reporter);void pm8001_free_dev (struct pm8001_device *pm8001_dev);/* ctl shared API */ extern const struct attribute_group *pm8001_host_groups[];
drivers/scsi/pm8001/pm80xx_hwi.c +48 -0
66 lines not on this page · raw message
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
Martin K. Petersen
AppliedSalomon,
Quoted 3 lines
Adds
pm80xx_fatal_error_uevent_emit(), called when the pm80xx driver encouters a fatal error. The uevent has the following additional custom key/value pair sets:
Applied to 6.17/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 10 lines · Salomon Dushimirimana
Adds
pm80xx_fatal_error_uevent_emit(), 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[...]
Applied to 6.17/scsi-queue, thanks!
[1/1] scsi: pm80xx: add controller scsi host fatal error uevents
https://git.kernel.org/mkp/scsi/c/c7ee6c8f2f1e
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering