Commit 6779df40 authored by Jan Höppner's avatar Jan Höppner Committed by Martin Schwidefsky

s390/sclp: Allow to request adapter reset

The SCLP event 24 "Adapter Error Notification" supports three different
action qualifier of which 'adapter reset' is currently not enabled in
the sysfs interface. However, userspace tools might want to be able
to use the reset functionality as well. Enable the 'adapter reset'
qualifier.
Signed-off-by: default avatarJan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: default avatarSebastian Ott <sebott@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 734781a9
...@@ -95,6 +95,7 @@ extern struct sclp_info sclp; ...@@ -95,6 +95,7 @@ extern struct sclp_info sclp;
struct zpci_report_error_header { struct zpci_report_error_header {
u8 version; /* Interface version byte */ u8 version; /* Interface version byte */
u8 action; /* Action qualifier byte u8 action; /* Action qualifier byte
* 0: Adapter Reset Request
* 1: Deconfigure and repair action requested * 1: Deconfigure and repair action requested
* (OpenCrypto Problem Call Home) * (OpenCrypto Problem Call Home)
* 2: Informational Report * 2: Informational Report
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define SCLP_ATYPE_PCI 2 #define SCLP_ATYPE_PCI 2
#define SCLP_ERRNOTIFY_AQ_RESET 0
#define SCLP_ERRNOTIFY_AQ_REPAIR 1 #define SCLP_ERRNOTIFY_AQ_REPAIR 1
#define SCLP_ERRNOTIFY_AQ_INFO_LOG 2 #define SCLP_ERRNOTIFY_AQ_INFO_LOG 2
...@@ -111,9 +112,14 @@ static int sclp_pci_check_report(struct zpci_report_error_header *report) ...@@ -111,9 +112,14 @@ static int sclp_pci_check_report(struct zpci_report_error_header *report)
if (report->version != 1) if (report->version != 1)
return -EINVAL; return -EINVAL;
if (report->action != SCLP_ERRNOTIFY_AQ_REPAIR && switch (report->action) {
report->action != SCLP_ERRNOTIFY_AQ_INFO_LOG) case SCLP_ERRNOTIFY_AQ_RESET:
case SCLP_ERRNOTIFY_AQ_REPAIR:
case SCLP_ERRNOTIFY_AQ_INFO_LOG:
break;
default:
return -EINVAL; return -EINVAL;
}
if (report->length > (PAGE_SIZE - sizeof(struct err_notify_sccb))) if (report->length > (PAGE_SIZE - sizeof(struct err_notify_sccb)))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment