浏览代码

s390/dasd: check if query host access feature is supported

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>
Stefan Haberland 8 年之前
父节点
当前提交
ccd53fa226
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/s390/block/dasd_eckd.c

+ 4 - 0
drivers/s390/block/dasd_eckd.c

@@ -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);