Bug#550898: DASD DIAG driver doesn't work for read-only minidisks (s390, s390x only)
This bug report applies to the s390 and s390x Linux kernel architectures only.
I am reasonably certain that this is not a Debian-specific bug but
applies to all distributions. Nevertheless, since I am using Debian
I will report it to Debian. Please call this bug report to the
attention of the appropriate upstream kernel development team.
When using the DASD DIAG driver with a read-only minidisk, the
initialize function of DIAG X'250' fails. The error message produced
goes something like this:
dasd(diag) 0.0.0404: DIAG initialization failed (rc=4)
dasd_generic couldn't online device 0.0.0404 with discipline DIAG rc=-5
Consulting the IBM manual "CP Programming Services" for DIAG X'250',
I find the following explanation for return code 4 for the initialize
Initialization for DIAGNOSE code X'250'
to the specified virtual device is
complete. The virtual device is
read-only. The starting block number and
the ending block number have been stored
in the BIOPL.
In other words, this is a normal condition, not an error. It is
simply a warning that this minidisk is read-only. The correct
response by the program should be to treat a return code of 4
the same as a return code of 0, provided that the device really
is read-only. A return code of 4 for a device that is supposedly
read-write is a sanity-check error that you might want to check
for. Otherwise, a return code of 4 is a normal and expected
I don't claim to be a C programmer, but it appears to me that
the mdsk_init_io internal subroutine of /drivers/s390/block/dasd_diag.c
is the culprit.