aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/cio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r--drivers/s390/cio/cio.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 8759912734e0..719d6c406e97 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -571,8 +571,10 @@ int cio_validate_subchannel(struct subchannel *sch, struct subchannel_id schid)
571 } 571 }
572 mutex_init(&sch->reg_mutex); 572 mutex_init(&sch->reg_mutex);
573 /* Set a name for the subchannel */ 573 /* Set a name for the subchannel */
574 snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid, 574 if (cio_is_console(schid))
575 schid.sch_no); 575 sch->dev.init_name = cio_get_console_sch_name(schid);
576 else
577 dev_set_name(&sch->dev, "0.%x.%04x", schid.ssid, schid.sch_no);
576 578
577 /* 579 /*
578 * The first subchannel that is not-operational (ccode==3) 580 * The first subchannel that is not-operational (ccode==3)
@@ -677,6 +679,7 @@ do_IRQ (struct pt_regs *regs)
677 679
678#ifdef CONFIG_CCW_CONSOLE 680#ifdef CONFIG_CCW_CONSOLE
679static struct subchannel console_subchannel; 681static struct subchannel console_subchannel;
682static char console_sch_name[10] = "0.x.xxxx";
680static struct io_subchannel_private console_priv; 683static struct io_subchannel_private console_priv;
681static int console_subchannel_in_use; 684static int console_subchannel_in_use;
682 685
@@ -827,6 +830,12 @@ cio_get_console_subchannel(void)
827 return &console_subchannel; 830 return &console_subchannel;
828} 831}
829 832
833const char *cio_get_console_sch_name(struct subchannel_id schid)
834{
835 snprintf(console_sch_name, 10, "0.%x.%04x", schid.ssid, schid.sch_no);
836 return (const char *)console_sch_name;
837}
838
830#endif 839#endif
831static int 840static int
832__disable_subchannel_easy(struct subchannel_id schid, struct schib *schib) 841__disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)