diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
commit | 0a7d5f8ce960e74fa22986bda4af488539796e49 (patch) | |
tree | e29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/s390/cio/chsc.c | |
parent | 0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff) | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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) | |||
1464 | return desc; | 1464 | return desc; |
1465 | } | 1465 | } |
1466 | 1466 | ||
1467 | static int reset_channel_path(struct channel_path *chp) | ||
1468 | { | ||
1469 | int cc; | ||
1470 | |||
1471 | cc = rchp(chp->id); | ||
1472 | switch (cc) { | ||
1473 | case 0: | ||
1474 | return 0; | ||
1475 | case 2: | ||
1476 | return -EBUSY; | ||
1477 | default: | ||
1478 | return -ENODEV; | ||
1479 | } | ||
1480 | } | ||
1481 | |||
1482 | static void reset_channel_paths_css(struct channel_subsystem *css) | ||
1483 | { | ||
1484 | int i; | ||
1485 | |||
1486 | for (i = 0; i <= __MAX_CHPID; i++) { | ||
1487 | if (css->chps[i]) | ||
1488 | reset_channel_path(css->chps[i]); | ||
1489 | } | ||
1490 | } | ||
1491 | |||
1492 | void cio_reset_channel_paths(void) | ||
1493 | { | ||
1494 | int i; | ||
1495 | |||
1496 | for (i = 0; i <= __MAX_CSSID; i++) { | ||
1497 | if (css[i] && css[i]->valid) | ||
1498 | reset_channel_paths_css(css[i]); | ||
1499 | } | ||
1500 | } | ||
1467 | 1501 | ||
1468 | static int __init | 1502 | static int __init |
1469 | chsc_alloc_sei_area(void) | 1503 | chsc_alloc_sei_area(void) |