s390/dasd: suppress command reject error for query host access command
authorStefan Haberland <sth@linux.vnet.ibm.com>
Wed, 22 Mar 2017 10:06:20 +0000 (11:06 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 28 Mar 2017 14:54:28 +0000 (16:54 +0200)
On some z/VM systems the query host access command is not supported for
temp disks, though the corresponding feature code is set.
This does not have any impact beside that the information is not available.
Suppress the full blown command reject error messages to not confuse the
user. The error is still logged in the s390dbf.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_int.h

index 774da20ceb58a794d895a64ca857426d5a239642..107cd3361e2949ebddee3a8dd7e792b6060b028b 100644 (file)
@@ -1052,8 +1052,9 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
        } else {
                /* fatal error -  set status to FAILED
                   internal error 09 - Command Reject */
-               dev_err(&device->cdev->dev, "An error occurred in the DASD "
-                       "device driver, reason=%s\n", "09");
+               if (!test_bit(DASD_CQR_SUPPRESS_CR, &erp->flags))
+                       dev_err(&device->cdev->dev,
+                               "An error occurred in the DASD device driver, reason=09\n");
 
                erp = dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
        }
index eb090e85b02e52bfe08f1a2ede8574e22533e477..122456e4db89cc466dcc36342c12cd2af5ed8096 100644 (file)
@@ -4927,10 +4927,14 @@ static void dasd_eckd_dump_sense(struct dasd_device *device,
                dasd_eckd_dump_sense_tcw(device, req, irb);
        } else {
                /*
-                * In some cases the 'No Record Found' error might be expected
-                * and log messages shouldn't be written then. Check if the
-                * according suppress bit is set.
+                * In some cases the 'Command Reject' or 'No Record Found'
+                * error might be expected and log messages shouldn't be
+                * written then. Check if the according suppress bit is set.
                 */
+               if (sense && sense[0] & SNS0_CMD_REJECT &&
+                   test_bit(DASD_CQR_SUPPRESS_CR, &req->flags))
+                       return;
+
                if (sense && sense[1] & SNS1_NO_REC_FOUND &&
                    test_bit(DASD_CQR_SUPPRESS_NRF, &req->flags))
                        return;
@@ -5223,6 +5227,8 @@ static int dasd_eckd_query_host_access(struct dasd_device *device,
 
        cqr->buildclk = get_tod_clock();
        cqr->status = DASD_CQR_FILLED;
+       /* the command might not be supported, suppress error message */
+       __set_bit(DASD_CQR_SUPPRESS_CR, &cqr->flags);
        rc = dasd_sleep_on_interruptible(cqr);
        if (rc == 0) {
                *data = *host_access;
index 518dba2732d5b7498b1d068d772f664365e8c64c..dca7cb1e6f651d91790045f50ac0801a36da6795 100644 (file)
@@ -239,11 +239,11 @@ struct dasd_ccw_req {
                                         */
 /*
  * The following flags are used to suppress output of certain errors.
- * These flags should only be used for format checks!
  */
 #define DASD_CQR_SUPPRESS_NRF  4       /* Suppress 'No Record Found' error */
 #define DASD_CQR_SUPPRESS_FP   5       /* Suppress 'File Protected' error*/
 #define DASD_CQR_SUPPRESS_IL   6       /* Suppress 'Incorrect Length' error */
+#define DASD_CQR_SUPPRESS_CR   7       /* Suppress 'Command Reject' error */
 
 /* Signature for error recovery functions. */
 typedef struct dasd_ccw_req *(*dasd_erp_fn_t) (struct dasd_ccw_req *);