]> git.itanic.dy.fi Git - linux-stable/commitdiff
s390/dasd: check if query host access feature is supported
authorStefan Haberland <sth@linux.vnet.ibm.com>
Wed, 22 Mar 2017 09:30:40 +0000 (10:30 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 28 Mar 2017 14:54:27 +0000 (16:54 +0200)
Some storage servers might not support the query host access feature.
Check if the corresponding feature code is set.

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

index 0b38217f8147b33f2d94c4388d3a7e45c603f4cb..eb090e85b02e52bfe08f1a2ede8574e22533e477 100644 (file)
@@ -5172,6 +5172,10 @@ static int dasd_eckd_query_host_access(struct dasd_device *device,
        if (!device->block && private->lcu->pav == HYPER_PAV)
                return -EOPNOTSUPP;
 
+       /* may not be supported by the storage server */
+       if (!(private->features.feature[14] & 0x80))
+               return -EOPNOTSUPP;
+
        cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* PSF */ + 1 /* RSSD */,
                                   sizeof(struct dasd_psf_prssd_data) + 1,
                                   device);