|
Pablo Greco |
e6a3ae |
From f7d509d82aeb0af595c6dcfade7904b248ed180b Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
e6a3ae |
From: Thomas Huth <thuth@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Date: Mon, 14 Oct 2019 10:06:38 +0100
|
|
Pablo Greco |
e6a3ae |
Subject: [PATCH 13/21] s390-bios: cio error handling
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
RH-Author: Thomas Huth <thuth@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Message-id: <20191014100645.22862-11-thuth@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Patchwork-id: 91787
|
|
Pablo Greco |
e6a3ae |
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH v2 10/17] s390-bios: cio error handling
|
|
Pablo Greco |
e6a3ae |
Bugzilla: 1664376
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
From: "Jason J. Herne" <jjherne@linux.ibm.com>
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Add verbose error output for when unexpected i/o errors happen. This eases the
|
|
Pablo Greco |
e6a3ae |
burden of debugging and reporting i/o errors. No error information is printed
|
|
Pablo Greco |
e6a3ae |
in the success case, here is an example of what is output on error:
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
cio device error
|
|
Pablo Greco |
e6a3ae |
ssid : 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
cssid : 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
sch_no: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Interrupt Response Block Data:
|
|
Pablo Greco |
e6a3ae |
Function Ctrl : [Start]
|
|
Pablo Greco |
e6a3ae |
Activity Ctrl : [Start-Pending]
|
|
Pablo Greco |
e6a3ae |
Status Ctrl : [Alert] [Primary] [Secondary] [Status-Pending]
|
|
Pablo Greco |
e6a3ae |
Device Status : [Unit-Check]
|
|
Pablo Greco |
e6a3ae |
Channel Status :
|
|
Pablo Greco |
e6a3ae |
cpa=: 0x000000007f8d6038
|
|
Pablo Greco |
e6a3ae |
prev_ccw=: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
this_ccw=: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
Eckd Dasd Sense Data (fmt 32-bytes):
|
|
Pablo Greco |
e6a3ae |
Sense Condition Flags :
|
|
Pablo Greco |
e6a3ae |
Residual Count =: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
Phys Drive ID =: 0x000000000000009e
|
|
Pablo Greco |
e6a3ae |
low cyl address =: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
head addr & hi cyl =: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
format/message =: 0x0000000000000008
|
|
Pablo Greco |
e6a3ae |
fmt-dependent[0-7] =: 0x0000000000000004
|
|
Pablo Greco |
e6a3ae |
fmt-dependent[8-15]=: 0xe561282305082fff
|
|
Pablo Greco |
e6a3ae |
prog action code =: 0x0000000000000016
|
|
Pablo Greco |
e6a3ae |
Configuration info =: 0x00000000000040e0
|
|
Pablo Greco |
e6a3ae |
mcode / hi-cyl =: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
cyl & head addr [0]=: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
cyl & head addr [1]=: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
cyl & head addr [2]=: 0x0000000000000000
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
The Sense Data section is currently only printed for ECKD DASD.
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com>
|
|
Pablo Greco |
e6a3ae |
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Message-Id: <1554388475-18329-10-git-send-email-jjherne@linux.ibm.com>
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
Pablo Greco |
e6a3ae |
(cherry picked from commit 86c58705bb186cfa73a03851047da2c2c37b9418)
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
Pablo Greco |
e6a3ae |
---
|
|
Pablo Greco |
e6a3ae |
pc-bios/s390-ccw/cio.c | 235 ++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Pablo Greco |
e6a3ae |
pc-bios/s390-ccw/libc.h | 11 +++
|
|
Pablo Greco |
e6a3ae |
2 files changed, 246 insertions(+)
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/pc-bios/s390-ccw/cio.c b/pc-bios/s390-ccw/cio.c
|
|
Pablo Greco |
e6a3ae |
index c43e50b..339ec5f 100644
|
|
Pablo Greco |
e6a3ae |
--- a/pc-bios/s390-ccw/cio.c
|
|
Pablo Greco |
e6a3ae |
+++ b/pc-bios/s390-ccw/cio.c
|
|
Pablo Greco |
e6a3ae |
@@ -85,6 +85,228 @@ static bool irb_error(Irb *irb)
|
|
Pablo Greco |
e6a3ae |
return irb->scsw.dstat != (SCSW_DSTAT_DEVEND | SCSW_DSTAT_CHEND);
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
+static void print_eckd_dasd_sense_data(SenseDataEckdDasd *sd)
|
|
Pablo Greco |
e6a3ae |
+{
|
|
Pablo Greco |
e6a3ae |
+ char msgline[512];
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ if (sd->config_info & 0x8000) {
|
|
Pablo Greco |
e6a3ae |
+ sclp_print("Eckd Dasd Sense Data (fmt 24-bytes):\n");
|
|
Pablo Greco |
e6a3ae |
+ } else {
|
|
Pablo Greco |
e6a3ae |
+ sclp_print("Eckd Dasd Sense Data (fmt 32-bytes):\n");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Sense Condition Flags :");
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_CMD_REJECT) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Cmd-Reject]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_INTERVENTION_REQ) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Intervention-Required]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_BUS_OUT_CHECK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Bus-Out-Parity-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_EQUIPMENT_CHECK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Equipment-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_DATA_CHECK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Data-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_OVERRUN) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Overrun]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->common_status & SNS_STAT0_INCOMPL_DOMAIN) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Incomplete-Domain]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_PERM_ERR) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Permanent-Error]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_INV_TRACK_FORMAT) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Invalid-Track-Fmt]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_EOC) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [End-of-Cyl]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_MESSAGE_TO_OPER) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Operator-Msg]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_NO_REC_FOUND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [No-Record-Found]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_FILE_PROTECTED) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [File-Protected]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_WRITE_INHIBITED) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Write-Inhibited]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[0] & SNS_STAT1_IMPRECISE_END) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Imprecise-Ending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[1] & SNS_STAT2_REQ_INH_WRITE) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Req-Inhibit-Write]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[1] & SNS_STAT2_CORRECTABLE) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Correctable-Data-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[1] & SNS_STAT2_FIRST_LOG_ERR) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [First-Error-Log]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[1] & SNS_STAT2_ENV_DATA_PRESENT) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Env-Data-Present]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (sd->status[1] & SNS_STAT2_IMPRECISE_END) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Imprecise-End]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ print_int(" Residual Count =", sd->res_count);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" Phys Drive ID =", sd->phys_drive_id);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" low cyl address =", sd->low_cyl_addr);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" head addr & hi cyl =", sd->head_high_cyl_addr);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" format/message =", sd->fmt_msg);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" fmt-dependent[0-7] =", sd->fmt_dependent_info[0]);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" fmt-dependent[8-15]=", sd->fmt_dependent_info[1]);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" prog action code =", sd->program_action_code);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" Configuration info =", sd->config_info);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" mcode / hi-cyl =", sd->mcode_hicyl);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" cyl & head addr [0]=", sd->cyl_head_addr[0]);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" cyl & head addr [1]=", sd->cyl_head_addr[1]);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" cyl & head addr [2]=", sd->cyl_head_addr[2]);
|
|
Pablo Greco |
e6a3ae |
+}
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+static void print_irb_err(Irb *irb)
|
|
Pablo Greco |
e6a3ae |
+{
|
|
Pablo Greco |
e6a3ae |
+ uint64_t this_ccw = *(uint64_t *)u32toptr(irb->scsw.cpa);
|
|
Pablo Greco |
e6a3ae |
+ uint64_t prev_ccw = *(uint64_t *)u32toptr(irb->scsw.cpa - 8);
|
|
Pablo Greco |
e6a3ae |
+ char msgline[256];
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ sclp_print("Interrupt Response Block Data:\n");
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Function Ctrl :");
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_FCTL_START_FUNC) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Start]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_FCTL_HALT_FUNC) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Halt]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_FCTL_CLEAR_FUNC) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Clear]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ msgline[0] = '\0';
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Activity Ctrl :");
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_RESUME_PEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Resume-Pending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_START_PEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Start-Pending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_HALT_PEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Halt-Pending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_CLEAR_PEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Clear-Pending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_CH_ACTIVE) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Channel-Active]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_DEV_ACTIVE) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Device-Active]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_ACTL_SUSPENDED) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Suspended]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ msgline[0] = '\0';
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Status Ctrl :");
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_SCTL_ALERT) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Alert]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_SCTL_INTERMED) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Intermediate]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_SCTL_PRIMARY) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Primary]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_SCTL_SECONDARY) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Secondary]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.ctrl & SCSW_SCTL_STATUS_PEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Status-Pending]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ msgline[0] = '\0';
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Device Status :");
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_ATTN) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Attention]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_STATMOD) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Status-Modifier]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_CUEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Ctrl-Unit-End]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_BUSY) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Busy]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_CHEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Channel-End]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_DEVEND) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Device-End]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_UCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Unit-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.dstat & SCSW_DSTAT_UEXCP) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Unit-Exception]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ msgline[0] = '\0';
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " Channel Status :");
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_PCINT) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Program-Ctrl-Interruption]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_BADLEN) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Incorrect-Length]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_PROGCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Program-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_PROTCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Protection-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_CHDCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Channel-Data-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_CHCCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Channel-Ctrl-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_ICCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Interface-Ctrl-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ if (irb->scsw.cstat & SCSW_CSTAT_CHAINCHK) {
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, " [Chaining-Check]");
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ strcat(msgline, "\n");
|
|
Pablo Greco |
e6a3ae |
+ sclp_print(msgline);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ print_int(" cpa=", irb->scsw.cpa);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" prev_ccw=", prev_ccw);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" this_ccw=", this_ccw);
|
|
Pablo Greco |
e6a3ae |
+}
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
/*
|
|
Pablo Greco |
e6a3ae |
* Handles executing ssch, tsch and returns the irb obtained from tsch.
|
|
Pablo Greco |
e6a3ae |
* Returns 0 on success, -1 if unexpected status pending and we need to retry,
|
|
Pablo Greco |
e6a3ae |
@@ -180,6 +402,19 @@ int do_cio(SubChannelId schid, uint16_t cutype, uint32_t ccw_addr, int fmt)
|
|
Pablo Greco |
e6a3ae |
continue;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
+ sclp_print("cio device error\n");
|
|
Pablo Greco |
e6a3ae |
+ print_int(" ssid ", schid.ssid);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" cssid ", schid.cssid);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" sch_no", schid.sch_no);
|
|
Pablo Greco |
e6a3ae |
+ print_int(" ctrl-unit type", cutype);
|
|
Pablo Greco |
e6a3ae |
+ sclp_print("\n");
|
|
Pablo Greco |
e6a3ae |
+ print_irb_err(&irb);
|
|
Pablo Greco |
e6a3ae |
+ if (cutype == CU_TYPE_DASD_3990 || cutype == CU_TYPE_DASD_2107 ||
|
|
Pablo Greco |
e6a3ae |
+ cutype == CU_TYPE_UNKNOWN) {
|
|
Pablo Greco |
e6a3ae |
+ if (!basic_sense(schid, cutype, &sd, sizeof(sd))) {
|
|
Pablo Greco |
e6a3ae |
+ print_eckd_dasd_sense_data(&sd);
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
rc = -1;
|
|
Pablo Greco |
e6a3ae |
break;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
diff --git a/pc-bios/s390-ccw/libc.h b/pc-bios/s390-ccw/libc.h
|
|
Pablo Greco |
e6a3ae |
index 818517f..bcdc457 100644
|
|
Pablo Greco |
e6a3ae |
--- a/pc-bios/s390-ccw/libc.h
|
|
Pablo Greco |
e6a3ae |
+++ b/pc-bios/s390-ccw/libc.h
|
|
Pablo Greco |
e6a3ae |
@@ -67,6 +67,17 @@ static inline size_t strlen(const char *str)
|
|
Pablo Greco |
e6a3ae |
return i;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
+static inline char *strcat(char *dest, const char *src)
|
|
Pablo Greco |
e6a3ae |
+{
|
|
Pablo Greco |
e6a3ae |
+ int i;
|
|
Pablo Greco |
e6a3ae |
+ char *dest_end = dest + strlen(dest);
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ for (i = 0; i <= strlen(src); i++) {
|
|
Pablo Greco |
e6a3ae |
+ dest_end[i] = src[i];
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
+ return dest;
|
|
Pablo Greco |
e6a3ae |
+}
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
static inline int isdigit(int c)
|
|
Pablo Greco |
e6a3ae |
{
|
|
Pablo Greco |
e6a3ae |
return (c >= '0') && (c <= '9');
|
|
Pablo Greco |
e6a3ae |
--
|
|
Pablo Greco |
e6a3ae |
1.8.3.1
|
|
Pablo Greco |
e6a3ae |
|