aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-10-10 15:33:14 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-10 15:33:53 -0400
commit1f4e7edabc4071cdff0133e7e04db2d7287d0e36 (patch)
tree751f447ad52286205502e255d46106e68cb20bf0 /drivers/s390/cio
parent9286b7ed682615c1508210f85d26e4c9a5cbf126 (diff)
[S390] bus_id -> dev_set_name() for css and ccw busses
Convert remaining s390 users setting bus_id to dev_set_name() or init_name. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/cio.c13
-rw-r--r--drivers/s390/cio/cio.h4
-rw-r--r--drivers/s390/cio/device.c16
3 files changed, 29 insertions, 4 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)
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index 3b236d20e835..0fb24784e925 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -117,11 +117,15 @@ extern int cio_is_console(struct subchannel_id);
117extern struct subchannel *cio_get_console_subchannel(void); 117extern struct subchannel *cio_get_console_subchannel(void);
118extern spinlock_t * cio_get_console_lock(void); 118extern spinlock_t * cio_get_console_lock(void);
119extern void *cio_get_console_priv(void); 119extern void *cio_get_console_priv(void);
120extern const char *cio_get_console_sch_name(struct subchannel_id schid);
121extern const char *cio_get_console_cdev_name(struct subchannel *sch);
120#else 122#else
121#define cio_is_console(schid) 0 123#define cio_is_console(schid) 0
122#define cio_get_console_subchannel() NULL 124#define cio_get_console_subchannel() NULL
123#define cio_get_console_lock() NULL 125#define cio_get_console_lock() NULL
124#define cio_get_console_priv() NULL 126#define cio_get_console_priv() NULL
127#define cio_get_console_sch_name(schid) NULL
128#define cio_get_console_cdev_name(sch) NULL
125#endif 129#endif
126 130
127#endif 131#endif
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index a8e755a88b01..4e78c82194b4 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1035,8 +1035,11 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
1035 init_timer(&priv->timer); 1035 init_timer(&priv->timer);
1036 1036
1037 /* Set an initial name for the device. */ 1037 /* Set an initial name for the device. */
1038 snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", 1038 if (cio_is_console(sch->schid))
1039 sch->schid.ssid, sch->schib.pmcw.dev); 1039 cdev->dev.init_name = cio_get_console_cdev_name(sch);
1040 else
1041 dev_set_name(&cdev->dev, "0.%x.%04x",
1042 sch->schid.ssid, sch->schib.pmcw.dev);
1040 1043
1041 /* Increase counter of devices currently in recognition. */ 1044 /* Increase counter of devices currently in recognition. */
1042 atomic_inc(&ccw_device_init_count); 1045 atomic_inc(&ccw_device_init_count);
@@ -1625,6 +1628,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int slow)
1625 1628
1626#ifdef CONFIG_CCW_CONSOLE 1629#ifdef CONFIG_CCW_CONSOLE
1627static struct ccw_device console_cdev; 1630static struct ccw_device console_cdev;
1631static char console_cdev_name[10] = "0.x.xxxx";
1628static struct ccw_device_private console_private; 1632static struct ccw_device_private console_private;
1629static int console_cdev_in_use; 1633static int console_cdev_in_use;
1630 1634
@@ -1695,6 +1699,14 @@ ccw_device_probe_console(void)
1695 console_cdev.online = 1; 1699 console_cdev.online = 1;
1696 return &console_cdev; 1700 return &console_cdev;
1697} 1701}
1702
1703
1704const char *cio_get_console_cdev_name(struct subchannel *sch)
1705{
1706 snprintf(console_cdev_name, 10, "0.%x.%04x",
1707 sch->schid.ssid, sch->schib.pmcw.dev);
1708 return (const char *)console_cdev_name;
1709}
1698#endif 1710#endif
1699 1711
1700/* 1712/*