亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ethernet.c

?? 三星官方基于VXWORKS的S3C2510的BSP
?? C
?? 第 1 頁 / 共 5 頁
字號:
	*(UINT32 *)SNDS_BDMASTAT = RxGood ;	
*/
    do
        {
		/*
		 * Check if Null list interrupt has occurred.  If yes, reset
		 * and restart the Ethernet MAC (as given in Samsung sample code.
		 */
		if (bdmaStat.stat_reg.bdmaRxNullList)
			{
			sndsEndStop(pDrvCtrl);	/* Stop RX and TX */
			sndsEndReset(pDrvCtrl);	/* reset the chip */
			sndsEndFdFree(pDrvCtrl);	/* Free the FDs */
			sndsEndFdInitialize(pDrvCtrl);	/* Reinitialize FDs */
			sndsEndMacInitialize(pDrvCtrl);	/* Initialize MAC */
			sndsEndStart(pDrvCtrl);	/* Start RX and TX */
			break;
			}
		/*
		 * Received a good frame
		 */
		frameLength = gpReceiveFrameDescStart->rxStatusLength.frameLength;

	    /*Update error statistics counters */
/*
		if(	  
			(gpReceiveFrameDescStart->rxStatusLength.ovMax)|
			(gpReceiveFrameDescStart->rxStatusLength.ctlRcv)|
			(gpReceiveFrameDescStart->rxStatusLength.rx10Stat)|
			(gpReceiveFrameDescStart->rxStatusLength.alignErr)|
			(gpReceiveFrameDescStart->rxStatusLength.crcErr)|
			(gpReceiveFrameDescStart->rxStatusLength.overFlow)|
			(gpReceiveFrameDescStart->rxStatusLength.longErr)|
			(gpReceiveFrameDescStart->rxStatusLength.rxPar)|
			(gpReceiveFrameDescStart->rxStatusLength.rxHalted))
			{
*/

	if ((*(UINT32 *) (&gpReceiveFrameDescStart->rxStatusLength)) & 0xbfff0000 )
			{
			pDrvCtrl->statistics.rxBad++;
	    	*(UINT32 *)SNDS_IOPDATA = 0xf3 ; 
			if (gpReceiveFrameDescStart->rxStatusLength.ovMax)
				pDrvCtrl->statistics.rxOvMaxSize++;
			if (gpReceiveFrameDescStart->rxStatusLength.ctlRcv)
				pDrvCtrl->statistics.rxCtlRecd++;
			if (gpReceiveFrameDescStart->rxStatusLength.rx10Stat)
				pDrvCtrl->statistics.rx10Stat++;
			if (gpReceiveFrameDescStart->rxStatusLength.alignErr)
				pDrvCtrl->statistics.rxAlignErr++;
			if (gpReceiveFrameDescStart->rxStatusLength.crcErr)
				pDrvCtrl->statistics.rxCRCErr++;
			if (gpReceiveFrameDescStart->rxStatusLength.overFlow)
				pDrvCtrl->statistics.rxOverflowErr++;
			if (gpReceiveFrameDescStart->rxStatusLength.longErr)
				pDrvCtrl->statistics.rxLongErr++;
			if (gpReceiveFrameDescStart->rxStatusLength.rxPar)
				pDrvCtrl->statistics.rxParErr++;
			if (gpReceiveFrameDescStart->rxStatusLength.rxHalted)
				pDrvCtrl->statistics.rxHalted++;
			}
		else if((gpReceiveFrameDescStart->rxStatusLength.good))
			{
			pDrvCtrl->statistics.rxGood++;
			pFrameData = (UINT16 *)(gpReceiveFrameDescStart->rxFrameData.frameDataPtr);
			sndsEndBugFix (pFrameData);
			sndsEndRecv (pDrvCtrl, (char *)pFrameData, frameLength);
			GoodCnt++ ;

	    	*(UINT32 *)SNDS_IOPDATA = 0x3f ; 
			/*printf("\n GoodCount %d, RxStatus %x \n", GoodCnt, *(UINT32 *)(&gpReceiveFrameDescStart->rxStatusLength) );*/
			/*printf("G");*/
			}
		else ;
		gpReceiveFrameDescStart->rxFrameData.o_bit = 1;	/* Ownership back to BDMA */
		gStatusLengthPrevious = *(UINT32 *)(&gpReceiveFrameDescStart->rxStatusLength);	/* For MAC bug fix */
		*(UINT32 *)(&gpReceiveFrameDescStart->rxStatusLength) = 0;	/* Rx status length field */

		gpReceiveFrameDescStart = gpReceiveFrameDescStart->nextRxFrameDesc;
		} while (gpReceiveFrameDescStart != pReceiveFrameDesc);

#if 0
/* cjw */
	    if(!((*(UINT32 *)SNDS_BDMARXCON) & BRxEn)){ 
			*(UINT32 *)SNDS_IOPDATA = 0xf0 ; 
        	printf("\n\n\n\n  BDMA Rx Stopped !!!!!! %x @@@@@@@@@@@@@@@\n\n\n\n\n", *(UINT32 *)SNDS_BDMARXCON);
		}
		
	    if(!((*(UINT32 *)SNDS_BDMASTAT) & BRxNO)) {
			*(UINT32 *)SNDS_IOPDATA = 0x00 ; 
	    	*(UINT32 *)SNDS_BDMASTAT = BRxNO; 
		}
	*(UINT32 *)SNDS_IOPDATA = 0x0f ; 
#endif
    }


/*******************************************************************************
*
* sndsEndRecv - process the next incoming packet
*
* Handle one incoming packet.  The packet is checked for errors.
*
* RETURNS: N/A.
*/

LOCAL STATUS sndsEndRecv
    (
    END_DEVICE *pDrvCtrl,	/* device structure */
    char* pData,			/* packet to process */
	UINT32 len
    )
    {
    M_BLK_ID 	pMblk;
    char*       pNewCluster;
    CL_BLK_ID	pClBlk;

	
    /* Add one to our unicast data. */
	END_ERR_ADD (&pDrvCtrl->end, MIB2_IN_UCAST, +1);

    /*
     * We implicitly are loaning here, if copying is necessary this
     * step may be skipped, but the data must be copied before being
     * passed up to the protocols.
     */
    
    pNewCluster = netClusterGet (pDrvCtrl->end.pNetPool, pDrvCtrl->end.pNetPool->clTbl[0]);

    if (pNewCluster == NULL)
        {
		END_ERR_ADD (&pDrvCtrl->end, MIB2_IN_ERRS, +1);
		goto cleanRXD;
        }

    /* Grab a cluster block to marry to the cluster we received. */

    if ((pClBlk = netClBlkGet (pDrvCtrl->end.pNetPool, M_DONTWAIT)) == NULL)
        {
        netClFree (pDrvCtrl->end.pNetPool, pNewCluster);
		END_ERR_ADD (&pDrvCtrl->end, MIB2_IN_ERRS, +1);
		goto cleanRXD;
        }

    
    /*
     * OK we've got a spare, let's get an M_BLK_ID and marry it to the
     * one in the ring.
     */

    if ((pMblk = mBlkGet (pDrvCtrl->end.pNetPool, M_DONTWAIT, MT_DATA)) == NULL)
        {
        netClBlkFree (pDrvCtrl->end.pNetPool, pClBlk); 
        netClFree (pDrvCtrl->end.pNetPool, pNewCluster);
		END_ERR_ADD (&pDrvCtrl->end, MIB2_IN_ERRS, +1);
		goto cleanRXD;
        }

    END_ERR_ADD (&pDrvCtrl->end, MIB2_IN_UCAST, +1);
	
	(UINT32)pData &= ~NON_CACHE_REGION;

    /* Join the cluster to the MBlock */
    netClBlkJoin (pClBlk, pData, SNDS_CL_SIZE, NULL, 0, 0, 0);
	
	
	netMblkClJoin (pMblk, pClBlk);

	pMblk->mBlkHdr.mData += SNDS_DATA_OFFSET;
	if (gBugFixDone == TRUE)
		pMblk->mBlkHdr.mData += 4;

    pMblk->mBlkHdr.mLen = len;
    pMblk->mBlkHdr.mFlags |= M_PKTHDR;
    pMblk->mBlkPktHdr.len = len;

    /* Call the upper layer's receive routine. */
    END_RCV_RTN_CALL(&pDrvCtrl->end, pMblk);
	/* gpReceiveFrameDescStart->rxFrameData.frameDataPtr = (UINT32) pNewCluster;  Mistral Solution re-add */

	gpReceiveFrameDescStart->rxFrameData.frameDataPtr = (UINT32) pNewCluster; 

	cleanRXD: /* old line 1 */

	/* gpReceiveFrameDescStart->rxFrameData.frameDataPtr = (UINT32) pNewCluster; */

/* Mistral Solution re-add */
	gpReceiveFrameDescStart->rxFrameData.frameDataPtr |= NON_CACHE_REGION;

    return (OK);
    }

/*******************************************************************************
*
* sndsEndSend - the driver send routine
*
* This routine takes a M_BLK_ID sends off the data in the M_BLK_ID.
* The buffer must already have the addressing information properly installed
* in it.  This is done by a higher layer.  The last arguments are a free
* routine to be called when the device is done with the buffer and a pointer
* to the argument to pass to the free routine.  
*
* RETURNS: OK or ERROR.
*/

LOCAL STATUS sndsEndSend
    (
    END_DEVICE *pDrvCtrl,	/* device ptr */
    M_BLK_ID pNBuff		/* data to send */
    )
    {
    int         len;
    int         oldLevel;
    BOOL        freeNow = TRUE;
	TRANSMIT_FRAME_DESC *pTxFd;
	BDMATXCON bdmaTxCon;
	MACTXCON macTxCon;

	*(UINT32 *)(&bdmaTxCon) = 0;
	*(UINT32 *)(&macTxCon) = 0;
    
	if (gpTransmitFrameDescStart->txFrameData.o_bit)	/* Ownership with BDMA? */
		return ERROR;
	pTxFd = gpTransmitFrameDescStart;
	len = pNBuff->mBlkPktHdr.len;
    /*
     * Obtain exclusive access to transmitter.  This is necessary because
     * we might have more than one stack transmitting at once.
     */
	END_TX_SEM_TAKE (&pDrvCtrl->end, WAIT_FOREVER);

    /* Set pointers in local structures to point to data. */
	netMblkToBufCopy(pNBuff, (void *)pTxFd->txFrameData.frameDataPtr, NULL) ;

	*(UINT32 *)(&pTxFd->txControl) = 0;	/* Reset control word */
	pTxFd->txControl.t_bit = 1;
	pTxFd->txControl.a_bit = 1;
	pTxFd->txControl.l_bit = 1;

	pTxFd->txStatusLength.frameLength = len;
	pTxFd->txFrameData.o_bit = 1;

    /* place a transmit request */

     oldLevel = intLock ();   /* now sndsEndInt won't get confused */

    /* initiate device transmit */
	bdmaTxCon.txCon_resetval = *(UINT32 *)SNDS_BDMATXCON;
	bdmaTxCon.txCon_reg.enable = 1;
	*(UINT32 *)SNDS_BDMATXCON = bdmaTxCon.txCon_resetval;

	macTxCon.macTxCon_resetval = *(UINT32 *)SNDS_MACTXCON;
	macTxCon.macTxCon_reg.transmitEnable = 1;
	*(UINT32 *)SNDS_MACTXCON = macTxCon.macTxCon_resetval;

    intUnlock (oldLevel);   /* now sndsEndInt won't get confused */
    
    /* Advance our management index */
	gpTransmitFrameDescStart = gpTransmitFrameDescStart->nextTxFrameDesc;

	END_TX_SEM_GIVE (&pDrvCtrl->end);
    
    /* Bump the statistic counter. */

    END_ERR_ADD (&pDrvCtrl->end, MIB2_OUT_UCAST, +1);

    /*
     * Cleanup.  The driver must either free the packet now or
     * set up a structure so it can be freed later after a transmit
     * interrupt occurs.
     */

    if (freeNow)
        netMblkClChainFree (pNBuff);

    return (OK);
    }

/*******************************************************************************
*
* sndsEndIoctl - the driver I/O control routine
*
* Process an ioctl request.
*
* RETURNS: A command specific response, usually OK or ERROR.
*/

LOCAL int sndsEndIoctl
    (
    END_DEVICE *pDrvCtrl,	/* device receiving command */
    int cmd,			/* ioctl command code */
    caddr_t data		/* command argument */
    )
    {
    int error = 0;
    long value;

    switch (cmd)
        {
        case EIOCSADDR:
	    if (data == NULL)
		return (EINVAL);
            bcopy ((char *)data, (char *)END_HADDR(&pDrvCtrl->end),
		   END_HADDR_LEN(&pDrvCtrl->end));
            break;

        case EIOCGADDR:
	    if (data == NULL)
		return (EINVAL);
            bcopy ((char *)END_HADDR(&pDrvCtrl->end), (char *)data,
		    END_HADDR_LEN(&pDrvCtrl->end));
            break;

        case EIOCSFLAGS:
	    value = (long)data;
	    if (value < 0)
		{
		value = ~value;
		END_FLAGS_CLR (&pDrvCtrl->end, value);
		}
	    else
		{
		END_FLAGS_SET (&pDrvCtrl->end, value);
		}
	    sndsEndConfig (pDrvCtrl);
            break;

        case EIOCGFLAGS:
	    *(int *)data = END_FLAGS_GET(&pDrvCtrl->end);
            break;

	case EIOCPOLLSTART:
	    sndsEndPollStart (pDrvCtrl);
	    break;

	case EIOCPOLLSTOP:
	    sndsEndPollStop (pDrvCtrl);
	    break;

    case EIOCGMIB2:
         if (data == NULL)
            return (EINVAL);
            bcopy((char *)&pDrvCtrl->end.mib2Tbl, (char *)data,
            sizeof(pDrvCtrl->end.mib2Tbl));
            break;
    
    case EIOCGFBUF:
         if (data == NULL)
             return (EINVAL);
            *(int *)data = 0;	/**END_MIN_FBUF;**/
            break;

    default:
            error = EINVAL;
        }

    return (error);
    }

/******************************************************************************
*
* sndsEndConfig - reconfigure the interface under us.
*
* Reconfigure the interface setting promiscuous mode
*
* RETURNS: N/A.
*/

LOCAL void sndsEndConfig
    (
    END_DEVICE *pDrvCtrl	/* device to be re-configured */
    )
    {
	sndsEndReset(pDrvCtrl);	/* reset the chip */

    /* Set up address filter for multicasting. */
	
    if (END_MULTI_LST_CNT(&pDrvCtrl->end) > 0)
		sndsEndAddrFilterSet (pDrvCtrl);

	if (pDrvCtrl->fdInitialized == TRUE)
		sndsEndFdFree(pDrvCtrl);	/* Free the FDs */
	sndsEndFdInitialize(pDrvCtrl);	/* Reinitialize FDs */
	sndsEndMacInitialize(pDrvCtrl);	/* Initialize MAC */

	/* Was started before in interrupt mode? */
	if ((END_FLAGS_GET(&pDrvCtrl->end) & IFF_RUNNING) && \
		((pDrvCtrl->flags & LS_POLLING) == 0))
			sndsEndStart(pDrvCtrl);	/* Start again */

    return;
    }

/*******************************************************************************
*
* sndsEndPollStart - start polled mode operations
*
* RETURNS: OK or ERROR.
*/

LOCAL STATUS sndsEndPollStart
    (
    END_DEVICE* pDrvCtrl	/* device to be polled */
    )
    {

    int         oldLevel;
	BDMARXCON bdmaRxCon;
	MACRXCON macRxCon;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av网站一区二区三区| 精品久久久久久久久久久久久久久| 国产91露脸合集magnet| 91成人国产精品| 久久久亚洲午夜电影| 日韩精品电影在线| 91在线观看一区二区| 日韩欧美不卡在线观看视频| 亚洲精品老司机| 大胆亚洲人体视频| 欧美成人video| 爽爽淫人综合网网站| 色狠狠色噜噜噜综合网| 日本一区二区在线不卡| 日本不卡一二三| 欧美午夜寂寞影院| 亚洲欧美日本韩国| 成人国产免费视频| 欧美哺乳videos| 视频一区视频二区中文字幕| 色狠狠桃花综合| 欧洲精品视频在线观看| 视频一区国产视频| 久久久三级国产网站| 99国产精品久久久久| 天天综合日日夜夜精品| 青娱乐精品在线视频| 色综合天天综合在线视频| 9色porny自拍视频一区二区| 欧美一区二区视频网站| 亚洲成人综合网站| 在线播放/欧美激情| 午夜日韩在线观看| 911精品国产一区二区在线| 亚洲最新在线观看| 欧美揉bbbbb揉bbbbb| 一区二区三区欧美在线观看| 一本色道久久综合亚洲91| 中文字幕一区二区三区视频| www.成人在线| 亚洲精品免费一二三区| 日本道精品一区二区三区| 一区二区三区视频在线观看| 欧美天堂亚洲电影院在线播放| 亚洲精品一二三| 欧洲另类一二三四区| 午夜精品久久久久久久久久久| 欧美日韩精品久久久| 奇米影视7777精品一区二区| 制服视频三区第一页精品| 蜜臀精品一区二区三区在线观看 | 久久久久国产精品厨房| 免费成人在线影院| 久久久噜噜噜久久人人看| 丰满亚洲少妇av| 亚洲精品国产精华液| 欧美日韩国产区一| 韩国成人在线视频| 国产精品伦一区二区三级视频| 99久久夜色精品国产网站| 夜夜亚洲天天久久| 日韩一区和二区| 成人av免费观看| 亚洲午夜精品久久久久久久久| 5858s免费视频成人| 国产精品一色哟哟哟| 一级中文字幕一区二区| 日韩一区二区电影| 成人av一区二区三区| 亚洲最大色网站| 精品欧美一区二区久久| 99久久久国产精品免费蜜臀| 日日摸夜夜添夜夜添亚洲女人| 久久久久久久综合色一本| 色婷婷狠狠综合| 精品午夜久久福利影院| 亚洲天堂成人网| 欧美一区二区二区| 色婷婷综合久久久久中文一区二区| 婷婷中文字幕一区三区| 国产片一区二区| 欧美久久久久久久久| www.在线欧美| 久久国产剧场电影| 一区二区三区四区不卡在线| 国产午夜亚洲精品理论片色戒| 欧美日韩精品一区二区| 成人黄色小视频| 老鸭窝一区二区久久精品| 亚洲精品视频在线观看网站| 久久女同性恋中文字幕| 欧美性xxxxxxxx| 99久久久国产精品免费蜜臀| 美国毛片一区二区| 亚洲不卡在线观看| 最新不卡av在线| 久久嫩草精品久久久久| 在线电影欧美成精品| 在线免费不卡视频| 成人福利视频网站| 国产精品一区二区在线观看不卡 | 色狠狠av一区二区三区| 国产乱人伦偷精品视频免下载| 视频在线观看91| 亚洲一区精品在线| 亚洲激情在线激情| 国产精品短视频| 国产精品萝li| 亚洲天堂久久久久久久| 欧美激情在线观看视频免费| 精品国产网站在线观看| 制服丝袜亚洲网站| 日韩欧美亚洲另类制服综合在线| 欧美在线制服丝袜| 欧洲国内综合视频| 日本韩国欧美一区| 91福利在线导航| 欧洲av一区二区嗯嗯嗯啊| 色8久久精品久久久久久蜜| 99国产精品久久久久久久久久久| 国产电影一区二区三区| 国产成人免费9x9x人网站视频| 国产真实乱对白精彩久久| 国产在线精品免费| 国产成人精品一区二| 粉嫩aⅴ一区二区三区四区五区 | www.欧美色图| 色婷婷国产精品| 欧美日韩在线综合| 日韩三区在线观看| 精品国产乱码久久久久久闺蜜| 久久香蕉国产线看观看99| 国产精品丝袜一区| 一区二区三区丝袜| 午夜精品久久久久影视| 久久精品国产精品青草| 国产原创一区二区三区| 成人午夜av影视| 一本久久精品一区二区| 欧美日韩一区二区三区在线看| 欧美一区二区三区精品| 亚洲精品一区二区三区精华液| 欧美国产日本韩| 亚洲欧美经典视频| 免费观看在线综合| 国产成人免费视频网站高清观看视频| 99久久精品免费看| 7777精品伊人久久久大香线蕉的| 精品国产乱码久久久久久牛牛 | 91精品国产综合久久福利| 精品免费视频一区二区| 国产精品福利一区| 青草国产精品久久久久久| 国产成+人+日韩+欧美+亚洲| 99久久久精品| 欧美大片在线观看一区二区| 国产精品久久久久久久久免费桃花| 亚洲激情图片一区| 极品美女销魂一区二区三区免费| 国产99久久久精品| 欧美日本一道本| 久久九九全国免费| 一区二区三区四区视频精品免费| 精品影视av免费| 欧美性三三影院| 久久久99精品久久| 日韩电影在线一区二区| 成人一二三区视频| 91精品国产欧美一区二区成人| 久久精品一区蜜桃臀影院| 欧美精品一区男女天堂| 国产精品久久国产精麻豆99网站| 蜜桃av一区二区三区| 色噜噜狠狠一区二区三区果冻| 日韩免费视频一区二区| 亚洲一区二区三区三| 国产99久久久精品| 亚洲精品在线观| 久久se精品一区精品二区| 欧美日韩高清在线| 亚洲女子a中天字幕| 成熟亚洲日本毛茸茸凸凹| 久久免费美女视频| 国产原创一区二区| 久久久精品蜜桃| 国产精品一区二区你懂的| 欧美一区二区成人| 中文字幕一区二区三区色视频| 美女精品一区二区| 精品乱人伦小说| 欧美日本免费一区二区三区| 亚洲风情在线资源站| 欧美精品777| 一区二区三区在线观看动漫| 国产又黄又大久久| 亚洲天天做日日做天天谢日日欢| youjizz久久| 成人综合婷婷国产精品久久 | 精品理论电影在线| 亚洲成在人线在线播放|