当前位置: 首页>>代码示例>>C++>>正文


C++ CIO_CRW_EVENT函数代码示例

本文整理汇总了C++中CIO_CRW_EVENT函数的典型用法代码示例。如果您正苦于以下问题:C++ CIO_CRW_EVENT函数的具体用法?C++ CIO_CRW_EVENT怎么用?C++ CIO_CRW_EVENT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CIO_CRW_EVENT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: chsc_process_sei_nt0

static void chsc_process_sei_nt0(struct chsc_sei_nt0_area *sei_area)
{
    /* which kind of information was stored? */
    switch (sei_area->cc) {
    case 1: /* link incident*/
        chsc_process_sei_link_incident(sei_area);
        break;
    case 2: /* i/o resource accessibility */
        chsc_process_sei_res_acc(sei_area);
        break;
    case 7: /* channel-path-availability information */
        chsc_process_sei_chp_avail(sei_area);
        break;
    case 8: /* channel-path-configuration notification */
        chsc_process_sei_chp_config(sei_area);
        break;
    case 12: /* scm change notification */
        chsc_process_sei_scm_change(sei_area);
        break;
    case 14: /* scm available notification */
        chsc_process_sei_scm_avail(sei_area);
        break;
    default: /* other stuff */
        CIO_CRW_EVENT(2, "chsc: sei nt0 unhandled cc=%d\n",
                      sei_area->cc);
        break;
    }

    /* Check if we might have lost some information. */
    if (sei_area->flags & 0x40) {
        CIO_CRW_EVENT(2, "chsc: event overflow\n");
        css_schedule_eval_all();
    }
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:34,代码来源:chsc.c

示例2: chsc_process_sei_chp_avail

static void chsc_process_sei_chp_avail(struct chsc_sei_nt0_area *sei_area)
{
    struct channel_path *chp;
    struct chp_id chpid;
    u8 *data;
    int num;

    CIO_CRW_EVENT(4, "chsc: channel path availability information\n");
    if (sei_area->rs != 0)
        return;
    data = sei_area->ccdf;
    chp_id_init(&chpid);
    for (num = 0; num <= __MAX_CHPID; num++) {
        if (!chp_test_bit(data, num))
            continue;
        chpid.id = num;

        CIO_CRW_EVENT(4, "Update information for channel path "
                      "%x.%02x\n", chpid.cssid, chpid.id);
        chp = chpid_to_chp(chpid);
        if (!chp) {
            chp_new(chpid);
            continue;
        }
        mutex_lock(&chp->lock);
        chsc_determine_base_channel_path_desc(chpid, &chp->desc);
        mutex_unlock(&chp->lock);
    }
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:29,代码来源:chsc.c

示例3: chsc_process_event_information

static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
{
    do {
        memset(sei, 0, sizeof(*sei));
        sei->request.length = 0x0010;
        sei->request.code = 0x000e;
        sei->ntsm = ntsm;

        if (chsc(sei))
            break;

        if (sei->response.code != 0x0001) {
            CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n",
                          sei->response.code);
            break;
        }

        CIO_CRW_EVENT(2, "chsc: sei successful (nt=%d)\n", sei->nt);
        switch (sei->nt) {
        case 0:
            chsc_process_sei_nt0(&sei->u.nt0_area);
            break;
        case 2:
            chsc_process_sei_nt2(&sei->u.nt2_area);
            break;
        default:
            CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt);
            break;
        }
    } while (sei->u.nt0_area.flags & 0x80);
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:31,代码来源:chsc.c

示例4: css_process_crw

/*
 * Called from the machine check handler for subchannel report words.
 */
static void css_process_crw(struct crw *crw0, struct crw *crw1, int overflow)
{
	struct subchannel_id mchk_schid;
	struct subchannel *sch;

	if (overflow) {
		css_schedule_eval_all();
		return;
	}
	CIO_CRW_EVENT(2, "CRW0 reports slct=%d, oflw=%d, "
		      "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n",
		      crw0->slct, crw0->oflw, crw0->chn, crw0->rsc, crw0->anc,
		      crw0->erc, crw0->rsid);
	if (crw1)
		CIO_CRW_EVENT(2, "CRW1 reports slct=%d, oflw=%d, "
			      "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n",
			      crw1->slct, crw1->oflw, crw1->chn, crw1->rsc,
			      crw1->anc, crw1->erc, crw1->rsid);
	init_subchannel_id(&mchk_schid);
	mchk_schid.sch_no = crw0->rsid;
	if (crw1)
		mchk_schid.ssid = (crw1->rsid >> 4) & 3;

	if (crw0->erc == CRW_ERC_PMOD) {
		sch = get_subchannel_by_schid(mchk_schid);
		if (sch) {
			css_update_ssd_info(sch);
			put_device(&sch->dev);
		}
	}
	/*
开发者ID:rajat1994,项目名称:linux,代码行数:34,代码来源:css.c

示例5: chsc_process_sei_scm_change

static void chsc_process_sei_scm_change(struct chsc_sei_nt0_area *sei_area)
{
    int ret;

    CIO_CRW_EVENT(4, "chsc: scm change notification\n");
    if (sei_area->rs != 7)
        return;

    ret = scm_update_information();
    if (ret)
        CIO_CRW_EVENT(0, "chsc: updating change notification"
                      " failed (rc=%d).\n", ret);
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:13,代码来源:chsc.c

示例6: chsc_process_sei_scm_avail

static void chsc_process_sei_scm_avail(struct chsc_sei_nt0_area *sei_area)
{
    int ret;

    CIO_CRW_EVENT(4, "chsc: scm available information\n");
    if (sei_area->rs != 7)
        return;

    ret = scm_process_availability_information();
    if (ret)
        CIO_CRW_EVENT(0, "chsc: process availability information"
                      " failed (rc=%d).\n", ret);
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:13,代码来源:chsc.c

示例7: chsc_determine_channel_path_desc

int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
                                     int c, int m, void *page)
{
    struct chsc_scpd *scpd_area;
    int ccode, ret;

    if ((rfmt == 1) && !css_general_characteristics.fcs)
        return -EINVAL;
    if ((rfmt == 2) && !css_general_characteristics.cib)
        return -EINVAL;

    memset(page, 0, PAGE_SIZE);
    scpd_area = page;
    scpd_area->request.length = 0x0010;
    scpd_area->request.code = 0x0002;
    scpd_area->cssid = chpid.cssid;
    scpd_area->first_chpid = chpid.id;
    scpd_area->last_chpid = chpid.id;
    scpd_area->m = m;
    scpd_area->c = c;
    scpd_area->fmt = fmt;
    scpd_area->rfmt = rfmt;

    ccode = chsc(scpd_area);
    if (ccode > 0)
        return (ccode == 3) ? -ENODEV : -EBUSY;

    ret = chsc_error_from_response(scpd_area->response.code);
    if (ret)
        CIO_CRW_EVENT(2, "chsc: scpd failed (rc=%04x)\n",
                      scpd_area->response.code);
    return ret;
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:33,代码来源:chsc.c

示例8: chsc_process_sei_chp_config

static void chsc_process_sei_chp_config(struct chsc_sei_area *sei_area)
{
	struct chp_config_data *data;
	struct chp_id chpid;
	int num;

	CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
	if (sei_area->rs != 0)
		return;
	data = (struct chp_config_data *) &(sei_area->ccdf);
	chp_id_init(&chpid);
	for (num = 0; num <= __MAX_CHPID; num++) {
		if (!chp_test_bit(data->map, num))
			continue;
		chpid.id = num;
		printk(KERN_WARNING "cio: processing configure event %d for "
		       "chpid %x.%02x\n", data->op, chpid.cssid, chpid.id);
		switch (data->op) {
		case 0:
			chp_cfg_schedule(chpid, 1);
			break;
		case 1:
			chp_cfg_schedule(chpid, 0);
			break;
		case 2:
			chp_cfg_cancel_deconfigure(chpid);
			break;
		}
	}
}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:30,代码来源:chsc.c

示例9: chsc_process_sei_chp_config

static void chsc_process_sei_chp_config(struct chsc_sei_nt0_area *sei_area)
{
    struct chp_config_data *data;
    struct chp_id chpid;
    int num;
    char *events[3] = {"configure", "deconfigure", "cancel deconfigure"};

    CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
    if (sei_area->rs != 0)
        return;
    data = (struct chp_config_data *) &(sei_area->ccdf);
    chp_id_init(&chpid);
    for (num = 0; num <= __MAX_CHPID; num++) {
        if (!chp_test_bit(data->map, num))
            continue;
        chpid.id = num;
        pr_notice("Processing %s for channel path %x.%02x\n",
                  events[data->op], chpid.cssid, chpid.id);
        switch (data->op) {
        case 0:
            chp_cfg_schedule(chpid, 1);
            break;
        case 1:
            chp_cfg_schedule(chpid, 0);
            break;
        case 2:
            chp_cfg_cancel_deconfigure(chpid);
            break;
        }
    }
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:31,代码来源:chsc.c

示例10: chsc_process_sei_res_acc

static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area)
{
    struct chp_link link;
    struct chp_id chpid;
    int status;

    CIO_CRW_EVENT(4, "chsc: resource accessibility event (rs=%02x, "
                  "rs_id=%04x)\n", sei_area->rs, sei_area->rsid);
    if (sei_area->rs != 4)
        return;
    chp_id_init(&chpid);
    chpid.id = sei_area->rsid;
    /* allocate a new channel path structure, if needed */
    status = chp_get_status(chpid);
    if (status < 0)
        chp_new(chpid);
    else if (!status)
        return;
    memset(&link, 0, sizeof(struct chp_link));
    link.chpid = chpid;
    if ((sei_area->vf & 0xc0) != 0) {
        link.fla = sei_area->fla;
        if ((sei_area->vf & 0xc0) == 0xc0)
            /* full link address */
            link.fla_mask = 0xffff;
        else
            /* link address */
            link.fla_mask = 0xff00;
    }
    s390_process_res_acc(&link);
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:31,代码来源:chsc.c

示例11: chsc_determine_channel_path_desc

int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt,
				     int c, int m,
				     struct chsc_response_struct *resp)
{
	int ccode, ret;

	struct {
		struct chsc_header request;
		u32 : 2;
		u32 m : 1;
		u32 c : 1;
		u32 fmt : 4;
		u32 cssid : 8;
		u32 : 4;
		u32 rfmt : 4;
		u32 first_chpid : 8;
		u32 : 24;
		u32 last_chpid : 8;
		u32 zeroes1;
		struct chsc_header response;
		u8 data[PAGE_SIZE - 20];
	} __attribute__ ((packed)) *scpd_area;

	if ((rfmt == 1) && !css_general_characteristics.fcs)
		return -EINVAL;
	if ((rfmt == 2) && !css_general_characteristics.cib)
		return -EINVAL;
	scpd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
	if (!scpd_area)
		return -ENOMEM;

	scpd_area->request.length = 0x0010;
	scpd_area->request.code = 0x0002;

	scpd_area->cssid = chpid.cssid;
	scpd_area->first_chpid = chpid.id;
	scpd_area->last_chpid = chpid.id;
	scpd_area->m = m;
	scpd_area->c = c;
	scpd_area->fmt = fmt;
	scpd_area->rfmt = rfmt;

	ccode = chsc(scpd_area);
	if (ccode > 0) {
		ret = (ccode == 3) ? -ENODEV : -EBUSY;
		goto out;
	}

	ret = chsc_error_from_response(scpd_area->response.code);
	if (ret == 0)
		/* Success. */
		memcpy(resp, &scpd_area->response, scpd_area->response.length);
	else
		CIO_CRW_EVENT(2, "chsc: scpd failed (rc=%04x)\n",
			      scpd_area->response.code);
out:
	free_page((unsigned long)scpd_area);
	return ret;
}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:59,代码来源:chsc.c

示例12: chsc_process_sei_link_incident

static void chsc_process_sei_link_incident(struct chsc_sei_nt0_area *sei_area)
{
    struct chp_id chpid;
    int id;

    CIO_CRW_EVENT(4, "chsc: link incident (rs=%02x, rs_id=%04x)\n",
                  sei_area->rs, sei_area->rsid);
    if (sei_area->rs != 4)
        return;
    id = __get_chpid_from_lir(sei_area->ccdf);
    if (id < 0)
        CIO_CRW_EVENT(4, "chsc: link incident - invalid LIR\n");
    else {
        chp_id_init(&chpid);
        chpid.id = id;
        chsc_chp_offline(chpid);
    }
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:18,代码来源:chsc.c

示例13: chsc_process_event_information

static void chsc_process_event_information(struct chsc_sei *sei, u64 ntsm)
{
	static int ntsm_unsupported;

	while (true) {
		memset(sei, 0, sizeof(*sei));
		sei->request.length = 0x0010;
		sei->request.code = 0x000e;
		if (!ntsm_unsupported)
			sei->ntsm = ntsm;

		if (chsc(sei))
			break;

		if (sei->response.code != 0x0001) {
			CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x, ntsm=%llx)\n",
				      sei->response.code, sei->ntsm);

			if (sei->response.code == 3 && sei->ntsm) {
				/* Fallback for old firmware. */
				ntsm_unsupported = 1;
				continue;
			}
			break;
		}

		CIO_CRW_EVENT(2, "chsc: sei successful (nt=%d)\n", sei->nt);
		switch (sei->nt) {
		case 0:
			chsc_process_sei_nt0(&sei->u.nt0_area);
			break;
		case 2:
			chsc_process_sei_nt2(&sei->u.nt2_area);
			break;
		default:
			CIO_CRW_EVENT(2, "chsc: unhandled nt: %d\n", sei->nt);
			break;
		}

		if (!(sei->u.nt0_area.flags & 0x80))
			break;
	}
}
开发者ID:AICP,项目名称:kernel_moto_shamu,代码行数:43,代码来源:chsc.c

示例14: __chsc_do_secm

int __chsc_do_secm(struct channel_subsystem *css, int enable)
{
    struct {
        struct chsc_header request;
        u32 operation_code : 2;
        u32 : 30;
        u32 key : 4;
        u32 : 28;
        u32 zeroes1;
        u32 cub_addr1;
        u32 zeroes2;
        u32 cub_addr2;
        u32 reserved[13];
        struct chsc_header response;
        u32 status : 8;
        u32 : 4;
        u32 fmt : 4;
        u32 : 16;
    } __attribute__ ((packed)) *secm_area;
    int ret, ccode;

    spin_lock_irq(&chsc_page_lock);
    memset(chsc_page, 0, PAGE_SIZE);
    secm_area = chsc_page;
    secm_area->request.length = 0x0050;
    secm_area->request.code = 0x0016;

    secm_area->key = PAGE_DEFAULT_KEY >> 4;
    secm_area->cub_addr1 = (u64)(unsigned long)css->cub_addr1;
    secm_area->cub_addr2 = (u64)(unsigned long)css->cub_addr2;

    secm_area->operation_code = enable ? 0 : 1;

    ccode = chsc(secm_area);
    if (ccode > 0) {
        ret = (ccode == 3) ? -ENODEV : -EBUSY;
        goto out;
    }

    switch (secm_area->response.code) {
    case 0x0102:
    case 0x0103:
        ret = -EINVAL;
        break;
    default:
        ret = chsc_error_from_response(secm_area->response.code);
    }
    if (ret != 0)
        CIO_CRW_EVENT(2, "chsc: secm failed (rc=%04x)\n",
                      secm_area->response.code);
out:
    spin_unlock_irq(&chsc_page_lock);
    return ret;
}
开发者ID:jay-caoj,项目名称:linux-3.9.6,代码行数:54,代码来源:chsc.c

示例15: chp_process_crw

/**
 * chp_process_crw - process channel-path status change
 * @crw0: channel report-word to handler
 * @crw1: second channel-report word (always NULL)
 * @overflow: crw overflow indication
 *
 * Handle channel-report-words indicating that the status of a channel-path
 * has changed.
 */
static void chp_process_crw(struct crw *crw0, struct crw *crw1,
			    int overflow)
{
	struct chp_id chpid;

	if (overflow) {
		css_schedule_eval_all();
		return;
	}
	CIO_CRW_EVENT(2, "CRW reports slct=%d, oflw=%d, "
		      "chn=%d, rsc=%X, anc=%d, erc=%X, rsid=%X\n",
		      crw0->slct, crw0->oflw, crw0->chn, crw0->rsc, crw0->anc,
		      crw0->erc, crw0->rsid);
	/*
	 * Check for solicited machine checks. These are
	 * created by reset channel path and need not be
	 * handled here.
	 */
	if (crw0->slct) {
		CIO_CRW_EVENT(2, "solicited machine check for "
			      "channel path %02X\n", crw0->rsid);
		return;
	}
	chp_id_init(&chpid);
	chpid.id = crw0->rsid;
	switch (crw0->erc) {
	case CRW_ERC_IPARM: /* Path has come. */
		if (!chp_is_registered(chpid))
			chp_new(chpid);
		chsc_chp_online(chpid);
		break;
	case CRW_ERC_PERRI: /* Path has gone. */
	case CRW_ERC_PERRN:
		chsc_chp_offline(chpid);
		break;
	default:
		CIO_CRW_EVENT(2, "Don't know how to handle erc=%x\n",
			      crw0->erc);
	}
}
开发者ID:19Dan01,项目名称:linux,代码行数:49,代码来源:chp.c


注:本文中的CIO_CRW_EVENT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。