diff options
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) |