• Home
  • Raw
  • Download

Lines Matching refs:chpid

55 static void set_chp_logically_online(struct chp_id chpid, int onoff)  in set_chp_logically_online()  argument
57 chpid_to_chp(chpid)->state = onoff; in set_chp_logically_online()
62 int chp_get_status(struct chp_id chpid) in chp_get_status() argument
64 return (chpid_to_chp(chpid) ? chpid_to_chp(chpid)->state : -ENODEV); in chp_get_status()
76 struct chp_id chpid; in chp_get_sch_opm() local
81 chp_id_init(&chpid); in chp_get_sch_opm()
84 chpid.id = sch->schib.pmcw.chpid[i]; in chp_get_sch_opm()
85 if (chp_get_status(chpid) != 0) in chp_get_sch_opm()
99 int chp_is_registered(struct chp_id chpid) in chp_is_registered() argument
101 return chpid_to_chp(chpid) != NULL; in chp_is_registered()
108 static int s390_vary_chpid(struct chp_id chpid, int on) in s390_vary_chpid() argument
113 sprintf(dbf_text, on?"varyon%x.%02x":"varyoff%x.%02x", chpid.cssid, in s390_vary_chpid()
114 chpid.id); in s390_vary_chpid()
117 status = chp_get_status(chpid); in s390_vary_chpid()
121 set_chp_logically_online(chpid, on); in s390_vary_chpid()
122 chsc_chp_vary(chpid, on); in s390_vary_chpid()
157 struct chp_id chpid) in chp_measurement_copy_block() argument
163 if (chpid.id < 128) { in chp_measurement_copy_block()
165 idx = chpid.id; in chp_measurement_copy_block()
168 idx = chpid.id - 128; in chp_measurement_copy_block()
195 chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->chpid); in chp_measurement_read()
259 error = s390_vary_chpid(cp->chpid, 1); in chp_status_write()
263 error = s390_vary_chpid(cp->chpid, 0); in chp_status_write()
280 status = chp_info_get_status(cp->chpid); in chp_configure_show()
302 chp_cfg_schedule(cp->chpid, val); in chp_configure_write()
424 rc = chsc_determine_base_channel_path_desc(chp->chpid, &chp->desc); in chp_update_desc()
432 chsc_determine_fmt1_channel_path_desc(chp->chpid, &chp->desc_fmt1); in chp_update_desc()
445 int chp_new(struct chp_id chpid) in chp_new() argument
450 if (chp_is_registered(chpid)) in chp_new()
457 chp->chpid = chpid; in chp_new()
459 chp->dev.parent = &channel_subsystems[chpid.cssid]->device; in chp_new()
472 dev_set_name(&chp->dev, "chp%x.%02x", chpid.cssid, chpid.id); in chp_new()
478 chpid.cssid, chpid.id, ret); in chp_new()
482 mutex_lock(&channel_subsystems[chpid.cssid]->mutex); in chp_new()
483 if (channel_subsystems[chpid.cssid]->cm_enabled) { in chp_new()
487 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); in chp_new()
491 channel_subsystems[chpid.cssid]->chps[chpid.id] = chp; in chp_new()
492 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); in chp_new()
507 struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid) in chp_get_chp_desc() argument
512 chp = chpid_to_chp(chpid); in chp_get_chp_desc()
537 struct chp_id chpid; in chp_process_crw() local
557 chp_id_init(&chpid); in chp_process_crw()
558 chpid.id = crw0->rsid; in chp_process_crw()
561 if (!chp_is_registered(chpid)) in chp_process_crw()
562 chp_new(chpid); in chp_process_crw()
563 chsc_chp_online(chpid); in chp_process_crw()
567 chsc_chp_offline(chpid); in chp_process_crw()
584 if (!chp_id_is_equal(&ssd->chpid[i], &link->chpid)) in chp_ssd_get_mask()
632 int chp_info_get_status(struct chp_id chpid) in chp_info_get_status() argument
641 bit = info_bit_num(chpid); in chp_info_get_status()
657 static enum cfg_task_t cfg_get_task(struct chp_id chpid) in cfg_get_task() argument
659 return chp_cfg_task[chpid.cssid][chpid.id]; in cfg_get_task()
663 static void cfg_set_task(struct chp_id chpid, enum cfg_task_t cfg) in cfg_set_task() argument
665 chp_cfg_task[chpid.cssid][chpid.id] = cfg; in cfg_set_task()
669 static enum cfg_task_t chp_cfg_fetch_task(struct chp_id *chpid) in chp_cfg_fetch_task() argument
673 chp_id_for_each(chpid) { in chp_cfg_fetch_task()
674 t = cfg_get_task(*chpid); in chp_cfg_fetch_task()
686 struct chp_id chpid; in cfg_func() local
691 t = chp_cfg_fetch_task(&chpid); in cfg_func()
696 rc = sclp_chp_configure(chpid); in cfg_func()
699 "%d\n", chpid.cssid, chpid.id, rc); in cfg_func()
702 chsc_chp_online(chpid); in cfg_func()
706 rc = sclp_chp_deconfigure(chpid); in cfg_func()
709 "%d\n", chpid.cssid, chpid.id, rc); in cfg_func()
712 chsc_chp_offline(chpid); in cfg_func()
722 if (t == cfg_get_task(chpid)) in cfg_func()
723 cfg_set_task(chpid, cfg_none); in cfg_func()
735 void chp_cfg_schedule(struct chp_id chpid, int configure) in chp_cfg_schedule() argument
737 CIO_MSG_EVENT(2, "chp_cfg_sched%x.%02x=%d\n", chpid.cssid, chpid.id, in chp_cfg_schedule()
740 cfg_set_task(chpid, configure ? cfg_configure : cfg_deconfigure); in chp_cfg_schedule()
752 void chp_cfg_cancel_deconfigure(struct chp_id chpid) in chp_cfg_cancel_deconfigure() argument
754 CIO_MSG_EVENT(2, "chp_cfg_cancel:%x.%02x\n", chpid.cssid, chpid.id); in chp_cfg_cancel_deconfigure()
756 if (cfg_get_task(chpid) == cfg_deconfigure) in chp_cfg_cancel_deconfigure()
757 cfg_set_task(chpid, cfg_none); in chp_cfg_cancel_deconfigure()
763 struct chp_id chpid; in cfg_idle() local
767 t = chp_cfg_fetch_task(&chpid); in cfg_idle()
782 struct chp_id chpid; in chp_init() local
793 chp_id_for_each(&chpid) { in chp_init()
794 state = chp_info_get_status(chpid); in chp_init()
797 chp_new(chpid); in chp_init()