/* Called by hardware driver to signal that the controller is down and unavailable for use.  */
void capi_ctr_down(struct capi_ctr *card)
/* Called by hardware driver to signal that the controller is down and unavailable for use.  */
void capi_ctr_down(struct capi_ctr *card)
{
	u16 appl;
	DBG("");
        if (card->cardstate == CARD_DETECTED)
		return;
        card->cardstate = CARD_DETECTED;
	memset(card->manu, 0, sizeof(card->manu));
	memset(&card->version, 0, sizeof(card->version));
	memset(&card->profile, 0, sizeof(card->profile));
	memset(card->serial, 0, sizeof(card->serial));
	for (appl = 1; appl <= CAPI_MAXAPPL; appl++) {
		struct capi20_appl *ap = get_capi_appl_by_nr(appl);
		if (!ap || ap->release_in_progress)
			continue;
		capi_ctr_put(card);
	}
	printk(KERN_NOTICE "kcapi: card [%03d] down.\n", card->cnr);
	notify_push(KCI_CONTRDOWN, card->cnr, 0, 0);
}