diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 15:25:26 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 15:25:26 +0200 |
commit | 4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch) | |
tree | 9d19a2774e83637d86dc876f3af22af1dacf0bec /drivers/s390/cio/chsc.c | |
parent | [DLM] dlm: user locks (diff) | |
parent | Linux 2.6.18-rc2 (diff) | |
download | linux-4bf311ddfbffe12d41ad1a3c311ab727db6f72cb.tar.xz linux-4bf311ddfbffe12d41ad1a3c311ab727db6f72cb.zip |
Merge branch 'master'
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r-- | drivers/s390/cio/chsc.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index a01f3bba4a7b..61ce3f1d5228 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -1464,6 +1464,40 @@ chsc_get_chp_desc(struct subchannel *sch, int chp_no) return desc; } +static int reset_channel_path(struct channel_path *chp) +{ + int cc; + + cc = rchp(chp->id); + switch (cc) { + case 0: + return 0; + case 2: + return -EBUSY; + default: + return -ENODEV; + } +} + +static void reset_channel_paths_css(struct channel_subsystem *css) +{ + int i; + + for (i = 0; i <= __MAX_CHPID; i++) { + if (css->chps[i]) + reset_channel_path(css->chps[i]); + } +} + +void cio_reset_channel_paths(void) +{ + int i; + + for (i = 0; i <= __MAX_CSSID; i++) { + if (css[i] && css[i]->valid) + reset_channel_paths_css(css[i]); + } +} static int __init chsc_alloc_sei_area(void) |