aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/con3215.c53
-rw-r--r--drivers/s390/char/con3270.c27
-rw-r--r--drivers/s390/char/raw3270.c4
-rw-r--r--drivers/s390/char/sclp_con.c24
-rw-r--r--drivers/s390/char/sclp_vt220.c26
-rw-r--r--drivers/s390/char/tape_3590.c132
-rw-r--r--drivers/s390/char/tape_block.c2
-rw-r--r--drivers/s390/char/tape_core.c21
-rw-r--r--drivers/s390/char/tape_proc.c2
-rw-r--r--drivers/s390/char/tape_std.c13
-rw-r--r--drivers/s390/char/vmlogrdr.c5
-rw-r--r--drivers/s390/char/vmur.c6
12 files changed, 187 insertions, 128 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index d3ec9b55ab35..9ab06e0dad40 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -21,6 +21,7 @@
21#include <linux/console.h> 21#include <linux/console.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/err.h> 23#include <linux/err.h>
24#include <linux/reboot.h>
24 25
25#include <linux/slab.h> 26#include <linux/slab.h>
26#include <linux/bootmem.h> 27#include <linux/bootmem.h>
@@ -88,7 +89,6 @@ struct raw3215_info {
88 int count; /* number of bytes in output buffer */ 89 int count; /* number of bytes in output buffer */
89 int written; /* number of bytes in write requests */ 90 int written; /* number of bytes in write requests */
90 struct tty_struct *tty; /* pointer to tty structure if present */ 91 struct tty_struct *tty; /* pointer to tty structure if present */
91 struct tasklet_struct tasklet;
92 struct raw3215_req *queued_read; /* pointer to queued read requests */ 92 struct raw3215_req *queued_read; /* pointer to queued read requests */
93 struct raw3215_req *queued_write;/* pointer to queued write requests */ 93 struct raw3215_req *queued_write;/* pointer to queued write requests */
94 wait_queue_head_t empty_wait; /* wait queue for flushing */ 94 wait_queue_head_t empty_wait; /* wait queue for flushing */
@@ -341,21 +341,14 @@ raw3215_try_io(struct raw3215_info *raw)
341} 341}
342 342
343/* 343/*
344 * The bottom half handler routine for 3215 devices. It tries to start 344 * Try to start the next IO and wake up processes waiting on the tty.
345 * the next IO and wakes up processes waiting on the tty.
346 */ 345 */
347static void 346static void raw3215_next_io(struct raw3215_info *raw)
348raw3215_tasklet(void *data)
349{ 347{
350 struct raw3215_info *raw;
351 struct tty_struct *tty; 348 struct tty_struct *tty;
352 unsigned long flags;
353 349
354 raw = (struct raw3215_info *) data;
355 spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
356 raw3215_mk_write_req(raw); 350 raw3215_mk_write_req(raw);
357 raw3215_try_io(raw); 351 raw3215_try_io(raw);
358 spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
359 tty = raw->tty; 352 tty = raw->tty;
360 if (tty != NULL && 353 if (tty != NULL &&
361 RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) { 354 RAW3215_BUFFER_SIZE - raw->count >= RAW3215_MIN_SPACE) {
@@ -380,7 +373,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
380 cstat = irb->scsw.cmd.cstat; 373 cstat = irb->scsw.cmd.cstat;
381 dstat = irb->scsw.cmd.dstat; 374 dstat = irb->scsw.cmd.dstat;
382 if (cstat != 0) 375 if (cstat != 0)
383 tasklet_schedule(&raw->tasklet); 376 raw3215_next_io(raw);
384 if (dstat & 0x01) { /* we got a unit exception */ 377 if (dstat & 0x01) { /* we got a unit exception */
385 dstat &= ~0x01; /* we can ignore it */ 378 dstat &= ~0x01; /* we can ignore it */
386 } 379 }
@@ -390,7 +383,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
390 break; 383 break;
391 /* Attention interrupt, someone hit the enter key */ 384 /* Attention interrupt, someone hit the enter key */
392 raw3215_mk_read_req(raw); 385 raw3215_mk_read_req(raw);
393 tasklet_schedule(&raw->tasklet); 386 raw3215_next_io(raw);
394 break; 387 break;
395 case 0x08: 388 case 0x08:
396 case 0x0C: 389 case 0x0C:
@@ -448,7 +441,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
448 raw->queued_read == NULL) { 441 raw->queued_read == NULL) {
449 wake_up_interruptible(&raw->empty_wait); 442 wake_up_interruptible(&raw->empty_wait);
450 } 443 }
451 tasklet_schedule(&raw->tasklet); 444 raw3215_next_io(raw);
452 break; 445 break;
453 default: 446 default:
454 /* Strange interrupt, I'll do my best to clean up */ 447 /* Strange interrupt, I'll do my best to clean up */
@@ -460,7 +453,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
460 raw->flags &= ~RAW3215_WORKING; 453 raw->flags &= ~RAW3215_WORKING;
461 raw3215_free_req(req); 454 raw3215_free_req(req);
462 } 455 }
463 tasklet_schedule(&raw->tasklet); 456 raw3215_next_io(raw);
464 } 457 }
465 return; 458 return;
466} 459}
@@ -674,9 +667,6 @@ raw3215_probe (struct ccw_device *cdev)
674 kfree(raw); 667 kfree(raw);
675 return -ENOMEM; 668 return -ENOMEM;
676 } 669 }
677 tasklet_init(&raw->tasklet,
678 (void (*)(unsigned long)) raw3215_tasklet,
679 (unsigned long) raw);
680 init_waitqueue_head(&raw->empty_wait); 670 init_waitqueue_head(&raw->empty_wait);
681 671
682 cdev->dev.driver_data = raw; 672 cdev->dev.driver_data = raw;
@@ -775,11 +765,11 @@ static struct tty_driver *con3215_device(struct console *c, int *index)
775} 765}
776 766
777/* 767/*
778 * panic() calls console_unblank before the system enters a 768 * panic() calls con3215_flush through a panic_notifier
779 * disabled, endless loop. 769 * before the system enters a disabled, endless loop.
780 */ 770 */
781static void 771static void
782con3215_unblank(void) 772con3215_flush(void)
783{ 773{
784 struct raw3215_info *raw; 774 struct raw3215_info *raw;
785 unsigned long flags; 775 unsigned long flags;
@@ -790,6 +780,23 @@ con3215_unblank(void)
790 spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags); 780 spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
791} 781}
792 782
783static int con3215_notify(struct notifier_block *self,
784 unsigned long event, void *data)
785{
786 con3215_flush();
787 return NOTIFY_OK;
788}
789
790static struct notifier_block on_panic_nb = {
791 .notifier_call = con3215_notify,
792 .priority = 0,
793};
794
795static struct notifier_block on_reboot_nb = {
796 .notifier_call = con3215_notify,
797 .priority = 0,
798};
799
793/* 800/*
794 * The console structure for the 3215 console 801 * The console structure for the 3215 console
795 */ 802 */
@@ -797,7 +804,6 @@ static struct console con3215 = {
797 .name = "ttyS", 804 .name = "ttyS",
798 .write = con3215_write, 805 .write = con3215_write,
799 .device = con3215_device, 806 .device = con3215_device,
800 .unblank = con3215_unblank,
801 .flags = CON_PRINTBUFFER, 807 .flags = CON_PRINTBUFFER,
802}; 808};
803 809
@@ -846,9 +852,6 @@ con3215_init(void)
846 cdev->handler = raw3215_irq; 852 cdev->handler = raw3215_irq;
847 853
848 raw->flags |= RAW3215_FIXED; 854 raw->flags |= RAW3215_FIXED;
849 tasklet_init(&raw->tasklet,
850 (void (*)(unsigned long)) raw3215_tasklet,
851 (unsigned long) raw);
852 init_waitqueue_head(&raw->empty_wait); 855 init_waitqueue_head(&raw->empty_wait);
853 856
854 /* Request the console irq */ 857 /* Request the console irq */
@@ -859,6 +862,8 @@ con3215_init(void)
859 raw3215[0] = NULL; 862 raw3215[0] = NULL;
860 return -ENODEV; 863 return -ENODEV;
861 } 864 }
865 atomic_notifier_chain_register(&panic_notifier_list, &on_panic_nb);
866 register_reboot_notifier(&on_reboot_nb);
862 register_console(&con3215); 867 register_console(&con3215);
863 return 0; 868 return 0;
864} 869}
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
index 3c07974886ed..d028d2ee83dd 100644
--- a/drivers/s390/char/con3270.c
+++ b/drivers/s390/char/con3270.c
@@ -15,6 +15,7 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/reboot.h>
18 19
19#include <asm/ccwdev.h> 20#include <asm/ccwdev.h>
20#include <asm/cio.h> 21#include <asm/cio.h>
@@ -528,11 +529,11 @@ con3270_wait_write(struct con3270 *cp)
528} 529}
529 530
530/* 531/*
531 * panic() calls console_unblank before the system enters a 532 * panic() calls con3270_flush through a panic_notifier
532 * disabled, endless loop. 533 * before the system enters a disabled, endless loop.
533 */ 534 */
534static void 535static void
535con3270_unblank(void) 536con3270_flush(void)
536{ 537{
537 struct con3270 *cp; 538 struct con3270 *cp;
538 unsigned long flags; 539 unsigned long flags;
@@ -554,6 +555,23 @@ con3270_unblank(void)
554 spin_unlock_irqrestore(&cp->view.lock, flags); 555 spin_unlock_irqrestore(&cp->view.lock, flags);
555} 556}
556 557
558static int con3270_notify(struct notifier_block *self,
559 unsigned long event, void *data)
560{
561 con3270_flush();
562 return NOTIFY_OK;
563}
564
565static struct notifier_block on_panic_nb = {
566 .notifier_call = con3270_notify,
567 .priority = 0,
568};
569
570static struct notifier_block on_reboot_nb = {
571 .notifier_call = con3270_notify,
572 .priority = 0,
573};
574
557/* 575/*
558 * The console structure for the 3270 console 576 * The console structure for the 3270 console
559 */ 577 */
@@ -561,7 +579,6 @@ static struct console con3270 = {
561 .name = "tty3270", 579 .name = "tty3270",
562 .write = con3270_write, 580 .write = con3270_write,
563 .device = con3270_device, 581 .device = con3270_device,
564 .unblank = con3270_unblank,
565 .flags = CON_PRINTBUFFER, 582 .flags = CON_PRINTBUFFER,
566}; 583};
567 584
@@ -623,6 +640,8 @@ con3270_init(void)
623 condev->cline->len = 0; 640 condev->cline->len = 0;
624 con3270_create_status(condev); 641 con3270_create_status(condev);
625 condev->input = alloc_string(&condev->freemem, 80); 642 condev->input = alloc_string(&condev->freemem, 80);
643 atomic_notifier_chain_register(&panic_notifier_list, &on_panic_nb);
644 register_reboot_notifier(&on_reboot_nb);
626 register_console(&con3270); 645 register_console(&con3270);
627 return 0; 646 return 0;
628} 647}
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index c3dee900a5c8..1792b2c0130e 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1171,7 +1171,7 @@ static int raw3270_create_attributes(struct raw3270 *rp)
1171 rp->clttydev = device_create_drvdata(class3270, &rp->cdev->dev, 1171 rp->clttydev = device_create_drvdata(class3270, &rp->cdev->dev,
1172 MKDEV(IBM_TTY3270_MAJOR, rp->minor), 1172 MKDEV(IBM_TTY3270_MAJOR, rp->minor),
1173 NULL, 1173 NULL,
1174 "tty%s", rp->cdev->dev.bus_id); 1174 "tty%s", dev_name(&rp->cdev->dev));
1175 if (IS_ERR(rp->clttydev)) { 1175 if (IS_ERR(rp->clttydev)) {
1176 rc = PTR_ERR(rp->clttydev); 1176 rc = PTR_ERR(rp->clttydev);
1177 goto out_ttydev; 1177 goto out_ttydev;
@@ -1180,7 +1180,7 @@ static int raw3270_create_attributes(struct raw3270 *rp)
1180 rp->cltubdev = device_create_drvdata(class3270, &rp->cdev->dev, 1180 rp->cltubdev = device_create_drvdata(class3270, &rp->cdev->dev,
1181 MKDEV(IBM_FS3270_MAJOR, rp->minor), 1181 MKDEV(IBM_FS3270_MAJOR, rp->minor),
1182 NULL, 1182 NULL,
1183 "tub%s", rp->cdev->dev.bus_id); 1183 "tub%s", dev_name(&rp->cdev->dev));
1184 if (!IS_ERR(rp->cltubdev)) 1184 if (!IS_ERR(rp->cltubdev))
1185 goto out; 1185 goto out;
1186 1186
diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c
index 7e619c534bf4..9a25c4bd1421 100644
--- a/drivers/s390/char/sclp_con.c
+++ b/drivers/s390/char/sclp_con.c
@@ -16,6 +16,7 @@
16#include <linux/bootmem.h> 16#include <linux/bootmem.h>
17#include <linux/termios.h> 17#include <linux/termios.h>
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/reboot.h>
19 20
20#include "sclp.h" 21#include "sclp.h"
21#include "sclp_rw.h" 22#include "sclp_rw.h"
@@ -172,7 +173,7 @@ sclp_console_device(struct console *c, int *index)
172 * will be flushed to the SCLP. 173 * will be flushed to the SCLP.
173 */ 174 */
174static void 175static void
175sclp_console_unblank(void) 176sclp_console_flush(void)
176{ 177{
177 unsigned long flags; 178 unsigned long flags;
178 179
@@ -188,6 +189,24 @@ sclp_console_unblank(void)
188 spin_unlock_irqrestore(&sclp_con_lock, flags); 189 spin_unlock_irqrestore(&sclp_con_lock, flags);
189} 190}
190 191
192static int
193sclp_console_notify(struct notifier_block *self,
194 unsigned long event, void *data)
195{
196 sclp_console_flush();
197 return NOTIFY_OK;
198}
199
200static struct notifier_block on_panic_nb = {
201 .notifier_call = sclp_console_notify,
202 .priority = 1,
203};
204
205static struct notifier_block on_reboot_nb = {
206 .notifier_call = sclp_console_notify,
207 .priority = 1,
208};
209
191/* 210/*
192 * used to register the SCLP console to the kernel and to 211 * used to register the SCLP console to the kernel and to
193 * give printk necessary information 212 * give printk necessary information
@@ -197,7 +216,6 @@ static struct console sclp_console =
197 .name = sclp_console_name, 216 .name = sclp_console_name,
198 .write = sclp_console_write, 217 .write = sclp_console_write,
199 .device = sclp_console_device, 218 .device = sclp_console_device,
200 .unblank = sclp_console_unblank,
201 .flags = CON_PRINTBUFFER, 219 .flags = CON_PRINTBUFFER,
202 .index = 0 /* ttyS0 */ 220 .index = 0 /* ttyS0 */
203}; 221};
@@ -241,6 +259,8 @@ sclp_console_init(void)
241 sclp_con_width_htab = 8; 259 sclp_con_width_htab = 8;
242 260
243 /* enable printk-access to this driver */ 261 /* enable printk-access to this driver */
262 atomic_notifier_chain_register(&panic_notifier_list, &on_panic_nb);
263 register_reboot_notifier(&on_reboot_nb);
244 register_console(&sclp_console); 264 register_console(&sclp_console);
245 return 0; 265 return 0;
246} 266}
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index ad51738c4261..9854f19f5e62 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -24,6 +24,8 @@
24#include <linux/bootmem.h> 24#include <linux/bootmem.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/reboot.h>
28
27#include <asm/uaccess.h> 29#include <asm/uaccess.h>
28#include "sclp.h" 30#include "sclp.h"
29 31
@@ -743,24 +745,30 @@ sclp_vt220_con_device(struct console *c, int *index)
743 return sclp_vt220_driver; 745 return sclp_vt220_driver;
744} 746}
745 747
746/* 748static int
747 * This routine is called from panic when the kernel is going to give up. 749sclp_vt220_notify(struct notifier_block *self,
748 * We have to make sure that all buffers will be flushed to the SCLP. 750 unsigned long event, void *data)
749 * Note that this function may be called from within an interrupt context.
750 */
751static void
752sclp_vt220_con_unblank(void)
753{ 751{
754 __sclp_vt220_flush_buffer(); 752 __sclp_vt220_flush_buffer();
753 return NOTIFY_OK;
755} 754}
756 755
756static struct notifier_block on_panic_nb = {
757 .notifier_call = sclp_vt220_notify,
758 .priority = 1,
759};
760
761static struct notifier_block on_reboot_nb = {
762 .notifier_call = sclp_vt220_notify,
763 .priority = 1,
764};
765
757/* Structure needed to register with printk */ 766/* Structure needed to register with printk */
758static struct console sclp_vt220_console = 767static struct console sclp_vt220_console =
759{ 768{
760 .name = SCLP_VT220_CONSOLE_NAME, 769 .name = SCLP_VT220_CONSOLE_NAME,
761 .write = sclp_vt220_con_write, 770 .write = sclp_vt220_con_write,
762 .device = sclp_vt220_con_device, 771 .device = sclp_vt220_con_device,
763 .unblank = sclp_vt220_con_unblank,
764 .flags = CON_PRINTBUFFER, 772 .flags = CON_PRINTBUFFER,
765 .index = SCLP_VT220_CONSOLE_INDEX 773 .index = SCLP_VT220_CONSOLE_INDEX
766}; 774};
@@ -776,6 +784,8 @@ sclp_vt220_con_init(void)
776 if (rc) 784 if (rc)
777 return rc; 785 return rc;
778 /* Attach linux console */ 786 /* Attach linux console */
787 atomic_notifier_chain_register(&panic_notifier_list, &on_panic_nb);
788 register_reboot_notifier(&on_reboot_nb);
779 register_console(&sclp_vt220_console); 789 register_console(&sclp_vt220_console);
780 return 0; 790 return 0;
781} 791}
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index 839987618ffd..4005c44a404c 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -910,7 +910,7 @@ tape_3590_erp_swap(struct tape_device *device, struct tape_request *request,
910 * should proceed with the new tape... this 910 * should proceed with the new tape... this
911 * should probably be done in user space! 911 * should probably be done in user space!
912 */ 912 */
913 PRINT_WARN("(%s): Swap Tape Device!\n", device->cdev->dev.bus_id); 913 PRINT_WARN("(%s): Swap Tape Device!\n", dev_name(&device->cdev->dev));
914 return tape_3590_erp_basic(device, request, irb, -EIO); 914 return tape_3590_erp_basic(device, request, irb, -EIO);
915} 915}
916 916
@@ -1003,40 +1003,43 @@ tape_3590_print_mim_msg_f0(struct tape_device *device, struct irb *irb)
1003 /* Exception Message */ 1003 /* Exception Message */
1004 switch (sense->fmt.f70.emc) { 1004 switch (sense->fmt.f70.emc) {
1005 case 0x02: 1005 case 0x02:
1006 PRINT_WARN("(%s): Data degraded\n", device->cdev->dev.bus_id); 1006 PRINT_WARN("(%s): Data degraded\n",
1007 dev_name(&device->cdev->dev));
1007 break; 1008 break;
1008 case 0x03: 1009 case 0x03:
1009 PRINT_WARN("(%s): Data degraded in partion %i\n", 1010 PRINT_WARN("(%s): Data degraded in partion %i\n",
1010 device->cdev->dev.bus_id, sense->fmt.f70.mp); 1011 dev_name(&device->cdev->dev), sense->fmt.f70.mp);
1011 break; 1012 break;
1012 case 0x04: 1013 case 0x04:
1013 PRINT_WARN("(%s): Medium degraded\n", device->cdev->dev.bus_id); 1014 PRINT_WARN("(%s): Medium degraded\n",
1015 dev_name(&device->cdev->dev));
1014 break; 1016 break;
1015 case 0x05: 1017 case 0x05:
1016 PRINT_WARN("(%s): Medium degraded in partition %i\n", 1018 PRINT_WARN("(%s): Medium degraded in partition %i\n",
1017 device->cdev->dev.bus_id, sense->fmt.f70.mp); 1019 dev_name(&device->cdev->dev), sense->fmt.f70.mp);
1018 break; 1020 break;
1019 case 0x06: 1021 case 0x06:
1020 PRINT_WARN("(%s): Block 0 Error\n", device->cdev->dev.bus_id); 1022 PRINT_WARN("(%s): Block 0 Error\n",
1023 dev_name(&device->cdev->dev));
1021 break; 1024 break;
1022 case 0x07: 1025 case 0x07:
1023 PRINT_WARN("(%s): Medium Exception 0x%02x\n", 1026 PRINT_WARN("(%s): Medium Exception 0x%02x\n",
1024 device->cdev->dev.bus_id, sense->fmt.f70.md); 1027 dev_name(&device->cdev->dev), sense->fmt.f70.md);
1025 break; 1028 break;
1026 default: 1029 default:
1027 PRINT_WARN("(%s): MIM ExMsg: 0x%02x\n", 1030 PRINT_WARN("(%s): MIM ExMsg: 0x%02x\n",
1028 device->cdev->dev.bus_id, sense->fmt.f70.emc); 1031 dev_name(&device->cdev->dev), sense->fmt.f70.emc);
1029 break; 1032 break;
1030 } 1033 }
1031 /* Service Message */ 1034 /* Service Message */
1032 switch (sense->fmt.f70.smc) { 1035 switch (sense->fmt.f70.smc) {
1033 case 0x02: 1036 case 0x02:
1034 PRINT_WARN("(%s): Reference Media maintenance procedure %i\n", 1037 PRINT_WARN("(%s): Reference Media maintenance procedure %i\n",
1035 device->cdev->dev.bus_id, sense->fmt.f70.md); 1038 dev_name(&device->cdev->dev), sense->fmt.f70.md);
1036 break; 1039 break;
1037 default: 1040 default:
1038 PRINT_WARN("(%s): MIM ServiceMsg: 0x%02x\n", 1041 PRINT_WARN("(%s): MIM ServiceMsg: 0x%02x\n",
1039 device->cdev->dev.bus_id, sense->fmt.f70.smc); 1042 dev_name(&device->cdev->dev), sense->fmt.f70.smc);
1040 break; 1043 break;
1041 } 1044 }
1042} 1045}
@@ -1054,101 +1057,101 @@ tape_3590_print_io_sim_msg_f1(struct tape_device *device, struct irb *irb)
1054 switch (sense->fmt.f71.emc) { 1057 switch (sense->fmt.f71.emc) {
1055 case 0x01: 1058 case 0x01:
1056 PRINT_WARN("(%s): Effect of failure is unknown\n", 1059 PRINT_WARN("(%s): Effect of failure is unknown\n",
1057 device->cdev->dev.bus_id); 1060 dev_name(&device->cdev->dev));
1058 break; 1061 break;
1059 case 0x02: 1062 case 0x02:
1060 PRINT_WARN("(%s): CU Exception - no performance impact\n", 1063 PRINT_WARN("(%s): CU Exception - no performance impact\n",
1061 device->cdev->dev.bus_id); 1064 dev_name(&device->cdev->dev));
1062 break; 1065 break;
1063 case 0x03: 1066 case 0x03:
1064 PRINT_WARN("(%s): CU Exception on channel interface 0x%02x\n", 1067 PRINT_WARN("(%s): CU Exception on channel interface 0x%02x\n",
1065 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1068 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1066 break; 1069 break;
1067 case 0x04: 1070 case 0x04:
1068 PRINT_WARN("(%s): CU Exception on device path 0x%02x\n", 1071 PRINT_WARN("(%s): CU Exception on device path 0x%02x\n",
1069 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1072 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1070 break; 1073 break;
1071 case 0x05: 1074 case 0x05:
1072 PRINT_WARN("(%s): CU Exception on library path 0x%02x\n", 1075 PRINT_WARN("(%s): CU Exception on library path 0x%02x\n",
1073 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1076 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1074 break; 1077 break;
1075 case 0x06: 1078 case 0x06:
1076 PRINT_WARN("(%s): CU Exception on node 0x%02x\n", 1079 PRINT_WARN("(%s): CU Exception on node 0x%02x\n",
1077 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1080 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1078 break; 1081 break;
1079 case 0x07: 1082 case 0x07:
1080 PRINT_WARN("(%s): CU Exception on partition 0x%02x\n", 1083 PRINT_WARN("(%s): CU Exception on partition 0x%02x\n",
1081 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1084 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1082 break; 1085 break;
1083 default: 1086 default:
1084 PRINT_WARN("(%s): SIM ExMsg: 0x%02x\n", 1087 PRINT_WARN("(%s): SIM ExMsg: 0x%02x\n",
1085 device->cdev->dev.bus_id, sense->fmt.f71.emc); 1088 dev_name(&device->cdev->dev), sense->fmt.f71.emc);
1086 } 1089 }
1087 /* Service Message */ 1090 /* Service Message */
1088 switch (sense->fmt.f71.smc) { 1091 switch (sense->fmt.f71.smc) {
1089 case 0x01: 1092 case 0x01:
1090 PRINT_WARN("(%s): Repair impact is unknown\n", 1093 PRINT_WARN("(%s): Repair impact is unknown\n",
1091 device->cdev->dev.bus_id); 1094 dev_name(&device->cdev->dev));
1092 break; 1095 break;
1093 case 0x02: 1096 case 0x02:
1094 PRINT_WARN("(%s): Repair will not impact cu performance\n", 1097 PRINT_WARN("(%s): Repair will not impact cu performance\n",
1095 device->cdev->dev.bus_id); 1098 dev_name(&device->cdev->dev));
1096 break; 1099 break;
1097 case 0x03: 1100 case 0x03:
1098 if (sense->fmt.f71.mdf == 0) 1101 if (sense->fmt.f71.mdf == 0)
1099 PRINT_WARN("(%s): Repair will disable node " 1102 PRINT_WARN("(%s): Repair will disable node "
1100 "0x%x on CU\n", 1103 "0x%x on CU\n",
1101 device->cdev->dev.bus_id, 1104 dev_name(&device->cdev->dev),
1102 sense->fmt.f71.md[1]); 1105 sense->fmt.f71.md[1]);
1103 else 1106 else
1104 PRINT_WARN("(%s): Repair will disable nodes " 1107 PRINT_WARN("(%s): Repair will disable nodes "
1105 "(0x%x-0x%x) on CU\n", 1108 "(0x%x-0x%x) on CU\n",
1106 device->cdev->dev.bus_id, 1109 dev_name(&device->cdev->dev),
1107 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1110 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1108 break; 1111 break;
1109 case 0x04: 1112 case 0x04:
1110 if (sense->fmt.f71.mdf == 0) 1113 if (sense->fmt.f71.mdf == 0)
1111 PRINT_WARN("(%s): Repair will disable cannel path " 1114 PRINT_WARN("(%s): Repair will disable cannel path "
1112 "0x%x on CU\n", 1115 "0x%x on CU\n",
1113 device->cdev->dev.bus_id, 1116 dev_name(&device->cdev->dev),
1114 sense->fmt.f71.md[1]); 1117 sense->fmt.f71.md[1]);
1115 else 1118 else
1116 PRINT_WARN("(%s): Repair will disable cannel paths " 1119 PRINT_WARN("(%s): Repair will disable cannel paths "
1117 "(0x%x-0x%x) on CU\n", 1120 "(0x%x-0x%x) on CU\n",
1118 device->cdev->dev.bus_id, 1121 dev_name(&device->cdev->dev),
1119 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1122 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1120 break; 1123 break;
1121 case 0x05: 1124 case 0x05:
1122 if (sense->fmt.f71.mdf == 0) 1125 if (sense->fmt.f71.mdf == 0)
1123 PRINT_WARN("(%s): Repair will disable device path " 1126 PRINT_WARN("(%s): Repair will disable device path "
1124 "0x%x on CU\n", 1127 "0x%x on CU\n",
1125 device->cdev->dev.bus_id, 1128 dev_name(&device->cdev->dev),
1126 sense->fmt.f71.md[1]); 1129 sense->fmt.f71.md[1]);
1127 else 1130 else
1128 PRINT_WARN("(%s): Repair will disable device paths " 1131 PRINT_WARN("(%s): Repair will disable device paths "
1129 "(0x%x-0x%x) on CU\n", 1132 "(0x%x-0x%x) on CU\n",
1130 device->cdev->dev.bus_id, 1133 dev_name(&device->cdev->dev),
1131 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1134 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1132 break; 1135 break;
1133 case 0x06: 1136 case 0x06:
1134 if (sense->fmt.f71.mdf == 0) 1137 if (sense->fmt.f71.mdf == 0)
1135 PRINT_WARN("(%s): Repair will disable library path " 1138 PRINT_WARN("(%s): Repair will disable library path "
1136 "0x%x on CU\n", 1139 "0x%x on CU\n",
1137 device->cdev->dev.bus_id, 1140 dev_name(&device->cdev->dev),
1138 sense->fmt.f71.md[1]); 1141 sense->fmt.f71.md[1]);
1139 else 1142 else
1140 PRINT_WARN("(%s): Repair will disable library paths " 1143 PRINT_WARN("(%s): Repair will disable library paths "
1141 "(0x%x-0x%x) on CU\n", 1144 "(0x%x-0x%x) on CU\n",
1142 device->cdev->dev.bus_id, 1145 dev_name(&device->cdev->dev),
1143 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1146 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1144 break; 1147 break;
1145 case 0x07: 1148 case 0x07:
1146 PRINT_WARN("(%s): Repair will disable access to CU\n", 1149 PRINT_WARN("(%s): Repair will disable access to CU\n",
1147 device->cdev->dev.bus_id); 1150 dev_name(&device->cdev->dev));
1148 break; 1151 break;
1149 default: 1152 default:
1150 PRINT_WARN("(%s): SIM ServiceMsg: 0x%02x\n", 1153 PRINT_WARN("(%s): SIM ServiceMsg: 0x%02x\n",
1151 device->cdev->dev.bus_id, sense->fmt.f71.smc); 1154 dev_name(&device->cdev->dev), sense->fmt.f71.smc);
1152 } 1155 }
1153} 1156}
1154 1157
@@ -1165,104 +1168,104 @@ tape_3590_print_dev_sim_msg_f2(struct tape_device *device, struct irb *irb)
1165 switch (sense->fmt.f71.emc) { 1168 switch (sense->fmt.f71.emc) {
1166 case 0x01: 1169 case 0x01:
1167 PRINT_WARN("(%s): Effect of failure is unknown\n", 1170 PRINT_WARN("(%s): Effect of failure is unknown\n",
1168 device->cdev->dev.bus_id); 1171 dev_name(&device->cdev->dev));
1169 break; 1172 break;
1170 case 0x02: 1173 case 0x02:
1171 PRINT_WARN("(%s): DV Exception - no performance impact\n", 1174 PRINT_WARN("(%s): DV Exception - no performance impact\n",
1172 device->cdev->dev.bus_id); 1175 dev_name(&device->cdev->dev));
1173 break; 1176 break;
1174 case 0x03: 1177 case 0x03:
1175 PRINT_WARN("(%s): DV Exception on channel interface 0x%02x\n", 1178 PRINT_WARN("(%s): DV Exception on channel interface 0x%02x\n",
1176 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1179 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1177 break; 1180 break;
1178 case 0x04: 1181 case 0x04:
1179 PRINT_WARN("(%s): DV Exception on loader 0x%02x\n", 1182 PRINT_WARN("(%s): DV Exception on loader 0x%02x\n",
1180 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1183 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1181 break; 1184 break;
1182 case 0x05: 1185 case 0x05:
1183 PRINT_WARN("(%s): DV Exception on message display 0x%02x\n", 1186 PRINT_WARN("(%s): DV Exception on message display 0x%02x\n",
1184 device->cdev->dev.bus_id, sense->fmt.f71.md[0]); 1187 dev_name(&device->cdev->dev), sense->fmt.f71.md[0]);
1185 break; 1188 break;
1186 case 0x06: 1189 case 0x06:
1187 PRINT_WARN("(%s): DV Exception in tape path\n", 1190 PRINT_WARN("(%s): DV Exception in tape path\n",
1188 device->cdev->dev.bus_id); 1191 dev_name(&device->cdev->dev));
1189 break; 1192 break;
1190 case 0x07: 1193 case 0x07:
1191 PRINT_WARN("(%s): DV Exception in drive\n", 1194 PRINT_WARN("(%s): DV Exception in drive\n",
1192 device->cdev->dev.bus_id); 1195 dev_name(&device->cdev->dev));
1193 break; 1196 break;
1194 default: 1197 default:
1195 PRINT_WARN("(%s): DSIM ExMsg: 0x%02x\n", 1198 PRINT_WARN("(%s): DSIM ExMsg: 0x%02x\n",
1196 device->cdev->dev.bus_id, sense->fmt.f71.emc); 1199 dev_name(&device->cdev->dev), sense->fmt.f71.emc);
1197 } 1200 }
1198 /* Service Message */ 1201 /* Service Message */
1199 switch (sense->fmt.f71.smc) { 1202 switch (sense->fmt.f71.smc) {
1200 case 0x01: 1203 case 0x01:
1201 PRINT_WARN("(%s): Repair impact is unknown\n", 1204 PRINT_WARN("(%s): Repair impact is unknown\n",
1202 device->cdev->dev.bus_id); 1205 dev_name(&device->cdev->dev));
1203 break; 1206 break;
1204 case 0x02: 1207 case 0x02:
1205 PRINT_WARN("(%s): Repair will not impact device performance\n", 1208 PRINT_WARN("(%s): Repair will not impact device performance\n",
1206 device->cdev->dev.bus_id); 1209 dev_name(&device->cdev->dev));
1207 break; 1210 break;
1208 case 0x03: 1211 case 0x03:
1209 if (sense->fmt.f71.mdf == 0) 1212 if (sense->fmt.f71.mdf == 0)
1210 PRINT_WARN("(%s): Repair will disable channel path " 1213 PRINT_WARN("(%s): Repair will disable channel path "
1211 "0x%x on DV\n", 1214 "0x%x on DV\n",
1212 device->cdev->dev.bus_id, 1215 dev_name(&device->cdev->dev),
1213 sense->fmt.f71.md[1]); 1216 sense->fmt.f71.md[1]);
1214 else 1217 else
1215 PRINT_WARN("(%s): Repair will disable channel path " 1218 PRINT_WARN("(%s): Repair will disable channel path "
1216 "(0x%x-0x%x) on DV\n", 1219 "(0x%x-0x%x) on DV\n",
1217 device->cdev->dev.bus_id, 1220 dev_name(&device->cdev->dev),
1218 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1221 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1219 break; 1222 break;
1220 case 0x04: 1223 case 0x04:
1221 if (sense->fmt.f71.mdf == 0) 1224 if (sense->fmt.f71.mdf == 0)
1222 PRINT_WARN("(%s): Repair will disable interface 0x%x " 1225 PRINT_WARN("(%s): Repair will disable interface 0x%x "
1223 "on DV\n", 1226 "on DV\n",
1224 device->cdev->dev.bus_id, 1227 dev_name(&device->cdev->dev),
1225 sense->fmt.f71.md[1]); 1228 sense->fmt.f71.md[1]);
1226 else 1229 else
1227 PRINT_WARN("(%s): Repair will disable interfaces " 1230 PRINT_WARN("(%s): Repair will disable interfaces "
1228 "(0x%x-0x%x) on DV\n", 1231 "(0x%x-0x%x) on DV\n",
1229 device->cdev->dev.bus_id, 1232 dev_name(&device->cdev->dev),
1230 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1233 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1231 break; 1234 break;
1232 case 0x05: 1235 case 0x05:
1233 if (sense->fmt.f71.mdf == 0) 1236 if (sense->fmt.f71.mdf == 0)
1234 PRINT_WARN("(%s): Repair will disable loader 0x%x " 1237 PRINT_WARN("(%s): Repair will disable loader 0x%x "
1235 "on DV\n", 1238 "on DV\n",
1236 device->cdev->dev.bus_id, 1239 dev_name(&device->cdev->dev),
1237 sense->fmt.f71.md[1]); 1240 sense->fmt.f71.md[1]);
1238 else 1241 else
1239 PRINT_WARN("(%s): Repair will disable loader " 1242 PRINT_WARN("(%s): Repair will disable loader "
1240 "(0x%x-0x%x) on DV\n", 1243 "(0x%x-0x%x) on DV\n",
1241 device->cdev->dev.bus_id, 1244 dev_name(&device->cdev->dev),
1242 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1245 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1243 break; 1246 break;
1244 case 0x07: 1247 case 0x07:
1245 PRINT_WARN("(%s): Repair will disable access to DV\n", 1248 PRINT_WARN("(%s): Repair will disable access to DV\n",
1246 device->cdev->dev.bus_id); 1249 dev_name(&device->cdev->dev));
1247 break; 1250 break;
1248 case 0x08: 1251 case 0x08:
1249 if (sense->fmt.f71.mdf == 0) 1252 if (sense->fmt.f71.mdf == 0)
1250 PRINT_WARN("(%s): Repair will disable message " 1253 PRINT_WARN("(%s): Repair will disable message "
1251 "display 0x%x on DV\n", 1254 "display 0x%x on DV\n",
1252 device->cdev->dev.bus_id, 1255 dev_name(&device->cdev->dev),
1253 sense->fmt.f71.md[1]); 1256 sense->fmt.f71.md[1]);
1254 else 1257 else
1255 PRINT_WARN("(%s): Repair will disable message " 1258 PRINT_WARN("(%s): Repair will disable message "
1256 "displays (0x%x-0x%x) on DV\n", 1259 "displays (0x%x-0x%x) on DV\n",
1257 device->cdev->dev.bus_id, 1260 dev_name(&device->cdev->dev),
1258 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); 1261 sense->fmt.f71.md[1], sense->fmt.f71.md[2]);
1259 break; 1262 break;
1260 case 0x09: 1263 case 0x09:
1261 PRINT_WARN("(%s): Clean DV\n", device->cdev->dev.bus_id); 1264 PRINT_WARN("(%s): Clean DV\n", dev_name(&device->cdev->dev));
1262 break; 1265 break;
1263 default: 1266 default:
1264 PRINT_WARN("(%s): DSIM ServiceMsg: 0x%02x\n", 1267 PRINT_WARN("(%s): DSIM ServiceMsg: 0x%02x\n",
1265 device->cdev->dev.bus_id, sense->fmt.f71.smc); 1268 dev_name(&device->cdev->dev), sense->fmt.f71.smc);
1266 } 1269 }
1267} 1270}
1268 1271
@@ -1279,18 +1282,18 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb)
1279 return; 1282 return;
1280 if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) { 1283 if ((sense->mc > 0) && (sense->mc < TAPE_3590_MAX_MSG)) {
1281 if (tape_3590_msg[sense->mc] != NULL) 1284 if (tape_3590_msg[sense->mc] != NULL)
1282 PRINT_WARN("(%s): %s\n", device->cdev->dev.bus_id, 1285 PRINT_WARN("(%s): %s\n", dev_name(&device->cdev->dev),
1283 tape_3590_msg[sense->mc]); 1286 tape_3590_msg[sense->mc]);
1284 else { 1287 else {
1285 PRINT_WARN("(%s): Message Code 0x%x\n", 1288 PRINT_WARN("(%s): Message Code 0x%x\n",
1286 device->cdev->dev.bus_id, sense->mc); 1289 dev_name(&device->cdev->dev), sense->mc);
1287 } 1290 }
1288 return; 1291 return;
1289 } 1292 }
1290 if (sense->mc == 0xf0) { 1293 if (sense->mc == 0xf0) {
1291 /* Standard Media Information Message */ 1294 /* Standard Media Information Message */
1292 PRINT_WARN("(%s): MIM SEV=%i, MC=%02x, ES=%x/%x, " 1295 PRINT_WARN("(%s): MIM SEV=%i, MC=%02x, ES=%x/%x, "
1293 "RC=%02x-%04x-%02x\n", device->cdev->dev.bus_id, 1296 "RC=%02x-%04x-%02x\n", dev_name(&device->cdev->dev),
1294 sense->fmt.f70.sev, sense->mc, 1297 sense->fmt.f70.sev, sense->mc,
1295 sense->fmt.f70.emc, sense->fmt.f70.smc, 1298 sense->fmt.f70.emc, sense->fmt.f70.smc,
1296 sense->fmt.f70.refcode, sense->fmt.f70.mid, 1299 sense->fmt.f70.refcode, sense->fmt.f70.mid,
@@ -1302,7 +1305,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb)
1302 /* Standard I/O Subsystem Service Information Message */ 1305 /* Standard I/O Subsystem Service Information Message */
1303 PRINT_WARN("(%s): IOSIM SEV=%i, DEVTYPE=3590/%02x, " 1306 PRINT_WARN("(%s): IOSIM SEV=%i, DEVTYPE=3590/%02x, "
1304 "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", 1307 "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n",
1305 device->cdev->dev.bus_id, sense->fmt.f71.sev, 1308 dev_name(&device->cdev->dev), sense->fmt.f71.sev,
1306 device->cdev->id.dev_model, 1309 device->cdev->id.dev_model,
1307 sense->mc, sense->fmt.f71.emc, 1310 sense->mc, sense->fmt.f71.emc,
1308 sense->fmt.f71.smc, sense->fmt.f71.refcode1, 1311 sense->fmt.f71.smc, sense->fmt.f71.refcode1,
@@ -1314,7 +1317,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb)
1314 /* Standard Device Service Information Message */ 1317 /* Standard Device Service Information Message */
1315 PRINT_WARN("(%s): DEVSIM SEV=%i, DEVTYPE=3590/%02x, " 1318 PRINT_WARN("(%s): DEVSIM SEV=%i, DEVTYPE=3590/%02x, "
1316 "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n", 1319 "MC=%02x, ES=%x/%x, REF=0x%04x-0x%04x-0x%04x\n",
1317 device->cdev->dev.bus_id, sense->fmt.f71.sev, 1320 dev_name(&device->cdev->dev), sense->fmt.f71.sev,
1318 device->cdev->id.dev_model, 1321 device->cdev->id.dev_model,
1319 sense->mc, sense->fmt.f71.emc, 1322 sense->mc, sense->fmt.f71.emc,
1320 sense->fmt.f71.smc, sense->fmt.f71.refcode1, 1323 sense->fmt.f71.smc, sense->fmt.f71.refcode1,
@@ -1327,7 +1330,7 @@ tape_3590_print_era_msg(struct tape_device *device, struct irb *irb)
1327 return; 1330 return;
1328 } 1331 }
1329 PRINT_WARN("(%s): Device Message(%x)\n", 1332 PRINT_WARN("(%s): Device Message(%x)\n",
1330 device->cdev->dev.bus_id, sense->mc); 1333 dev_name(&device->cdev->dev), sense->mc);
1331} 1334}
1332 1335
1333static int tape_3590_crypt_error(struct tape_device *device, 1336static int tape_3590_crypt_error(struct tape_device *device,
@@ -1336,10 +1339,11 @@ static int tape_3590_crypt_error(struct tape_device *device,
1336 u8 cu_rc, ekm_rc1; 1339 u8 cu_rc, ekm_rc1;
1337 u16 ekm_rc2; 1340 u16 ekm_rc2;
1338 u32 drv_rc; 1341 u32 drv_rc;
1339 char *bus_id, *sense; 1342 const char *bus_id;
1343 char *sense;
1340 1344
1341 sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data; 1345 sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data;
1342 bus_id = device->cdev->dev.bus_id; 1346 bus_id = dev_name(&device->cdev->dev);
1343 cu_rc = sense[0]; 1347 cu_rc = sense[0];
1344 drv_rc = *((u32*) &sense[5]) & 0xffffff; 1348 drv_rc = *((u32*) &sense[5]) & 0xffffff;
1345 ekm_rc1 = sense[9]; 1349 ekm_rc1 = sense[9];
@@ -1440,7 +1444,7 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
1440 * "device intervention" is not very meaningfull 1444 * "device intervention" is not very meaningfull
1441 */ 1445 */
1442 PRINT_WARN("(%s): Tape operation when medium not loaded\n", 1446 PRINT_WARN("(%s): Tape operation when medium not loaded\n",
1443 device->cdev->dev.bus_id); 1447 dev_name(&device->cdev->dev));
1444 tape_med_state_set(device, MS_UNLOADED); 1448 tape_med_state_set(device, MS_UNLOADED);
1445 tape_3590_schedule_work(device, TO_CRYPT_OFF); 1449 tape_3590_schedule_work(device, TO_CRYPT_OFF);
1446 return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); 1450 return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM);
@@ -1487,18 +1491,18 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
1487 1491
1488 case 0x6020: 1492 case 0x6020:
1489 PRINT_WARN("(%s): Cartridge of wrong type ?\n", 1493 PRINT_WARN("(%s): Cartridge of wrong type ?\n",
1490 device->cdev->dev.bus_id); 1494 dev_name(&device->cdev->dev));
1491 return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); 1495 return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE);
1492 1496
1493 case 0x8011: 1497 case 0x8011:
1494 PRINT_WARN("(%s): Another host has reserved the tape device\n", 1498 PRINT_WARN("(%s): Another host has reserved the tape device\n",
1495 device->cdev->dev.bus_id); 1499 dev_name(&device->cdev->dev));
1496 return tape_3590_erp_basic(device, request, irb, -EPERM); 1500 return tape_3590_erp_basic(device, request, irb, -EPERM);
1497 case 0x8013: 1501 case 0x8013:
1498 PRINT_WARN("(%s): Another host has privileged access to the " 1502 PRINT_WARN("(%s): Another host has privileged access to the "
1499 "tape device\n", device->cdev->dev.bus_id); 1503 "tape device\n", dev_name(&device->cdev->dev));
1500 PRINT_WARN("(%s): To solve the problem unload the current " 1504 PRINT_WARN("(%s): To solve the problem unload the current "
1501 "cartridge!\n", device->cdev->dev.bus_id); 1505 "cartridge!\n", dev_name(&device->cdev->dev));
1502 return tape_3590_erp_basic(device, request, irb, -EPERM); 1506 return tape_3590_erp_basic(device, request, irb, -EPERM);
1503 default: 1507 default:
1504 return tape_3590_erp_basic(device, request, irb, -EIO); 1508 return tape_3590_erp_basic(device, request, irb, -EIO);
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index 95da72bc17e8..a25b8bf54f41 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -278,7 +278,7 @@ tapeblock_cleanup_device(struct tape_device *device)
278 278
279 if (!device->blk_data.disk) { 279 if (!device->blk_data.disk) {
280 PRINT_ERR("(%s): No gendisk to clean up!\n", 280 PRINT_ERR("(%s): No gendisk to clean up!\n",
281 device->cdev->dev.bus_id); 281 dev_name(&device->cdev->dev));
282 goto cleanup_queue; 282 goto cleanup_queue;
283 } 283 }
284 284
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
index 181a5441af16..d7073dbf825c 100644
--- a/drivers/s390/char/tape_core.c
+++ b/drivers/s390/char/tape_core.c
@@ -215,12 +215,12 @@ tape_med_state_set(struct tape_device *device, enum tape_medium_state newstate)
215 case MS_UNLOADED: 215 case MS_UNLOADED:
216 device->tape_generic_status |= GMT_DR_OPEN(~0); 216 device->tape_generic_status |= GMT_DR_OPEN(~0);
217 PRINT_INFO("(%s): Tape is unloaded\n", 217 PRINT_INFO("(%s): Tape is unloaded\n",
218 device->cdev->dev.bus_id); 218 dev_name(&device->cdev->dev));
219 break; 219 break;
220 case MS_LOADED: 220 case MS_LOADED:
221 device->tape_generic_status &= ~GMT_DR_OPEN(~0); 221 device->tape_generic_status &= ~GMT_DR_OPEN(~0);
222 PRINT_INFO("(%s): Tape has been mounted\n", 222 PRINT_INFO("(%s): Tape has been mounted\n",
223 device->cdev->dev.bus_id); 223 dev_name(&device->cdev->dev));
224 break; 224 break;
225 default: 225 default:
226 // print nothing 226 // print nothing
@@ -415,7 +415,7 @@ tape_generic_offline(struct tape_device *device)
415 device->cdev_id); 415 device->cdev_id);
416 PRINT_WARN("(%s): Set offline failed " 416 PRINT_WARN("(%s): Set offline failed "
417 "- drive in use.\n", 417 "- drive in use.\n",
418 device->cdev->dev.bus_id); 418 dev_name(&device->cdev->dev));
419 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 419 spin_unlock_irq(get_ccwdev_lock(device->cdev));
420 return -EBUSY; 420 return -EBUSY;
421 } 421 }
@@ -538,7 +538,8 @@ tape_generic_probe(struct ccw_device *cdev)
538 ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); 538 ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group);
539 if (ret) { 539 if (ret) {
540 tape_put_device(device); 540 tape_put_device(device);
541 PRINT_ERR("probe failed for tape device %s\n", cdev->dev.bus_id); 541 PRINT_ERR("probe failed for tape device %s\n",
542 dev_name(&cdev->dev));
542 return ret; 543 return ret;
543 } 544 }
544 cdev->dev.driver_data = device; 545 cdev->dev.driver_data = device;
@@ -546,7 +547,7 @@ tape_generic_probe(struct ccw_device *cdev)
546 device->cdev = cdev; 547 device->cdev = cdev;
547 ccw_device_get_id(cdev, &dev_id); 548 ccw_device_get_id(cdev, &dev_id);
548 device->cdev_id = devid_to_int(&dev_id); 549 device->cdev_id = devid_to_int(&dev_id);
549 PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); 550 PRINT_INFO("tape device %s found\n", dev_name(&cdev->dev));
550 return ret; 551 return ret;
551} 552}
552 553
@@ -616,7 +617,7 @@ tape_generic_remove(struct ccw_device *cdev)
616 device->cdev_id); 617 device->cdev_id);
617 PRINT_WARN("(%s): Drive in use vanished - " 618 PRINT_WARN("(%s): Drive in use vanished - "
618 "expect trouble!\n", 619 "expect trouble!\n",
619 device->cdev->dev.bus_id); 620 dev_name(&device->cdev->dev));
620 PRINT_WARN("State was %i\n", device->tape_state); 621 PRINT_WARN("State was %i\n", device->tape_state);
621 tape_state_set(device, TS_NOT_OPER); 622 tape_state_set(device, TS_NOT_OPER);
622 __tape_discard_requests(device); 623 __tape_discard_requests(device);
@@ -840,7 +841,7 @@ tape_dump_sense(struct tape_device* device, struct tape_request *request,
840 PRINT_INFO("-------------------------------------------------\n"); 841 PRINT_INFO("-------------------------------------------------\n");
841 PRINT_INFO("DSTAT : %02x CSTAT: %02x CPA: %04x\n", 842 PRINT_INFO("DSTAT : %02x CSTAT: %02x CPA: %04x\n",
842 irb->scsw.cmd.dstat, irb->scsw.cmd.cstat, irb->scsw.cmd.cpa); 843 irb->scsw.cmd.dstat, irb->scsw.cmd.cstat, irb->scsw.cmd.cpa);
843 PRINT_INFO("DEVICE: %s\n", device->cdev->dev.bus_id); 844 PRINT_INFO("DEVICE: %s\n", dev_name(&device->cdev->dev));
844 if (request != NULL) 845 if (request != NULL)
845 PRINT_INFO("OP : %s\n", tape_op_verbose[request->op]); 846 PRINT_INFO("OP : %s\n", tape_op_verbose[request->op]);
846 847
@@ -1051,7 +1052,7 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
1051 device = (struct tape_device *) cdev->dev.driver_data; 1052 device = (struct tape_device *) cdev->dev.driver_data;
1052 if (device == NULL) { 1053 if (device == NULL) {
1053 PRINT_ERR("could not get device structure for %s " 1054 PRINT_ERR("could not get device structure for %s "
1054 "in interrupt\n", cdev->dev.bus_id); 1055 "in interrupt\n", dev_name(&cdev->dev));
1055 return; 1056 return;
1056 } 1057 }
1057 request = (struct tape_request *) intparm; 1058 request = (struct tape_request *) intparm;
@@ -1064,13 +1065,13 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
1064 switch (PTR_ERR(irb)) { 1065 switch (PTR_ERR(irb)) {
1065 case -ETIMEDOUT: 1066 case -ETIMEDOUT:
1066 PRINT_WARN("(%s): Request timed out\n", 1067 PRINT_WARN("(%s): Request timed out\n",
1067 cdev->dev.bus_id); 1068 dev_name(&cdev->dev));
1068 case -EIO: 1069 case -EIO:
1069 __tape_end_request(device, request, -EIO); 1070 __tape_end_request(device, request, -EIO);
1070 break; 1071 break;
1071 default: 1072 default:
1072 PRINT_ERR("(%s): Unexpected i/o error %li\n", 1073 PRINT_ERR("(%s): Unexpected i/o error %li\n",
1073 cdev->dev.bus_id, 1074 dev_name(&cdev->dev),
1074 PTR_ERR(irb)); 1075 PTR_ERR(irb));
1075 } 1076 }
1076 return; 1077 return;
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c
index e7c888c14e71..8a376af926a7 100644
--- a/drivers/s390/char/tape_proc.c
+++ b/drivers/s390/char/tape_proc.c
@@ -52,7 +52,7 @@ static int tape_proc_show(struct seq_file *m, void *v)
52 return 0; 52 return 0;
53 spin_lock_irq(get_ccwdev_lock(device->cdev)); 53 spin_lock_irq(get_ccwdev_lock(device->cdev));
54 seq_printf(m, "%d\t", (int) n); 54 seq_printf(m, "%d\t", (int) n);
55 seq_printf(m, "%-10.10s ", device->cdev->dev.bus_id); 55 seq_printf(m, "%-10.10s ", dev_name(&device->cdev->dev));
56 seq_printf(m, "%04X/", device->cdev->id.cu_type); 56 seq_printf(m, "%04X/", device->cdev->id.cu_type);
57 seq_printf(m, "%02X\t", device->cdev->id.cu_model); 57 seq_printf(m, "%02X\t", device->cdev->id.cu_model);
58 seq_printf(m, "%04X/", device->cdev->id.dev_type); 58 seq_printf(m, "%04X/", device->cdev->id.dev_type);
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c
index cc8fd781ee22..5bd573d144d6 100644
--- a/drivers/s390/char/tape_std.c
+++ b/drivers/s390/char/tape_std.c
@@ -47,7 +47,7 @@ tape_std_assign_timeout(unsigned long data)
47 rc = tape_cancel_io(device, request); 47 rc = tape_cancel_io(device, request);
48 if(rc) 48 if(rc)
49 PRINT_ERR("(%s): Assign timeout: Cancel failed with rc = %i\n", 49 PRINT_ERR("(%s): Assign timeout: Cancel failed with rc = %i\n",
50 device->cdev->dev.bus_id, rc); 50 dev_name(&device->cdev->dev), rc);
51 51
52} 52}
53 53
@@ -83,7 +83,7 @@ tape_std_assign(struct tape_device *device)
83 83
84 if (rc != 0) { 84 if (rc != 0) {
85 PRINT_WARN("%s: assign failed - device might be busy\n", 85 PRINT_WARN("%s: assign failed - device might be busy\n",
86 device->cdev->dev.bus_id); 86 dev_name(&device->cdev->dev));
87 DBF_EVENT(3, "%08x: assign failed - device might be busy\n", 87 DBF_EVENT(3, "%08x: assign failed - device might be busy\n",
88 device->cdev_id); 88 device->cdev_id);
89 } else { 89 } else {
@@ -106,7 +106,7 @@ tape_std_unassign (struct tape_device *device)
106 DBF_EVENT(3, "(%08x): Can't unassign device\n", 106 DBF_EVENT(3, "(%08x): Can't unassign device\n",
107 device->cdev_id); 107 device->cdev_id);
108 PRINT_WARN("(%s): Can't unassign device - device gone\n", 108 PRINT_WARN("(%s): Can't unassign device - device gone\n",
109 device->cdev->dev.bus_id); 109 dev_name(&device->cdev->dev));
110 return -EIO; 110 return -EIO;
111 } 111 }
112 112
@@ -120,7 +120,8 @@ tape_std_unassign (struct tape_device *device)
120 120
121 if ((rc = tape_do_io(device, request)) != 0) { 121 if ((rc = tape_do_io(device, request)) != 0) {
122 DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id); 122 DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id);
123 PRINT_WARN("%s: Unassign failed\n", device->cdev->dev.bus_id); 123 PRINT_WARN("%s: Unassign failed\n",
124 dev_name(&device->cdev->dev));
124 } else { 125 } else {
125 DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id); 126 DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id);
126 } 127 }
@@ -634,10 +635,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count)
634 DBF_EXCEPTION(6, "xcom parm\n"); 635 DBF_EXCEPTION(6, "xcom parm\n");
635 if (*device->modeset_byte & 0x08) 636 if (*device->modeset_byte & 0x08)
636 PRINT_INFO("(%s) Compression is currently on\n", 637 PRINT_INFO("(%s) Compression is currently on\n",
637 device->cdev->dev.bus_id); 638 dev_name(&device->cdev->dev));
638 else 639 else
639 PRINT_INFO("(%s) Compression is currently off\n", 640 PRINT_INFO("(%s) Compression is currently off\n",
640 device->cdev->dev.bus_id); 641 dev_name(&device->cdev->dev));
641 PRINT_INFO("Use 1 to switch compression on, 0 to " 642 PRINT_INFO("Use 1 to switch compression on, 0 to "
642 "switch it off\n"); 643 "switch it off\n");
643 return -EINVAL; 644 return -EINVAL;
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index c31faefa2b3b..42173cc34610 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -724,8 +724,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
724 724
725 dev = kzalloc(sizeof(struct device), GFP_KERNEL); 725 dev = kzalloc(sizeof(struct device), GFP_KERNEL);
726 if (dev) { 726 if (dev) {
727 snprintf(dev->bus_id, BUS_ID_SIZE, "%s", 727 dev_set_name(dev, priv->internal_name);
728 priv->internal_name);
729 dev->bus = &iucv_bus; 728 dev->bus = &iucv_bus;
730 dev->parent = iucv_root; 729 dev->parent = iucv_root;
731 dev->driver = &vmlogrdr_driver; 730 dev->driver = &vmlogrdr_driver;
@@ -751,7 +750,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
751 priv->class_device = device_create_drvdata(vmlogrdr_class, dev, 750 priv->class_device = device_create_drvdata(vmlogrdr_class, dev,
752 MKDEV(vmlogrdr_major, 751 MKDEV(vmlogrdr_major,
753 priv->minor_num), 752 priv->minor_num),
754 priv, "%s", dev->bus_id); 753 priv, "%s", dev_name(dev));
755 if (IS_ERR(priv->class_device)) { 754 if (IS_ERR(priv->class_device)) {
756 ret = PTR_ERR(priv->class_device); 755 ret = PTR_ERR(priv->class_device);
757 priv->class_device=NULL; 756 priv->class_device=NULL;
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index c1f352b84868..6fdfa5ddeca8 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -886,11 +886,11 @@ static int ur_set_online(struct ccw_device *cdev)
886 goto fail_free_cdev; 886 goto fail_free_cdev;
887 if (urd->cdev->id.cu_type == READER_PUNCH_DEVTYPE) { 887 if (urd->cdev->id.cu_type == READER_PUNCH_DEVTYPE) {
888 if (urd->class == DEV_CLASS_UR_I) 888 if (urd->class == DEV_CLASS_UR_I)
889 sprintf(node_id, "vmrdr-%s", cdev->dev.bus_id); 889 sprintf(node_id, "vmrdr-%s", dev_name(&cdev->dev));
890 if (urd->class == DEV_CLASS_UR_O) 890 if (urd->class == DEV_CLASS_UR_O)
891 sprintf(node_id, "vmpun-%s", cdev->dev.bus_id); 891 sprintf(node_id, "vmpun-%s", dev_name(&cdev->dev));
892 } else if (urd->cdev->id.cu_type == PRINTER_DEVTYPE) { 892 } else if (urd->cdev->id.cu_type == PRINTER_DEVTYPE) {
893 sprintf(node_id, "vmprt-%s", cdev->dev.bus_id); 893 sprintf(node_id, "vmprt-%s", dev_name(&cdev->dev));
894 } else { 894 } else {
895 rc = -EOPNOTSUPP; 895 rc = -EOPNOTSUPP;
896 goto fail_free_cdev; 896 goto fail_free_cdev;