len += sprintf(buf + len, "%s", ixj_c_rcsid); len += sprintf(buf + len, "\n%s", ixj_h_rcsid); len += sprintf(buf + len, "\n%s", ixjuser_h_rcsid); 
static int ixj_get_status_proc(char *buf){	int len;	int cnt;	IXJ *j;	len = 0;	len += sprintf(buf + len, "%s", ixj_c_rcsid);	len += sprintf(buf + len, "\n%s", ixj_h_rcsid);	len += sprintf(buf + len, "\n%s", ixjuser_h_rcsid);	len += sprintf(buf + len, "\nDriver version %i.%i.%i", IXJ_VER_MAJOR, IXJ_VER_MINOR, IXJ_BLD_VER);	len += sprintf(buf + len, "\nsizeof IXJ struct %Zd bytes", sizeof(IXJ));	len += sprintf(buf + len, "\nsizeof DAA struct %Zd bytes", sizeof(DAA_REGS));	len += sprintf(buf + len, "\nUsing old telephony API");	len += sprintf(buf + len, "\nDebug Level %d\n", ixjdebug);	for (cnt = 0; cnt < IXJMAX; cnt++) {		j = get_ixj(cnt);		if(j==NULL)			continue;		if (j->DSPbase) {			len += sprintf(buf + len, "\nCard Num %d", cnt);			len += sprintf(buf + len, "\nDSP Base Address 0x%4.4x", j->DSPbase);			if (j->cardtype != QTI_PHONEJACK)				len += sprintf(buf + len, "\nXILINX Base Address 0x%4.4x", j->XILINXbase);			len += sprintf(buf + len, "\nDSP Type %2.2x%2.2x", j->dsp.high, j->dsp.low);			len += sprintf(buf + len, "\nDSP Version %2.2x.%2.2x", j->ver.high, j->ver.low);			len += sprintf(buf + len, "\nSerial Number %8.8x", j->serial);			switch (j->cardtype) {			case (QTI_PHONEJACK):				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK");				break;			case (QTI_LINEJACK):				len += sprintf(buf + len, "\nCard Type = Internet LineJACK");				if (j->flags.g729_loaded)					len += sprintf(buf + len, " w/G.729 A/B");				len += sprintf(buf + len, " Country = %d", j->daa_country);				break;			case (QTI_PHONEJACK_LITE):				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK Lite");				if (j->flags.g729_loaded)					len += sprintf(buf + len, " w/G.729 A/B");				break;			case (QTI_PHONEJACK_PCI):				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK PCI");				if (j->flags.g729_loaded)					len += sprintf(buf + len, " w/G.729 A/B");				break;			case (QTI_PHONECARD):				len += sprintf(buf + len, "\nCard Type = Internet PhoneCARD");				if (j->flags.g729_loaded)					len += sprintf(buf + len, " w/G.729 A/B");				len += sprintf(buf + len, "\nSmart Cable %spresent", j->pccr1.bits.drf ? "not " : "");				if (!j->pccr1.bits.drf)					len += sprintf(buf + len, "\nSmart Cable type %d", j->flags.pcmciasct);				len += sprintf(buf + len, "\nSmart Cable state %d", j->flags.pcmciastate);				break;			default:				len += sprintf(buf + len, "\nCard Type = %d", j->cardtype);				break;			}			len += sprintf(buf + len, "\nReaders %d", j->readers);			len += sprintf(buf + len, "\nWriters %d", j->writers);			add_caps(j);			len += sprintf(buf + len, "\nCapabilities %d", j->caps);			if (j->dsp.low != 0x20)				len += sprintf(buf + len, "\nDSP Processor load %d", j->proc_load);			if (j->flags.cidsent)				len += sprintf(buf + len, "\nCaller ID data sent");			else				len += sprintf(buf + len, "\nCaller ID data not sent");			len += sprintf(buf + len, "\nPlay CODEC ");			switch (j->play_codec) {			case G723_63:				len += sprintf(buf + len, "G.723.1 6.3");				break;			case G723_53:				len += sprintf(buf + len, "G.723.1 5.3");				break;			case TS85:				len += sprintf(buf + len, "TrueSpeech 8.5");				break;			case TS48:				len += sprintf(buf + len, "TrueSpeech 4.8");				break;			case TS41:				len += sprintf(buf + len, "TrueSpeech 4.1");				break;			case G728:				len += sprintf(buf + len, "G.728");				break;			case G729:				len += sprintf(buf + len, "G.729");				break;			case G729B:				len += sprintf(buf + len, "G.729B");				break;			case ULAW:				len += sprintf(buf + len, "uLaw");				break;			case ALAW:				len += sprintf(buf + len, "aLaw");				break;			case LINEAR16:				len += sprintf(buf + len, "16 bit Linear");				break;			case LINEAR8:				len += sprintf(buf + len, "8 bit Linear");				break;			case WSS:				len += sprintf(buf + len, "Windows Sound System");				break;			default:				len += sprintf(buf + len, "NO CODEC CHOSEN");				break;			}			len += sprintf(buf + len, "\nRecord CODEC ");			switch (j->rec_codec) {			case G723_63:				len += sprintf(buf + len, "G.723.1 6.3");				break;			case G723_53:				len += sprintf(buf + len, "G.723.1 5.3");				break;			case TS85:				len += sprintf(buf + len, "TrueSpeech 8.5");				break;			case TS48:				len += sprintf(buf + len, "TrueSpeech 4.8");				break;			case TS41:				len += sprintf(buf + len, "TrueSpeech 4.1");				break;			case G728:				len += sprintf(buf + len, "G.728");				break;			case G729:				len += sprintf(buf + len, "G.729");				break;			case G729B:				len += sprintf(buf + len, "G.729B");				break;			case ULAW:				len += sprintf(buf + len, "uLaw");				break;			case ALAW:				len += sprintf(buf + len, "aLaw");				break;			case LINEAR16:				len += sprintf(buf + len, "16 bit Linear");				break;			case LINEAR8:				len += sprintf(buf + len, "8 bit Linear");				break;			case WSS:				len += sprintf(buf + len, "Windows Sound System");				break;			default:				len += sprintf(buf + len, "NO CODEC CHOSEN");				break;			}			len += sprintf(buf + len, "\nAEC ");			switch (j->aec_level) {			case AEC_OFF:				len += sprintf(buf + len, "Off");				break;			case AEC_LOW:				len += sprintf(buf + len, "Low");				break;			case AEC_MED:				len += sprintf(buf + len, "Med");				break;			case AEC_HIGH:				len += sprintf(buf + len, "High");				break;			case AEC_AUTO:				len += sprintf(buf + len, "Auto");				break;			case AEC_AGC:				len += sprintf(buf + len, "AEC/AGC");				break;			default:				len += sprintf(buf + len, "unknown(%i)", j->aec_level);				break;			}			len += sprintf(buf + len, "\nRec volume 0x%x", get_rec_volume(j));			len += sprintf(buf + len, "\nPlay volume 0x%x", get_play_volume(j));			len += sprintf(buf + len, "\nDTMF prescale 0x%x", get_dtmf_prescale(j));						len += sprintf(buf + len, "\nHook state %d", j->hookstate); /* j->r_hook);	*/			if (j->cardtype == QTI_LINEJACK) {				len += sprintf(buf + len, "\nPOTS Correct %d", j->flags.pots_correct);				len += sprintf(buf + len, "\nPSTN Present %d", j->flags.pstn_present);				len += sprintf(buf + len, "\nPSTN Check %d", j->flags.pstncheck);				len += sprintf(buf + len, "\nPOTS to PSTN %d", j->flags.pots_pstn);				switch (j->daa_mode) {				case SOP_PU_SLEEP:					len += sprintf(buf + len, "\nDAA PSTN On Hook");					break;				case SOP_PU_RINGING:					len += sprintf(buf + len, "\nDAA PSTN Ringing");					len += sprintf(buf + len, "\nRinging state = %d", j->cadence_f[4].state);					break;				case SOP_PU_CONVERSATION:					len += sprintf(buf + len, "\nDAA PSTN Off Hook");					break;				case SOP_PU_PULSEDIALING:					len += sprintf(buf + len, "\nDAA PSTN Pulse Dialing");					break;				}				len += sprintf(buf + len, "\nDAA RMR = %d", j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.bitreg.RMR);				len += sprintf(buf + len, "\nDAA VDD OK = %d", j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK);				len += sprintf(buf + len, "\nDAA CR0 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg);				len += sprintf(buf + len, "\nDAA CR1 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg);				len += sprintf(buf + len, "\nDAA CR2 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg);				len += sprintf(buf + len, "\nDAA CR3 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg);				len += sprintf(buf + len, "\nDAA CR4 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg);				len += sprintf(buf + len, "\nDAA CR5 = 0x%02x", j->m_DAAShadowRegs.SOP_REGS.SOP.cr5.reg);				len += sprintf(buf + len, "\nDAA XR0 = 0x%02x", j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.reg);				len += sprintf(buf + len, "\nDAA ringstop %ld - jiffies %ld", j->pstn_ring_stop, jiffies);			}			switch (j->port) {			case PORT_POTS:				len += sprintf(buf + len, "\nPort POTS");				break;			case PORT_PSTN:				len += sprintf(buf + len, "\nPort PSTN");				break;			case PORT_SPEAKER:				len += sprintf(buf + len, "\nPort SPEAKER/MIC");				break;			case PORT_HANDSET:				len += sprintf(buf + len, "\nPort HANDSET");				break;			}			if (j->dsp.low == 0x21 || j->dsp.low == 0x22) {				len += sprintf(buf + len, "\nSLIC state ");				switch (SLIC_GetState(j)) {				case PLD_SLIC_STATE_OC:					len += sprintf(buf + len, "OC");					break;				case PLD_SLIC_STATE_RINGING:					len += sprintf(buf + len, "RINGING");					break;				case PLD_SLIC_STATE_ACTIVE:					len += sprintf(buf + len, "ACTIVE");					break;				case PLD_SLIC_STATE_OHT:	/* On-hook transmit */					len += sprintf(buf + len, "OHT");					break;				case PLD_SLIC_STATE_TIPOPEN:					len += sprintf(buf + len, "TIPOPEN");					break;				case PLD_SLIC_STATE_STANDBY:					len += sprintf(buf + len, "STANDBY");					break;				case PLD_SLIC_STATE_APR:	/* Active polarity reversal */					len += sprintf(buf + len, "APR");					break;				case PLD_SLIC_STATE_OHTPR:	/* OHT polarity reversal */					len += sprintf(buf + len, "OHTPR");					break;				default:					len += sprintf(buf + len, "%d", SLIC_GetState(j));					break;				}			}			len += sprintf(buf + len, "\nBase Frame %2.2x.%2.2x", j->baseframe.high, j->baseframe.low);			len += sprintf(buf + len, "\nCID Base Frame %2d", j->cid_base_frame_size);#ifdef PERFMON_STATS			len += sprintf(buf + len, "\nTimer Checks %ld", j->timerchecks);			len += sprintf(buf + len, "\nRX Ready Checks %ld", j->rxreadycheck);			len += sprintf(buf + len, "\nTX Ready Checks %ld", j->txreadycheck);			len += sprintf(buf + len, "\nFrames Read %ld", j->framesread);			len += sprintf(buf + len, "\nFrames Written %ld", j->frameswritten);			len += sprintf(buf + len, "\nDry Buffer %ld", j->drybuffer);			len += sprintf(buf + len, "\nRead Waits %ld", j->read_wait);			len += sprintf(buf + len, "\nWrite Waits %ld", j->write_wait);                        len += sprintf(buf + len, "\nStatus Waits %ld", j->statuswait);                        len += sprintf(buf + len, "\nStatus Wait Fails %ld", j->statuswaitfail);                        len += sprintf(buf + len, "\nPControl Waits %ld", j->pcontrolwait);                        len += sprintf(buf + len, "\nPControl Wait Fails %ld", j->pcontrolwaitfail);                        len += sprintf(buf + len, "\nIs Control Ready Checks %ld", j->iscontrolready);                        len += sprintf(buf + len, "\nIs Control Ready Check failures %ld", j->iscontrolreadyfail); #endif			len += sprintf(buf + len, "\n");		}	}	return len;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fba478b1719c39ea67f15c6158ff4993933e9d18/ixj.c/buggy/drivers/telephony/ixj.c