diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-07-27 06:29:19 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-27 06:29:19 -0400 |
commit | e556bbbd9d2ff2b158915945ac82e2ac7def4d2f (patch) | |
tree | 023ed3bc586284f2acb8e754b9eb4171f54b0f2c /drivers/s390/cio/device.c | |
parent | b771aeac32a320ac52bc227252103d7d7fc48cad (diff) |
[S390] cio: Clean up messages.
- Remove unneeded messages.
- Move some messages into the debug feature.
- Use dev_* where appropriate.
- Use "cio: " prefix consistently.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 001682e70f67..297659fa0e26 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -338,15 +338,20 @@ ccw_device_remove_disconnected(struct ccw_device *cdev) | |||
338 | rc = device_schedule_callback(&cdev->dev, | 338 | rc = device_schedule_callback(&cdev->dev, |
339 | ccw_device_remove_orphan_cb); | 339 | ccw_device_remove_orphan_cb); |
340 | if (rc) | 340 | if (rc) |
341 | dev_info(&cdev->dev, "Couldn't unregister orphan\n"); | 341 | CIO_MSG_EVENT(2, "Couldn't unregister orphan " |
342 | "0.%x.%04x\n", | ||
343 | cdev->private->dev_id.ssid, | ||
344 | cdev->private->dev_id.devno); | ||
342 | return; | 345 | return; |
343 | } | 346 | } |
344 | /* Deregister subchannel, which will kill the ccw device. */ | 347 | /* Deregister subchannel, which will kill the ccw device. */ |
345 | rc = device_schedule_callback(cdev->dev.parent, | 348 | rc = device_schedule_callback(cdev->dev.parent, |
346 | ccw_device_remove_sch_cb); | 349 | ccw_device_remove_sch_cb); |
347 | if (rc) | 350 | if (rc) |
348 | dev_info(&cdev->dev, | 351 | CIO_MSG_EVENT(2, "Couldn't unregister disconnected device " |
349 | "Couldn't unregister disconnected device\n"); | 352 | "0.%x.%04x\n", |
353 | cdev->private->dev_id.ssid, | ||
354 | cdev->private->dev_id.devno); | ||
350 | } | 355 | } |
351 | 356 | ||
352 | int | 357 | int |
@@ -379,8 +384,10 @@ ccw_device_set_offline(struct ccw_device *cdev) | |||
379 | if (ret == 0) | 384 | if (ret == 0) |
380 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); | 385 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); |
381 | else { | 386 | else { |
382 | pr_debug("ccw_device_offline returned %d, device %s\n", | 387 | CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " |
383 | ret, cdev->dev.bus_id); | 388 | "device 0.%x.%04x\n", |
389 | ret, cdev->private->dev_id.ssid, | ||
390 | cdev->private->dev_id.devno); | ||
384 | cdev->online = 1; | 391 | cdev->online = 1; |
385 | } | 392 | } |
386 | return ret; | 393 | return ret; |
@@ -402,8 +409,10 @@ ccw_device_set_online(struct ccw_device *cdev) | |||
402 | if (ret == 0) | 409 | if (ret == 0) |
403 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); | 410 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); |
404 | else { | 411 | else { |
405 | pr_debug("ccw_device_online returned %d, device %s\n", | 412 | CIO_MSG_EVENT(2, "ccw_device_online returned %d, " |
406 | ret, cdev->dev.bus_id); | 413 | "device 0.%x.%04x\n", |
414 | ret, cdev->private->dev_id.ssid, | ||
415 | cdev->private->dev_id.devno); | ||
407 | return ret; | 416 | return ret; |
408 | } | 417 | } |
409 | if (cdev->private->state != DEV_STATE_ONLINE) | 418 | if (cdev->private->state != DEV_STATE_ONLINE) |
@@ -417,9 +426,11 @@ ccw_device_set_online(struct ccw_device *cdev) | |||
417 | spin_unlock_irq(cdev->ccwlock); | 426 | spin_unlock_irq(cdev->ccwlock); |
418 | if (ret == 0) | 427 | if (ret == 0) |
419 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); | 428 | wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); |
420 | else | 429 | else |
421 | pr_debug("ccw_device_offline returned %d, device %s\n", | 430 | CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " |
422 | ret, cdev->dev.bus_id); | 431 | "device 0.%x.%04x\n", |
432 | ret, cdev->private->dev_id.ssid, | ||
433 | cdev->private->dev_id.devno); | ||
423 | return (ret == 0) ? -ENODEV : ret; | 434 | return (ret == 0) ? -ENODEV : ret; |
424 | } | 435 | } |
425 | 436 | ||
@@ -439,9 +450,10 @@ static int online_store_recog_and_online(struct ccw_device *cdev) | |||
439 | if (cdev->id.cu_type == 0) { | 450 | if (cdev->id.cu_type == 0) { |
440 | ret = ccw_device_recognition(cdev); | 451 | ret = ccw_device_recognition(cdev); |
441 | if (ret) { | 452 | if (ret) { |
442 | printk(KERN_WARNING"Couldn't start recognition " | 453 | CIO_MSG_EVENT(0, "Couldn't start recognition " |
443 | "for device %s (ret=%d)\n", | 454 | "for device 0.%x.%04x (ret=%d)\n", |
444 | cdev->dev.bus_id, ret); | 455 | cdev->private->dev_id.ssid, |
456 | cdev->private->dev_id.devno, ret); | ||
445 | return ret; | 457 | return ret; |
446 | } | 458 | } |
447 | wait_event(cdev->private->wait_q, | 459 | wait_event(cdev->private->wait_q, |
@@ -461,8 +473,8 @@ static void online_store_handle_online(struct ccw_device *cdev, int force) | |||
461 | if (force && cdev->private->state == DEV_STATE_BOXED) { | 473 | if (force && cdev->private->state == DEV_STATE_BOXED) { |
462 | ret = ccw_device_stlck(cdev); | 474 | ret = ccw_device_stlck(cdev); |
463 | if (ret) { | 475 | if (ret) { |
464 | printk(KERN_WARNING"ccw_device_stlck for device %s " | 476 | dev_warn(&cdev->dev, |
465 | "returned %d!\n", cdev->dev.bus_id, ret); | 477 | "ccw_device_stlck returned %d!\n", ret); |
466 | return; | 478 | return; |
467 | } | 479 | } |
468 | if (cdev->id.cu_type == 0) | 480 | if (cdev->id.cu_type == 0) |
@@ -893,8 +905,10 @@ io_subchannel_register(struct work_struct *work) | |||
893 | ret = device_reprobe(&cdev->dev); | 905 | ret = device_reprobe(&cdev->dev); |
894 | if (ret) | 906 | if (ret) |
895 | /* We can't do much here. */ | 907 | /* We can't do much here. */ |
896 | dev_info(&cdev->dev, "device_reprobe() returned" | 908 | CIO_MSG_EVENT(2, "device_reprobe() returned" |
897 | " %d\n", ret); | 909 | " %d for 0.%x.%04x\n", ret, |
910 | cdev->private->dev_id.ssid, | ||
911 | cdev->private->dev_id.devno); | ||
898 | } | 912 | } |
899 | goto out; | 913 | goto out; |
900 | } | 914 | } |
@@ -907,8 +921,9 @@ io_subchannel_register(struct work_struct *work) | |||
907 | /* make it known to the system */ | 921 | /* make it known to the system */ |
908 | ret = ccw_device_register(cdev); | 922 | ret = ccw_device_register(cdev); |
909 | if (ret) { | 923 | if (ret) { |
910 | printk (KERN_WARNING "%s: could not register %s\n", | 924 | CIO_MSG_EVENT(0, "Could not register ccw dev 0.%x.%04x: %d\n", |
911 | __func__, cdev->dev.bus_id); | 925 | cdev->private->dev_id.ssid, |
926 | cdev->private->dev_id.devno, ret); | ||
912 | put_device(&cdev->dev); | 927 | put_device(&cdev->dev); |
913 | spin_lock_irqsave(sch->lock, flags); | 928 | spin_lock_irqsave(sch->lock, flags); |
914 | sch->dev.driver_data = NULL; | 929 | sch->dev.driver_data = NULL; |
@@ -1361,7 +1376,6 @@ ccw_device_remove (struct device *dev) | |||
1361 | struct ccw_driver *cdrv = cdev->drv; | 1376 | struct ccw_driver *cdrv = cdev->drv; |
1362 | int ret; | 1377 | int ret; |
1363 | 1378 | ||
1364 | pr_debug("removing device %s\n", cdev->dev.bus_id); | ||
1365 | if (cdrv->remove) | 1379 | if (cdrv->remove) |
1366 | cdrv->remove(cdev); | 1380 | cdrv->remove(cdev); |
1367 | if (cdev->online) { | 1381 | if (cdev->online) { |
@@ -1374,8 +1388,10 @@ ccw_device_remove (struct device *dev) | |||
1374 | dev_fsm_final_state(cdev)); | 1388 | dev_fsm_final_state(cdev)); |
1375 | else | 1389 | else |
1376 | //FIXME: we can't fail! | 1390 | //FIXME: we can't fail! |
1377 | pr_debug("ccw_device_offline returned %d, device %s\n", | 1391 | CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " |
1378 | ret, cdev->dev.bus_id); | 1392 | "device 0.%x.%04x\n", |
1393 | ret, cdev->private->dev_id.ssid, | ||
1394 | cdev->private->dev_id.devno); | ||
1379 | } | 1395 | } |
1380 | ccw_device_set_timeout(cdev, 0); | 1396 | ccw_device_set_timeout(cdev, 0); |
1381 | cdev->drv = NULL; | 1397 | cdev->drv = NULL; |