From d7b5a4c94f49131811112526f7d404a50f0b5ca7 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Fri, 8 Dec 2006 15:54:28 +0100 Subject: [S390] Support for disconnected devices reappearing on another subchannel. - create a 'pseudo_subchannel' per channel subsystem (the 'orphanage') - use the orphanage as a shelter for ccw_devices that can't remain on the same subchannel Signed-off-by: Cornelia Huck Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/cio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/s390/cio/cio.c') diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index e8d331493fd8..7835a714a405 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -415,6 +415,8 @@ cio_enable_subchannel (struct subchannel *sch, unsigned int isc) CIO_TRACE_EVENT (2, "ensch"); CIO_TRACE_EVENT (2, sch->dev.bus_id); + if (sch_is_pseudo_sch(sch)) + return -EINVAL; ccode = stsch (sch->schid, &sch->schib); if (ccode) return -ENODEV; @@ -462,6 +464,8 @@ cio_disable_subchannel (struct subchannel *sch) CIO_TRACE_EVENT (2, "dissch"); CIO_TRACE_EVENT (2, sch->dev.bus_id); + if (sch_is_pseudo_sch(sch)) + return 0; ccode = stsch (sch->schid, &sch->schib); if (ccode == 3) /* Not operational. */ return -ENODEV; @@ -496,7 +500,7 @@ cio_disable_subchannel (struct subchannel *sch) return ret; } -static int cio_create_sch_lock(struct subchannel *sch) +int cio_create_sch_lock(struct subchannel *sch) { sch->lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL); if (!sch->lock) -- cgit v1.2.3-55-g7522