linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 11/21] bus_id -> dev_set_name() for css and ccw busses
Date: Wed, 01 Oct 2008 10:33:28 +0200	[thread overview]
Message-ID: <20081001084128.019670987@de.ibm.com> (raw)
In-Reply-To: 20081001083317.782967473@de.ibm.com

[-- Attachment #1: 110-cio-busid6.diff --]
[-- Type: text/plain, Size: 3968 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

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>
---

 drivers/s390/cio/cio.c    |   13 +++++++++++--
 drivers/s390/cio/cio.h    |    4 ++++
 drivers/s390/cio/device.c |   16 ++++++++++++++--
 3 files changed, 29 insertions(+), 4 deletions(-)

Index: quilt-2.6/drivers/s390/cio/cio.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio.c
+++ quilt-2.6/drivers/s390/cio/cio.c
@@ -571,8 +571,10 @@ int cio_validate_subchannel(struct subch
 	}
 	mutex_init(&sch->reg_mutex);
 	/* Set a name for the subchannel */
-	snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
-		  schid.sch_no);
+	if (cio_is_console(schid))
+		sch->dev.init_name = cio_get_console_sch_name(schid);
+	else
+		dev_set_name(&sch->dev, "0.%x.%04x", schid.ssid, schid.sch_no);
 
 	/*
 	 * The first subchannel that is not-operational (ccode==3)
@@ -677,6 +679,7 @@ do_IRQ (struct pt_regs *regs)
 
 #ifdef CONFIG_CCW_CONSOLE
 static struct subchannel console_subchannel;
+static char console_sch_name[10] = "0.x.xxxx";
 static struct io_subchannel_private console_priv;
 static int console_subchannel_in_use;
 
@@ -827,6 +830,12 @@ cio_get_console_subchannel(void)
 	return &console_subchannel;
 }
 
+const char *cio_get_console_sch_name(struct subchannel_id schid)
+{
+	snprintf(console_sch_name, 10, "0.%x.%04x", schid.ssid, schid.sch_no);
+	return (const char *)console_sch_name;
+}
+
 #endif
 static int
 __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
Index: quilt-2.6/drivers/s390/cio/cio.h
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio.h
+++ quilt-2.6/drivers/s390/cio/cio.h
@@ -117,11 +117,15 @@ extern int cio_is_console(struct subchan
 extern struct subchannel *cio_get_console_subchannel(void);
 extern spinlock_t * cio_get_console_lock(void);
 extern void *cio_get_console_priv(void);
+extern const char *cio_get_console_sch_name(struct subchannel_id schid);
+extern const char *cio_get_console_cdev_name(struct subchannel *sch);
 #else
 #define cio_is_console(schid) 0
 #define cio_get_console_subchannel() NULL
 #define cio_get_console_lock() NULL
 #define cio_get_console_priv() NULL
+#define cio_get_console_sch_name(schid) NULL
+#define cio_get_console_cdev_name(sch) NULL
 #endif
 
 #endif
Index: quilt-2.6/drivers/s390/cio/device.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device.c
+++ quilt-2.6/drivers/s390/cio/device.c
@@ -1035,8 +1035,11 @@ io_subchannel_recog(struct ccw_device *c
 	init_timer(&priv->timer);
 
 	/* Set an initial name for the device. */
-	snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x",
-		  sch->schid.ssid, sch->schib.pmcw.dev);
+	if (cio_is_console(sch->schid))
+		cdev->dev.init_name = cio_get_console_cdev_name(sch);
+	else
+		dev_set_name(&cdev->dev, "0.%x.%04x",
+			     sch->schid.ssid, sch->schib.pmcw.dev);
 
 	/* Increase counter of devices currently in recognition. */
 	atomic_inc(&ccw_device_init_count);
@@ -1625,6 +1628,7 @@ static int io_subchannel_sch_event(struc
 
 #ifdef CONFIG_CCW_CONSOLE
 static struct ccw_device console_cdev;
+static char console_cdev_name[10] = "0.x.xxxx";
 static struct ccw_device_private console_private;
 static int console_cdev_in_use;
 
@@ -1695,6 +1699,14 @@ ccw_device_probe_console(void)
 	console_cdev.online = 1;
 	return &console_cdev;
 }
+
+
+const char *cio_get_console_cdev_name(struct subchannel *sch)
+{
+	snprintf(console_cdev_name, 10, "0.%x.%04x",
+		 sch->schid.ssid, sch->schib.pmcw.dev);
+	return (const char *)console_cdev_name;
+}
 #endif
 
 /*

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  parent reply	other threads:[~2008-10-01  8:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01  8:33 [patch 00/21] s390 patches for the 2.6.28 merge window Martin Schwidefsky
2008-10-01  8:33 ` [patch 01/21] qdio: speed up multicast traffic on full HiperSocket queue Martin Schwidefsky
2008-10-01  8:33 ` [patch 02/21] cio: move device unregistration to dedicated work queue Martin Schwidefsky
2008-10-01  8:33 ` [patch 03/21] cio: introduce purge function for /proc/cio_ignore Martin Schwidefsky
2008-10-01  8:33 ` [patch 04/21] cio: Update cio_ignore documentation Martin Schwidefsky
2008-10-01  8:33 ` [patch 05/21] cio: Exorcise cio_msg= from documentation Martin Schwidefsky
2008-10-01  8:33 ` [patch 06/21] bus_id -> dev_name conversions Martin Schwidefsky
2008-10-01  8:33 ` [patch 07/21] bus_id -> dev_set_name() changes Martin Schwidefsky
2008-10-01  8:33 ` [patch 08/21] more bus_id -> dev_name conversions Martin Schwidefsky
2008-10-01  8:33 ` [patch 09/21] Use s390_root_dev_* in kvm_virtio Martin Schwidefsky
2008-10-01  8:33 ` [patch 10/21] bus_id ->dev_name() conversions in qdio Martin Schwidefsky
2008-10-01  8:33 ` Martin Schwidefsky [this message]
2008-10-01  8:33 ` [patch 12/21] cio: inline assembly cleanup Martin Schwidefsky
2008-10-01  8:33 ` [patch 13/21] qdio enhanced SIGA (iqdio) support Martin Schwidefsky
2008-10-01  8:33 ` [patch 14/21] s390: use sys_pause for 31bit pause entry point Martin Schwidefsky
2008-10-01  8:33 ` [patch 15/21] ptrace changes Martin Schwidefsky
2008-11-03 17:14   ` David Smith
2008-11-05 11:41     ` Martin Schwidefsky
2008-11-06 18:24       ` David Smith
2008-11-07  9:14         ` Martin Schwidefsky
2008-11-07 15:32         ` Martin Schwidefsky
2008-10-01  8:33 ` [patch 16/21] dcssblk: add >2G DCSSs support and stacked contiguous DCSSs support Martin Schwidefsky
2008-10-01  8:33 ` [patch 17/21] nohz: Fix __udelay Martin Schwidefsky
2008-10-01  8:33 ` [patch 18/21] Move private simple udelay function to arch/s390/lib/delay.c Martin Schwidefsky
2008-10-01  8:33 ` [patch 19/21] dasd: fix message flood for unsolicited interrupts Martin Schwidefsky
2008-10-01  8:33 ` [patch 20/21] xpram: per device block request queues Martin Schwidefsky
2008-10-01  8:33 ` [patch 21/21] Add ioctl support for EMC Symmetrix Subsystem Control I/O Martin Schwidefsky
2008-10-01 11:03   ` Christoph Hellwig
2008-10-01 11:17     ` Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081001084128.019670987@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=gregkh@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).