aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c44
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index d99f525eac08..3dec460bba27 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -15,12 +15,12 @@
15#include <linux/device.h> 15#include <linux/device.h>
16 16
17#include <asm/cio.h> 17#include <asm/cio.h>
18#include <asm/chpid.h>
18 19
19#include "css.h" 20#include "css.h"
20#include "cio.h" 21#include "cio.h"
21#include "cio_debug.h" 22#include "cio_debug.h"
22#include "ioasm.h" 23#include "ioasm.h"
23#include "chpid.h"
24#include "chp.h" 24#include "chp.h"
25#include "chsc.h" 25#include "chsc.h"
26 26
@@ -498,6 +498,45 @@ static int chsc_process_sei_res_acc(struct chsc_sei_area *sei_area)
498 return rc; 498 return rc;
499} 499}
500 500
501struct chp_config_data {
502 u8 map[32];
503 u8 op;
504 u8 pc;
505};
506
507static int chsc_process_sei_chp_config(struct chsc_sei_area *sei_area)
508{
509 struct chp_config_data *data;
510 struct chp_id chpid;
511 int num;
512
513 CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
514 if (sei_area->rs != 0)
515 return 0;
516 data = (struct chp_config_data *) &(sei_area->ccdf);
517 chp_id_init(&chpid);
518 for (num = 0; num <= __MAX_CHPID; num++) {
519 if (!chp_test_bit(data->map, num))
520 continue;
521 chpid.id = num;
522 printk(KERN_WARNING "cio: processing configure event %d for "
523 "chpid %x.%02x\n", data->op, chpid.cssid, chpid.id);
524 switch (data->op) {
525 case 0:
526 chp_cfg_schedule(chpid, 1);
527 break;
528 case 1:
529 chp_cfg_schedule(chpid, 0);
530 break;
531 case 2:
532 chp_cfg_cancel_deconfigure(chpid);
533 break;
534 }
535 }
536
537 return 0;
538}
539
501static int chsc_process_sei(struct chsc_sei_area *sei_area) 540static int chsc_process_sei(struct chsc_sei_area *sei_area)
502{ 541{
503 int rc; 542 int rc;
@@ -514,6 +553,9 @@ static int chsc_process_sei(struct chsc_sei_area *sei_area)
514 case 2: /* i/o resource accessibiliy */ 553 case 2: /* i/o resource accessibiliy */
515 rc = chsc_process_sei_res_acc(sei_area); 554 rc = chsc_process_sei_res_acc(sei_area);
516 break; 555 break;
556 case 8: /* channel-path-configuration notification */
557 rc = chsc_process_sei_chp_config(sei_area);
558 break;
517 default: /* other stuff */ 559 default: /* other stuff */
518 CIO_CRW_EVENT(4, "chsc: unhandled sei content code %d\n", 560 CIO_CRW_EVENT(4, "chsc: unhandled sei content code %d\n",
519 sei_area->cc); 561 sei_area->cc);