static int
BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
{
	switch (mt) {
		case CARD_RESET:
			/* Disable ints */
			enable_bkm_int(cs, 0);
			reset_bkm(cs);
			return (0);
		case CARD_RELEASE:
			/* Sanity */
			enable_bkm_int(cs, 0);
			reset_bkm(cs);
			release_io_bkm(cs);
			return (0);
		case CARD_INIT:
			clear_pending_isac_ints(cs);
			clear_pending_jade_ints(cs);
			initisac(cs);
			initjade(cs);
			/* Enable ints */
			enable_bkm_int(cs, 1);
			return (0);
		case CARD_TEST:
			return (0);
	}
	return (0);
}
Beispiel #2
0
static int
BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
{
	switch (mt) {
		case CARD_RESET:
			/* Disable ints */
			set_ipac_active(cs->subtyp, 0);
			enable_bkm_int(cs, 0);
			reset_bkm(cs);
			return (0);
		case CARD_RELEASE:
			/* Sanity */
			set_ipac_active(cs->subtyp, 0);
			enable_bkm_int(cs, 0);
			reset_bkm(cs);
			release_io_sct_quadro(cs);
			return (0);
		case CARD_INIT:
			cs->debug |= L1_DEB_IPAC;
			set_ipac_active(cs->subtyp, 1);
			inithscxisac(cs, 3);
			/* Enable ints */
			enable_bkm_int(cs, 1);
			return (0);
		case CARD_TEST:
			return (0);
	}
	return (0);
}
static int
BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
{
    u_long flags;

    switch (mt) {
    case CARD_RESET:
        /* Disable ints */
        spin_lock_irqsave(&cs->lock, flags);
        enable_bkm_int(cs, 0);
        reset_bkm(cs);
        spin_unlock_irqrestore(&cs->lock, flags);
        return (0);
    case CARD_RELEASE:
        /* Sanity */
        spin_lock_irqsave(&cs->lock, flags);
        enable_bkm_int(cs, 0);
        reset_bkm(cs);
        spin_unlock_irqrestore(&cs->lock, flags);
        release_io_bkm(cs);
        return (0);
    case CARD_INIT:
        spin_lock_irqsave(&cs->lock, flags);
        clear_pending_isac_ints(cs);
        clear_pending_jade_ints(cs);
        initisac(cs);
        initjade(cs);
        /* Enable ints */
        enable_bkm_int(cs, 1);
        spin_unlock_irqrestore(&cs->lock, flags);
        return (0);
    case CARD_TEST:
        return (0);
    }
    return (0);
}
Beispiel #4
0
static int
BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
{
	u_long flags;

	switch (mt) {
		case CARD_RESET:
			spin_lock_irqsave(&cs->lock, flags);
			/* Disable ints */
			set_ipac_active(cs, 0);
			enable_bkm_int(cs, 0);
			reset_bkm(cs);
			spin_unlock_irqrestore(&cs->lock, flags);
			return (0);
		case CARD_RELEASE:
			/* Sanity */
			spin_lock_irqsave(&cs->lock, flags);
			set_ipac_active(cs, 0);
			enable_bkm_int(cs, 0);
			spin_unlock_irqrestore(&cs->lock, flags);
			release_io_sct_quadro(cs);
			return (0);
		case CARD_INIT:
			spin_lock_irqsave(&cs->lock, flags);
			cs->debug |= L1_DEB_IPAC;
			set_ipac_active(cs, 1);
			inithscxisac(cs, 3);
			/* Enable ints */
			enable_bkm_int(cs, 1);
			spin_unlock_irqrestore(&cs->lock, flags);
			return (0);
		case CARD_TEST:
			return (0);
	}
	return (0);
}