[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>
This commit is contained in:
Stefan Haberland 2009-12-07 12:51:52 +01:00 committed by Martin Schwidefsky
parent eb6e199bef
commit b8ed5dd548
4 changed files with 44 additions and 42 deletions

View File

@ -994,10 +994,9 @@ static void dasd_handle_killed_request(struct ccw_device *cdev,
return; return;
cqr = (struct dasd_ccw_req *) intparm; cqr = (struct dasd_ccw_req *) intparm;
if (cqr->status != DASD_CQR_IN_IO) { if (cqr->status != DASD_CQR_IN_IO) {
DBF_EVENT(DBF_DEBUG, DBF_EVENT_DEVID(DBF_DEBUG, cdev,
"invalid status in handle_killed_request: " "invalid status in handle_killed_request: "
"bus_id %s, status %02x", "%02x", cqr->status);
dev_name(&cdev->dev), cqr->status);
return; return;
} }
@ -1045,12 +1044,13 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
case -EIO: case -EIO:
break; break;
case -ETIMEDOUT: case -ETIMEDOUT:
DBF_EVENT(DBF_WARNING, "%s(%s): request timed out\n", DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: "
__func__, dev_name(&cdev->dev)); "request timed out\n", __func__);
break; break;
default: default:
DBF_EVENT(DBF_WARNING, "%s(%s): unknown error %ld\n", DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: "
__func__, dev_name(&cdev->dev), PTR_ERR(irb)); "unknown error %ld\n", __func__,
PTR_ERR(irb));
} }
dasd_handle_killed_request(cdev, intparm); dasd_handle_killed_request(cdev, intparm);
return; return;
@ -2303,9 +2303,9 @@ int dasd_generic_probe(struct ccw_device *cdev,
ret = dasd_add_sysfs_files(cdev); ret = dasd_add_sysfs_files(cdev);
if (ret) { if (ret) {
DBF_EVENT(DBF_WARNING, DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s",
"dasd_generic_probe: could not add sysfs entries " "dasd_generic_probe: could not add "
"for %s\n", dev_name(&cdev->dev)); "sysfs entries");
return ret; return ret;
} }
cdev->handler = &dasd_int_handler; cdev->handler = &dasd_int_handler;

View File

@ -93,9 +93,9 @@ dasd_eckd_probe (struct ccw_device *cdev)
ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE |
CCWDEV_DO_PATHGROUP | CCWDEV_DO_MULTIPATH); CCWDEV_DO_PATHGROUP | CCWDEV_DO_MULTIPATH);
if (ret) { if (ret) {
DBF_EVENT(DBF_WARNING, DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s",
"dasd_eckd_probe: could not set ccw-device options " "dasd_eckd_probe: could not set "
"for %s\n", dev_name(&cdev->dev)); "ccw-device options");
return ret; return ret;
} }
ret = dasd_generic_probe(cdev, &dasd_eckd_discipline); ret = dasd_generic_probe(cdev, &dasd_eckd_discipline);
@ -889,16 +889,15 @@ static int dasd_eckd_read_conf(struct dasd_device *device)
rc = dasd_eckd_read_conf_lpm(device, &conf_data, rc = dasd_eckd_read_conf_lpm(device, &conf_data,
&conf_len, lpm); &conf_len, lpm);
if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */
DBF_EVENT(DBF_WARNING, DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read configuration data returned " "Read configuration data returned "
"error %d for device: %s", rc, "error %d", rc);
dev_name(&device->cdev->dev));
return rc; return rc;
} }
if (conf_data == NULL) { if (conf_data == NULL) {
DBF_EVENT(DBF_WARNING, "No configuration " DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s",
"data retrieved for device: %s", "No configuration data "
dev_name(&device->cdev->dev)); "retrieved");
continue; /* no error */ continue; /* no error */
} }
/* save first valid configuration data */ /* save first valid configuration data */
@ -945,9 +944,8 @@ static int dasd_eckd_read_features(struct dasd_device *device)
sizeof(struct dasd_rssd_features)), sizeof(struct dasd_rssd_features)),
device); device);
if (IS_ERR(cqr)) { if (IS_ERR(cqr)) {
DBF_EVENT(DBF_WARNING, "Could not allocate initialization " DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s", "Could not "
"request for device: %s", "allocate initialization request");
dev_name(&device->cdev->dev));
return PTR_ERR(cqr); return PTR_ERR(cqr);
} }
cqr->startdev = device; cqr->startdev = device;
@ -1076,10 +1074,8 @@ static int dasd_eckd_validate_server(struct dasd_device *device)
/* may be requested feature is not available on server, /* may be requested feature is not available on server,
* therefore just report error and go ahead */ * therefore just report error and go ahead */
private = (struct dasd_eckd_private *) device->private; private = (struct dasd_eckd_private *) device->private;
DBF_EVENT(DBF_WARNING, "PSF-SSC on storage subsystem %s.%s.%04x " DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "PSF-SSC for SSID %04x "
"returned rc=%d for device: %s", "returned rc=%d", private->uid.ssid, rc);
private->uid.vendor, private->uid.serial,
private->uid.ssid, rc, dev_name(&device->cdev->dev));
/* RE-Read Configuration Data */ /* RE-Read Configuration Data */
return dasd_eckd_read_conf(device); return dasd_eckd_read_conf(device);
} }
@ -1137,9 +1133,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
if (private->uid.type == UA_BASE_DEVICE) { if (private->uid.type == UA_BASE_DEVICE) {
block = dasd_alloc_block(); block = dasd_alloc_block();
if (IS_ERR(block)) { if (IS_ERR(block)) {
DBF_EVENT(DBF_WARNING, "could not allocate dasd " DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "%s",
"block structure for device: %s", "could not allocate dasd "
dev_name(&device->cdev->dev)); "block structure");
rc = PTR_ERR(block); rc = PTR_ERR(block);
goto out_err1; goto out_err1;
} }
@ -1167,9 +1163,8 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC,
&private->rdc_data, 64); &private->rdc_data, 64);
if (rc) { if (rc) {
DBF_EVENT(DBF_WARNING, DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read device characteristics failed, rc=%d for " "Read device characteristic failed, rc=%d", rc);
"device: %s", rc, dev_name(&device->cdev->dev));
goto out_err3; goto out_err3;
} }
/* find the vaild cylinder size */ /* find the vaild cylinder size */
@ -3300,9 +3295,8 @@ int dasd_eckd_restore_device(struct dasd_device *device)
rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC, rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC,
&temp_rdc_data, 64); &temp_rdc_data, 64);
if (rc) { if (rc) {
DBF_EVENT(DBF_WARNING, DBF_EVENT_DEVID(DBF_WARNING, device->cdev,
"Read device characteristics failed, rc=%d for " "Read device characteristic failed, rc=%d", rc);
"device: %s", rc, dev_name(&device->cdev->dev));
goto out_err; goto out_err;
} }
spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);

View File

@ -140,9 +140,8 @@ dasd_fba_check_characteristics(struct dasd_device *device)
} }
block = dasd_alloc_block(); block = dasd_alloc_block();
if (IS_ERR(block)) { if (IS_ERR(block)) {
DBF_EVENT(DBF_WARNING, "could not allocate dasd block " DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s", "could not allocate "
"structure for device: %s", "dasd block structure");
dev_name(&device->cdev->dev));
device->private = NULL; device->private = NULL;
kfree(private); kfree(private);
return PTR_ERR(block); return PTR_ERR(block);
@ -154,9 +153,8 @@ dasd_fba_check_characteristics(struct dasd_device *device)
rc = dasd_generic_read_dev_chars(device, DASD_FBA_MAGIC, rc = dasd_generic_read_dev_chars(device, DASD_FBA_MAGIC,
&private->rdc_data, 32); &private->rdc_data, 32);
if (rc) { if (rc) {
DBF_EVENT(DBF_WARNING, "Read device characteristics returned " DBF_EVENT_DEVID(DBF_WARNING, cdev, "Read device "
"error %d for device: %s", "characteristics returned error %d", rc);
rc, dev_name(&device->cdev->dev));
device->block = NULL; device->block = NULL;
dasd_free_block(block); dasd_free_block(block);
device->private = NULL; device->private = NULL;

View File

@ -108,6 +108,16 @@ do { \
d_data); \ d_data); \
} while(0) } while(0)
#define DBF_EVENT_DEVID(d_level, d_cdev, d_str, d_data...) \
do { \
struct ccw_dev_id __dev_id; \
ccw_device_get_id(d_cdev, &__dev_id); \
debug_sprintf_event(dasd_debug_area, \
d_level, \
"0.%x.%04x " d_str "\n", \
__dev_id.ssid, __dev_id.devno, d_data); \
} while (0)
#define DBF_EXC(d_level, d_str, d_data...)\ #define DBF_EXC(d_level, d_str, d_data...)\
do { \ do { \
debug_sprintf_exception(dasd_debug_area, \ debug_sprintf_exception(dasd_debug_area, \