kernels/linux-2.4.0/drivers/net/tokenring/tms380tr.c
/*
 * Check if the SSB has actually been written by the adapter.
 */
Check if the SSB has actually been written by the adapter.
Check if the SSB has actually been written by the adapter .
static unsigned char tms380tr_chk_ssb(struct net_local *tp, unsigned short IrqType)
{
	SSB *ssb = &tp->ssb;	
	if(IrqType != STS_IRQ_TRANSMIT_STATUS
		&& IrqType != STS_IRQ_RECEIVE_STATUS
		&& IrqType != STS_IRQ_COMMAND_STATUS
		&& IrqType != STS_IRQ_RING_STATUS)
	{
		return (1);	
	}
	if(ssb->STS == (unsigned short) -1)
		return (0);	
	if(IrqType == STS_IRQ_COMMAND_STATUS)
		return (1);	
	if(ssb->Parm[0] == (unsigned short) -1)
		return (0);	
	if(IrqType == STS_IRQ_RING_STATUS)
		return (1);	
	if(ssb->Parm[1] == (unsigned short) -1)
		return (0);	
	if(ssb->Parm[2] == (unsigned short) -1)
		return (0);	
	return (1);	
}
static unsigned char tms380tr_chk_ssb ( struct net_local * tp , unsigned short IrqType ) { SSB * ssb = & tp -> ssb ; if ( IrqType != STS_IRQ_TRANSMIT_STATUS && IrqType != STS_IRQ_RECEIVE_STATUS && IrqType != STS_IRQ_COMMAND_STATUS && IrqType != STS_IRQ_RING_STATUS ) { return ( 1 ) ; } if ( ssb -> STS == ( unsigned short ) -1 ) return ( 0 ) ; if ( IrqType == STS_IRQ_COMMAND_STATUS ) return ( 1 ) ; if ( ssb -> Parm [ 0 ] == ( unsigned short ) -1 ) return ( 0 ) ; if ( IrqType == STS_IRQ_RING_STATUS ) return ( 1 ) ; if ( ssb -> Parm [ 1 ] == ( unsigned short ) -1 ) return ( 0 ) ; if ( ssb -> Parm [ 2 ] == ( unsigned short ) -1 ) return ( 0 ) ; return ( 1 ) ; }
Check if the SSB has actually been written by the adapter.
Check if the SSB has actually been written by the adapter .
/* The address of the SSB. */ /* C 0 1 2 INTERRUPT CODE
	 * - - - - --------------
	 * 1 1 1 1 TRANSMIT STATUS
	 * 1 1 1 1 RECEIVE STATUS
	 * 1 ? ? 0 COMMAND STATUS
	 * 0 0 0 0 SCB CLEAR
	 * 1 1 0 0 RING STATUS
	 * 0 0 0 0 ADAPTER CHECK
	 *
	 * 0 = SSB field not affected by interrupt
	 * 1 = SSB field is affected by interrupt
	 *
	 * C = SSB ADDRESS +0: COMMAND
	 * 0 = SSB ADDRESS +2: STATUS 0
	 * 1 = SSB ADDRESS +4: STATUS 1
	 * 2 = SSB ADDRESS +6: STATUS 2
	 */ /* Check if this interrupt does use the SSB. */ /* SSB not involved. */ /* Note: All fields of the SSB have been set to all ones (-1) after it
	 * has last been used by the software (see DriverIsr()).
	 *
	 * Check if the affected SSB fields are still unchanged.
	 */ /* Command field not yet available. */ /* Status fields not always affected. */ /* Status 1 field not yet available. */ /* Status 2 & 3 fields not affected. */ /* Note: At this point, the interrupt is either TRANSMIT or RECEIVE. */ /* Status 2 field not yet available. */ /* Status 3 field not yet available. */ /* All SSB fields have been written by the adapter. */