On 2/4/19 6:41 AM, Cornelia Huck wrote:
...

+static void print_irb_err(Irb *irb)
+{
+    Ccw0 *this_ccw = u32toptr(irb->scsw.cpa);
+    Ccw0 *prev_ccw = u32toptr(irb->scsw.cpa - 8);

I don't think you can cast this conditionally to format 0 -- I'd pass
in the format from do_cio and handle it accordingly.

+    char msgline[256];
+
+    sclp_print("vfio-ccw device I/O error - Interrupt Response Block Data:\n");

If you call this from the generic function, you shouldn't talk about
vfio-ccw here; but it might make sense to print subchannel/devno and
the cu type.

(...)


Fixed for v3.


@@ -148,6 +370,9 @@ int do_cio(SubChannelId schid, uint32_t ccw_addr, int fmt)
              continue;
          }
+ print_irb_err(&irb);
+        basic_sense(schid, &sd, sizeof(sd));
+        print_eckd_dasd_sense_data(&sd);

I think this should only be printed for actual dasds (and maybe only
print it if there is actually sense data available)?


Good point. Currently do_cio doesn't have any info on its device type. Should I pass in the controller type? Thats the easiest way I can think of to make the decision.

--
-- Jason J. Herne (jjhe...@linux.ibm.com)


Reply via email to