diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2009-12-07 06:51:52 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:35 -0500 |
commit | b8ed5dd54895647c2690575aad6f07748c2c618a (patch) | |
tree | aee2f9cd2a418691828bd95c09406e6424fd2235 /drivers/s390/block | |
parent | eb6e199bef288611157b8198c25d12b32bf058d0 (diff) |
[S390] dasd: remove strings from s390dbf
Remove strings from s390 debugfeature entries that could lead to a
crash when the data is read from dbf because the strings do not exist
any more.
Signed-off-by: Stefan Haberland <stefan.haberland@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.c | 22 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 44 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 10 | ||||
-rw-r--r-- | drivers/s390/block/dasd_int.h | 10 |
4 files changed, 44 insertions, 42 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 4f211c175b55..fdb2e7c14506 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -994,10 +994,9 @@ static void dasd_handle_killed_request(struct ccw_device *cdev, | |||
994 | return; | 994 | return; |
995 | cqr = (struct dasd_ccw_req *) intparm; | 995 | cqr = (struct dasd_ccw_req *) intparm; |
996 | if (cqr->status != DASD_CQR_IN_IO) { | 996 | if (cqr->status != DASD_CQR_IN_IO) { |
997 | DBF_EVENT(DBF_DEBUG, | 997 | DBF_EVENT_DEVID(DBF_DEBUG, cdev, |
998 | "invalid status in handle_killed_request: " | 998 | "invalid status in handle_killed_request: " |
999 | "bus_id %s, status %02x", | 999 | "%02x", cqr->status); |
1000 | dev_name(&cdev->dev), cqr->status); | ||
1001 | return; | 1000 | return; |
1002 | } | 1001 | } |
1003 | 1002 | ||
@@ -1045,12 +1044,13 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1045 | case -EIO: | 1044 | case -EIO: |
1046 | break; | 1045 | break; |
1047 | case -ETIMEDOUT: | 1046 | case -ETIMEDOUT: |
1048 | DBF_EVENT(DBF_WARNING, "%s(%s): request timed out\n", | 1047 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: " |
1049 | __func__, dev_name(&cdev->dev)); | 1048 | "request timed out\n", __func__); |
1050 | break; | 1049 | break; |
1051 | default: | 1050 | default: |
1052 | DBF_EVENT(DBF_WARNING, "%s(%s): unknown error %ld\n", | 1051 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: " |
1053 | __func__, dev_name(&cdev->dev), PTR_ERR(irb)); | 1052 | "unknown error %ld\n", __func__, |
1053 | PTR_ERR(irb)); | ||
1054 | } | 1054 | } |
1055 | dasd_handle_killed_request(cdev, intparm); | 1055 | dasd_handle_killed_request(cdev, intparm); |
1056 | return; | 1056 | return; |
@@ -2303,9 +2303,9 @@ int dasd_generic_probe(struct ccw_device *cdev, | |||
2303 | 2303 | ||
2304 | ret = dasd_add_sysfs_files(cdev); | 2304 | ret = dasd_add_sysfs_files(cdev); |
2305 | if (ret) { | 2305 | if (ret) { |
2306 | DBF_EVENT(DBF_WARNING, | 2306 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s", |
2307 | "dasd_generic_probe: could not add sysfs entries " | 2307 | "dasd_generic_probe: could not add " |
2308 | "for %s\n", dev_name(&cdev->dev)); | 2308 | "sysfs entries"); |
2309 | return ret; | 2309 | return ret; |
2310 | } | 2310 | } |
2311 | cdev->handler = &dasd_int_handler; | 2311 | cdev->handler = &dasd_int_handler; |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 39ffc84712f0..e38a09b5feae 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -93,9 +93,9 @@ dasd_eckd_probe (struct ccw_device *cdev) | |||
93 | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE | | 93 | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE | |
94 | CCWDEV_DO_PATHGROUP | CCWDEV_DO_MULTIPATH); | 94 | CCWDEV_DO_PATHGROUP | CCWDEV_DO_MULTIPATH); |
95 | if (ret) { | 95 | if (ret) { |
96 | DBF_EVENT(DBF_WARNING, | 96 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s", |
97 | "dasd_eckd_probe: could not set ccw-device options " | 97 | "dasd_eckd_probe: could not set " |
98 | "for %s\n", dev_name(&cdev->dev)); | 98 | "ccw-device options"); |
99 | return ret; | 99 | return ret; |
100 | } | 100 | } |
101 | ret = dasd_generic_probe(cdev, &dasd_eckd_discipline); | 101 | ret = dasd_generic_probe(cdev, &dasd_eckd_discipline); |
@@ -889,16 +889,15 @@ static int dasd_eckd_read_conf(struct dasd_device *device) | |||
889 | rc = dasd_eckd_read_conf_lpm(device, &conf_data, | 889 | rc = dasd_eckd_read_conf_lpm(device, &conf_data, |
890 | &conf_len, lpm); | 890 | &conf_len, lpm); |
891 | if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ | 891 | if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ |
892 | DBF_EVENT(DBF_WARNING, | 892 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, |
893 | "Read configuration data returned " | 893 | "Read configuration data returned " |
894 | "error %d for device: %s", rc, | 894 | "error %d", rc); |
895 | dev_name(&device->cdev->dev)); | ||
896 | return rc; | 895 | return rc; |
897 | } | 896 | } |
898 | if (conf_data == NULL) { | 897 | if (conf_data == NULL) { |
899 | DBF_EVENT(DBF_WARNING, "No configuration " | 898 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s", |
900 | "data retrieved for device: %s", | 899 | "No configuration data " |
901 | dev_name(&device->cdev->dev)); | 900 | "retrieved"); |
902 | continue; /* no error */ | 901 | continue; /* no error */ |
903 | } | 902 | } |
904 | /* save first valid configuration data */ | 903 | /* save first valid configuration data */ |
@@ -945,9 +944,8 @@ static int dasd_eckd_read_features(struct dasd_device *device) | |||
945 | sizeof(struct dasd_rssd_features)), | 944 | sizeof(struct dasd_rssd_features)), |
946 | device); | 945 | device); |
947 | if (IS_ERR(cqr)) { | 946 | if (IS_ERR(cqr)) { |
948 | DBF_EVENT(DBF_WARNING, "Could not allocate initialization " | 947 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s", "Could not " |
949 | "request for device: %s", | 948 | "allocate initialization request"); |
950 | dev_name(&device->cdev->dev)); | ||
951 | return PTR_ERR(cqr); | 949 | return PTR_ERR(cqr); |
952 | } | 950 | } |
953 | cqr->startdev = device; | 951 | cqr->startdev = device; |
@@ -1076,10 +1074,8 @@ static int dasd_eckd_validate_server(struct dasd_device *device) | |||
1076 | /* may be requested feature is not available on server, | 1074 | /* may be requested feature is not available on server, |
1077 | * therefore just report error and go ahead */ | 1075 | * therefore just report error and go ahead */ |
1078 | private = (struct dasd_eckd_private *) device->private; | 1076 | private = (struct dasd_eckd_private *) device->private; |
1079 | DBF_EVENT(DBF_WARNING, "PSF-SSC on storage subsystem %s.%s.%04x " | 1077 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "PSF-SSC for SSID %04x " |
1080 | "returned rc=%d for device: %s", | 1078 | "returned rc=%d", private->uid.ssid, rc); |
1081 | private->uid.vendor, private->uid.serial, | ||
1082 | private->uid.ssid, rc, dev_name(&device->cdev->dev)); | ||
1083 | /* RE-Read Configuration Data */ | 1079 | /* RE-Read Configuration Data */ |
1084 | return dasd_eckd_read_conf(device); | 1080 | return dasd_eckd_read_conf(device); |
1085 | } | 1081 | } |
@@ -1137,9 +1133,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1137 | if (private->uid.type == UA_BASE_DEVICE) { | 1133 | if (private->uid.type == UA_BASE_DEVICE) { |
1138 | block = dasd_alloc_block(); | 1134 | block = dasd_alloc_block(); |
1139 | if (IS_ERR(block)) { | 1135 | if (IS_ERR(block)) { |
1140 | DBF_EVENT(DBF_WARNING, "could not allocate dasd " | 1136 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s", |
1141 | "block structure for device: %s", | 1137 | "could not allocate dasd " |
1142 | dev_name(&device->cdev->dev)); | 1138 | "block structure"); |
1143 | rc = PTR_ERR(block); | 1139 | rc = PTR_ERR(block); |
1144 | goto out_err1; | 1140 | goto out_err1; |
1145 | } | 1141 | } |
@@ -1167,9 +1163,8 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
1167 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, | 1163 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, |
1168 | &private->rdc_data, 64); | 1164 | &private->rdc_data, 64); |
1169 | if (rc) { | 1165 | if (rc) { |
1170 | DBF_EVENT(DBF_WARNING, | 1166 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, |
1171 | "Read device characteristics failed, rc=%d for " | 1167 | "Read device characteristic failed, rc=%d", rc); |
1172 | "device: %s", rc, dev_name(&device->cdev->dev)); | ||
1173 | goto out_err3; | 1168 | goto out_err3; |
1174 | } | 1169 | } |
1175 | /* find the vaild cylinder size */ | 1170 | /* find the vaild cylinder size */ |
@@ -3300,9 +3295,8 @@ int dasd_eckd_restore_device(struct dasd_device *device) | |||
3300 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, | 3295 | rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, |
3301 | &temp_rdc_data, 64); | 3296 | &temp_rdc_data, 64); |
3302 | if (rc) { | 3297 | if (rc) { |
3303 | DBF_EVENT(DBF_WARNING, | 3298 | DBF_EVENT_DEVID(DBF_WARNING, device->cdev, |
3304 | "Read device characteristics failed, rc=%d for " | 3299 | "Read device characteristic failed, rc=%d", rc); |
3305 | "device: %s", rc, dev_name(&device->cdev->dev)); | ||
3306 | goto out_err; | 3300 | goto out_err; |
3307 | } | 3301 | } |
3308 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 3302 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index d1a07e4c0e78..0f152444ac77 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -140,9 +140,8 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
140 | } | 140 | } |
141 | block = dasd_alloc_block(); | 141 | block = dasd_alloc_block(); |
142 | if (IS_ERR(block)) { | 142 | if (IS_ERR(block)) { |
143 | DBF_EVENT(DBF_WARNING, "could not allocate dasd block " | 143 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s", "could not allocate " |
144 | "structure for device: %s", | 144 | "dasd block structure"); |
145 | dev_name(&device->cdev->dev)); | ||
146 | device->private = NULL; | 145 | device->private = NULL; |
147 | kfree(private); | 146 | kfree(private); |
148 | return PTR_ERR(block); | 147 | return PTR_ERR(block); |
@@ -154,9 +153,8 @@ dasd_fba_check_characteristics(struct dasd_device *device) | |||
154 | rc = dasd_generic_read_dev_chars(device, DASD_FBA_MAGIC, | 153 | rc = dasd_generic_read_dev_chars(device, DASD_FBA_MAGIC, |
155 | &private->rdc_data, 32); | 154 | &private->rdc_data, 32); |
156 | if (rc) { | 155 | if (rc) { |
157 | DBF_EVENT(DBF_WARNING, "Read device characteristics returned " | 156 | DBF_EVENT_DEVID(DBF_WARNING, cdev, "Read device " |
158 | "error %d for device: %s", | 157 | "characteristics returned error %d", rc); |
159 | rc, dev_name(&device->cdev->dev)); | ||
160 | device->block = NULL; | 158 | device->block = NULL; |
161 | dasd_free_block(block); | 159 | dasd_free_block(block); |
162 | device->private = NULL; | 160 | device->private = NULL; |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 8c2ea045188e..e4c2143dabf6 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -108,6 +108,16 @@ do { \ | |||
108 | d_data); \ | 108 | d_data); \ |
109 | } while(0) | 109 | } while(0) |
110 | 110 | ||
111 | #define DBF_EVENT_DEVID(d_level, d_cdev, d_str, d_data...) \ | ||
112 | do { \ | ||
113 | struct ccw_dev_id __dev_id; \ | ||
114 | ccw_device_get_id(d_cdev, &__dev_id); \ | ||
115 | debug_sprintf_event(dasd_debug_area, \ | ||
116 | d_level, \ | ||
117 | "0.%x.%04x " d_str "\n", \ | ||
118 | __dev_id.ssid, __dev_id.devno, d_data); \ | ||
119 | } while (0) | ||
120 | |||
111 | #define DBF_EXC(d_level, d_str, d_data...)\ | 121 | #define DBF_EXC(d_level, d_str, d_data...)\ |
112 | do { \ | 122 | do { \ |
113 | debug_sprintf_exception(dasd_debug_area, \ | 123 | debug_sprintf_exception(dasd_debug_area, \ |