diff options
author | Stefan Weinhuber <wein@de.ibm.com> | 2009-09-22 16:58:52 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-22 16:58:46 -0400 |
commit | 68d1e5f08b13132504752cad54169376739753db (patch) | |
tree | 8182caac93576fdbe0e2e0921bf46b188854863a /drivers/s390/block | |
parent | 5314af693da5149c2361d290bb184cf18ee21cdd (diff) |
[S390] dasd: tolerate devices that have no feature codes
The DASD device driver reads the feature codes of a device during
device initialization. These codes are later used to determine the
availability of advanced features like PAV or High Performance FICON.
Some very old devices do not support the command to read feature
codes and the initialization routine fails.
As the feature codes are not necessary for basic DASD operations, we
can support such devices by just ignoring missing feature codes.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index a1ce573648a2..614813f692ec 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -935,6 +935,7 @@ static int dasd_eckd_read_features(struct dasd_device *device) | |||
935 | struct dasd_eckd_private *private; | 935 | struct dasd_eckd_private *private; |
936 | 936 | ||
937 | private = (struct dasd_eckd_private *) device->private; | 937 | private = (struct dasd_eckd_private *) device->private; |
938 | memset(&private->features, 0, sizeof(struct dasd_rssd_features)); | ||
938 | cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* PSF */ + 1 /* RSSD */, | 939 | cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* PSF */ + 1 /* RSSD */, |
939 | (sizeof(struct dasd_psf_prssd_data) + | 940 | (sizeof(struct dasd_psf_prssd_data) + |
940 | sizeof(struct dasd_rssd_features)), | 941 | sizeof(struct dasd_rssd_features)), |
@@ -982,7 +983,9 @@ static int dasd_eckd_read_features(struct dasd_device *device) | |||
982 | features = (struct dasd_rssd_features *) (prssdp + 1); | 983 | features = (struct dasd_rssd_features *) (prssdp + 1); |
983 | memcpy(&private->features, features, | 984 | memcpy(&private->features, features, |
984 | sizeof(struct dasd_rssd_features)); | 985 | sizeof(struct dasd_rssd_features)); |
985 | } | 986 | } else |
987 | dev_warn(&device->cdev->dev, "Reading device feature codes" | ||
988 | " failed with rc=%d\n", rc); | ||
986 | dasd_sfree_request(cqr, cqr->memdev); | 989 | dasd_sfree_request(cqr, cqr->memdev); |
987 | return rc; | 990 | return rc; |
988 | } | 991 | } |
@@ -1144,9 +1147,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1144 | } | 1147 | } |
1145 | 1148 | ||
1146 | /* Read Feature Codes */ | 1149 | /* Read Feature Codes */ |
1147 | rc = dasd_eckd_read_features(device); | 1150 | dasd_eckd_read_features(device); |
1148 | if (rc) | ||
1149 | goto out_err3; | ||
1150 | 1151 | ||
1151 | /* Read Device Characteristics */ | 1152 | /* Read Device Characteristics */ |
1152 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, | 1153 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, |
@@ -3241,9 +3242,7 @@ int dasd_eckd_restore_device(struct dasd_device *device) | |||
3241 | } | 3242 | } |
3242 | 3243 | ||
3243 | /* Read Feature Codes */ | 3244 | /* Read Feature Codes */ |
3244 | rc = dasd_eckd_read_features(device); | 3245 | dasd_eckd_read_features(device); |
3245 | if (rc) | ||
3246 | goto out_err; | ||
3247 | 3246 | ||
3248 | /* Read Device Characteristics */ | 3247 | /* Read Device Characteristics */ |
3249 | memset(&private->rdc_data, 0, sizeof(private->rdc_data)); | 3248 | memset(&private->rdc_data, 0, sizeof(private->rdc_data)); |