diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2008-04-17 01:46:08 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:47:00 -0400 |
commit | f60c768c387026499bbdefdd807d9124ae2b3a8c (patch) | |
tree | 22b699f18196b6fbd799ddcf7e8d8d5a749782f0 /drivers/s390/block | |
parent | c2e8b8531b162fb314434f1f2608ba1ddf46b98f (diff) |
[S390] dasd: add sim handling.
Now the system reports system information messages (SIM) to the user.
The System Reference Code (SRC) which is reported to the user gives
the abbility to lookup the reason of the SIM online in the
documentation of the storage server.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd_3990_erp.c | 34 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 7 | ||||
-rw-r--r-- | drivers/s390/block/dasd_int.h | 6 |
3 files changed, 47 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index b19db20a0bef..e6700df52df4 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -1996,6 +1996,36 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense) | |||
1996 | } /* end dasd_3990_erp_compound */ | 1996 | } /* end dasd_3990_erp_compound */ |
1997 | 1997 | ||
1998 | /* | 1998 | /* |
1999 | *DASD_3990_ERP_HANDLE_SIM | ||
2000 | * | ||
2001 | *DESCRIPTION | ||
2002 | * inspects the SIM SENSE data and starts an appropriate action | ||
2003 | * | ||
2004 | * PARAMETER | ||
2005 | * sense sense data of the actual error | ||
2006 | * | ||
2007 | * RETURN VALUES | ||
2008 | * none | ||
2009 | */ | ||
2010 | void | ||
2011 | dasd_3990_erp_handle_sim(struct dasd_device *device, char *sense) | ||
2012 | { | ||
2013 | /* print message according to log or message to operator mode */ | ||
2014 | if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { | ||
2015 | |||
2016 | /* print SIM SRC from RefCode */ | ||
2017 | DEV_MESSAGE(KERN_ERR, device, "SIM - SRC: " | ||
2018 | "%02x%02x%02x%02x", sense[22], | ||
2019 | sense[23], sense[11], sense[12]); | ||
2020 | } else if (sense[24] & DASD_SIM_LOG) { | ||
2021 | /* print SIM SRC Refcode */ | ||
2022 | DEV_MESSAGE(KERN_WARNING, device, "SIM - SRC: " | ||
2023 | "%02x%02x%02x%02x", sense[22], | ||
2024 | sense[23], sense[11], sense[12]); | ||
2025 | } | ||
2026 | } | ||
2027 | |||
2028 | /* | ||
1999 | * DASD_3990_ERP_INSPECT_32 | 2029 | * DASD_3990_ERP_INSPECT_32 |
2000 | * | 2030 | * |
2001 | * DESCRIPTION | 2031 | * DESCRIPTION |
@@ -2018,6 +2048,10 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2018 | 2048 | ||
2019 | erp->function = dasd_3990_erp_inspect_32; | 2049 | erp->function = dasd_3990_erp_inspect_32; |
2020 | 2050 | ||
2051 | /* check for SIM sense data */ | ||
2052 | if ((sense[6] & DASD_SIM_SENSE) == DASD_SIM_SENSE) | ||
2053 | dasd_3990_erp_handle_sim(device, sense); | ||
2054 | |||
2021 | if (sense[25] & DASD_SENSE_BIT_0) { | 2055 | if (sense[25] & DASD_SENSE_BIT_0) { |
2022 | 2056 | ||
2023 | /* compound program action codes (byte25 bit 0 == '1') */ | 2057 | /* compound program action codes (byte25 bit 0 == '1') */ |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 61f16937c1e0..a0edae091b5e 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -1415,6 +1415,13 @@ static void dasd_eckd_handle_unsolicited_interrupt(struct dasd_device *device, | |||
1415 | return; | 1415 | return; |
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | |||
1419 | /* service information message SIM */ | ||
1420 | if ((irb->ecw[6] & DASD_SIM_SENSE) == DASD_SIM_SENSE) { | ||
1421 | dasd_3990_erp_handle_sim(device, irb->ecw); | ||
1422 | return; | ||
1423 | } | ||
1424 | |||
1418 | /* just report other unsolicited interrupts */ | 1425 | /* just report other unsolicited interrupts */ |
1419 | DEV_MESSAGE(KERN_DEBUG, device, "%s", | 1426 | DEV_MESSAGE(KERN_DEBUG, device, "%s", |
1420 | "unsolicited interrupt received"); | 1427 | "unsolicited interrupt received"); |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 44b2984dfbee..6c624bf44617 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -72,6 +72,11 @@ struct dasd_block; | |||
72 | #define DASD_SENSE_BIT_2 0x20 | 72 | #define DASD_SENSE_BIT_2 0x20 |
73 | #define DASD_SENSE_BIT_3 0x10 | 73 | #define DASD_SENSE_BIT_3 0x10 |
74 | 74 | ||
75 | /* BIT DEFINITIONS FOR SIM SENSE */ | ||
76 | #define DASD_SIM_SENSE 0x0F | ||
77 | #define DASD_SIM_MSG_TO_OP 0x03 | ||
78 | #define DASD_SIM_LOG 0x0C | ||
79 | |||
75 | /* | 80 | /* |
76 | * SECTION: MACROs for klogd and s390 debug feature (dbf) | 81 | * SECTION: MACROs for klogd and s390 debug feature (dbf) |
77 | */ | 82 | */ |
@@ -621,6 +626,7 @@ void dasd_log_sense(struct dasd_ccw_req *, struct irb *); | |||
621 | 626 | ||
622 | /* externals in dasd_3990_erp.c */ | 627 | /* externals in dasd_3990_erp.c */ |
623 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); | 628 | struct dasd_ccw_req *dasd_3990_erp_action(struct dasd_ccw_req *); |
629 | void dasd_3990_erp_handle_sim(struct dasd_device *, char *); | ||
624 | 630 | ||
625 | /* externals in dasd_eer.c */ | 631 | /* externals in dasd_eer.c */ |
626 | #ifdef CONFIG_DASD_EER | 632 | #ifdef CONFIG_DASD_EER |