kernels/linux-2.4.0/drivers/media/video/bttv-driver.c
/*
 * called from irq handler on fatal errors.  Takes the grabber chip
 * offline, flag it needs a reinitialization (which can't be done
 * from irq context) and wake up all sleeping proccesses.  They would
 * block forever else.  We also need someone who actually does the
 * reinitialization from process context...
 */
called from irq handler on fatal errors.  Takes the grabber chip
offline, flag it needs a reinitialization (which can't be done
from irq context) and wake up all sleeping proccesses.  They would
block forever else.  We also need someone who actually does the
reinitialization from process context
called from irq handler on fatal errors . Takes the grabber chip offline flag it needs a reinitialization ( which can ' t be done from irq context ) and wake up all sleeping proccesses . They would block forever else . We also need someone who actually does the reinitialization from process context
static void bt848_offline(struct bttv *btv)
{
	int i;
	spin_lock(&btv->s_lock);
	btv->gq_in = 0;
	btv->gq_out = 0;
	btv->gq_grab = -1;
	for (i = 0; i < gbuffers; i++)
		if (btv->gbuf[i].stat == GBUFFER_GRABBING)
			btv->gbuf[i].stat = GBUFFER_ERROR;
	btv->risc_cap_odd  = 0;
	btv->risc_cap_even = 0;
	bt848_set_risc_jmps(btv,0);
	btv->needs_restart = 1;
	spin_unlock(&btv->s_lock);
	wake_up_interruptible(&btv->vbiq);
	wake_up_interruptible(&btv->capq);
}
static void bt848_offline ( struct bttv * btv ) { int i ; spin_lock ( & btv -> s_lock ) ; btv -> gq_in = 0 ; btv -> gq_out = 0 ; btv -> gq_grab = -1 ; for ( i = 0 ; i < gbuffers ; i ++ ) if ( btv -> gbuf [ i ] . stat == GBUFFER_GRABBING ) btv -> gbuf [ i ] . stat = GBUFFER_ERROR ; btv -> risc_cap_odd = 0 ; btv -> risc_cap_even = 0 ; bt848_set_risc_jmps ( btv , 0 ) ; btv -> needs_restart = 1 ; spin_unlock ( & btv -> s_lock ) ; wake_up_interruptible ( & btv -> vbiq ) ; wake_up_interruptible ( & btv -> capq ) ; }
called from irq handler on fatal errors.
called from irq handler on fatal errors .
/* cancel all outstanding grab requests */ /* disable screen overlay and DMA */ /* flag the chip needs a restart */