diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-12-08 09:54:28 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-08 09:54:28 -0500 |
commit | d7b5a4c94f49131811112526f7d404a50f0b5ca7 (patch) | |
tree | 159cb6717e16339b821315c0bc6b17b6f5df5119 /drivers/s390/cio/cio.c | |
parent | 2ec2298412e1ab4674b3780005058d4f0b8bd858 (diff) |
[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 <cornelia.huck@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r-- | drivers/s390/cio/cio.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
415 | CIO_TRACE_EVENT (2, "ensch"); | 415 | CIO_TRACE_EVENT (2, "ensch"); |
416 | CIO_TRACE_EVENT (2, sch->dev.bus_id); | 416 | CIO_TRACE_EVENT (2, sch->dev.bus_id); |
417 | 417 | ||
418 | if (sch_is_pseudo_sch(sch)) | ||
419 | return -EINVAL; | ||
418 | ccode = stsch (sch->schid, &sch->schib); | 420 | ccode = stsch (sch->schid, &sch->schib); |
419 | if (ccode) | 421 | if (ccode) |
420 | return -ENODEV; | 422 | return -ENODEV; |
@@ -462,6 +464,8 @@ cio_disable_subchannel (struct subchannel *sch) | |||
462 | CIO_TRACE_EVENT (2, "dissch"); | 464 | CIO_TRACE_EVENT (2, "dissch"); |
463 | CIO_TRACE_EVENT (2, sch->dev.bus_id); | 465 | CIO_TRACE_EVENT (2, sch->dev.bus_id); |
464 | 466 | ||
467 | if (sch_is_pseudo_sch(sch)) | ||
468 | return 0; | ||
465 | ccode = stsch (sch->schid, &sch->schib); | 469 | ccode = stsch (sch->schid, &sch->schib); |
466 | if (ccode == 3) /* Not operational. */ | 470 | if (ccode == 3) /* Not operational. */ |
467 | return -ENODEV; | 471 | return -ENODEV; |
@@ -496,7 +500,7 @@ cio_disable_subchannel (struct subchannel *sch) | |||
496 | return ret; | 500 | return ret; |
497 | } | 501 | } |
498 | 502 | ||
499 | static int cio_create_sch_lock(struct subchannel *sch) | 503 | int cio_create_sch_lock(struct subchannel *sch) |
500 | { | 504 | { |
501 | sch->lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL); | 505 | sch->lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL); |
502 | if (!sch->lock) | 506 | if (!sch->lock) |