Esempio n. 1
0
static void
ergo_stopcard(hysdn_card * card)
{
	unsigned long flags;
	unsigned char val;

	hysdn_net_release(card);	/* first release the net device if existing */
#ifdef CONFIG_HYSDN_CAPI
	hycapi_capi_stop(card);
#endif /* CONFIG_HYSDN_CAPI */
	spin_lock_irqsave(&card->hysdn_lock, flags);
	val = bytein(card->iobase + PCI9050_INTR_REG);	/* get actual value */
	val &= ~(PCI9050_INTR_REG_ENPCI | PCI9050_INTR_REG_EN1);	/* mask irq */
	byteout(card->iobase + PCI9050_INTR_REG, val);
	card->irq_enabled = 0;
	byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RESET);	/* reset E1 processor */
	card->state = CARD_STATE_UNUSED;
	card->err_log_state = ERRLOG_STATE_OFF;		/* currently no log active */

	spin_unlock_irqrestore(&card->hysdn_lock, flags);
}				/* ergo_stopcard */
Esempio n. 2
0
static void
ergo_stopcard(hysdn_card * card)
{
	unsigned long flags;
	unsigned char val;

	hysdn_net_release(card);	
#ifdef CONFIG_HYSDN_CAPI
	hycapi_capi_stop(card);
#endif 
	spin_lock_irqsave(&card->hysdn_lock, flags);
	val = bytein(card->iobase + PCI9050_INTR_REG);	
	val &= ~(PCI9050_INTR_REG_ENPCI | PCI9050_INTR_REG_EN1);	
	byteout(card->iobase + PCI9050_INTR_REG, val);
	card->irq_enabled = 0;
	byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RESET);	
	card->state = CARD_STATE_UNUSED;
	card->err_log_state = ERRLOG_STATE_OFF;		

	spin_unlock_irqrestore(&card->hysdn_lock, flags);
}