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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? motfecend.c

?? motorola mpc系列 mpc852cpu bsp
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
		{
		pDrvCtrl->rbdNum = ((MOT_FEC_MEM_SZ (pDrvCtrl)
				    - MOT_FEC_TBD_MEM (pDrvCtrl))
				    / MOT_FEC_RBD_SZ);
		}
	    else
		{
		if (MOT_FEC_MEM_SZ (pDrvCtrl) < bdSize) 
		    {
		    MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("motFecInitMem: not enough 
						   memory\n"),
						   1, 2, 3, 4, 5, 6);
		    Drv_Print("motFecInitMem: not enough memory\r\n");
		    return (ERROR);
		    }
		}

	    if ((pDrvCtrl->tbdNum <= MOT_FEC_TBD_MIN) 
		|| (pDrvCtrl->rbdNum <= MOT_FEC_RBD_MIN))
		{
		MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("motFecInitMem: not enough 
					       memory\n"),
					       1, 2, 3, 4, 5, 6);
		Drv_Print("motFecInitMem: not enough memory\n\n");
		return (ERROR);
		}

	    MOT_FEC_FLAG_CLEAR (MOT_FEC_OWN_MEM);

	    pDrvCtrl->bdCacheFuncs = cacheNullFuncs;

	    break;
	}

    /* cache functions descriptor for data buffers */

    motFecBufCacheFuncs.flushRtn = motFecBufFlushRtn;
    motFecBufCacheFuncs.invalidateRtn = motFecBufInvRtn;
    motFecBufCacheFuncs.virtToPhysRtn = NULL;
    motFecBufCacheFuncs.physToVirtRtn = NULL;

    pDrvCtrl->bufCacheFuncs = motFecBufCacheFuncs;

    /* zero the shared memory */

    memset (pDrvCtrl->pBufBase, 0, (int) pDrvCtrl->bufSize);

    /* 
     * number of clusters, including loaning buffers, a min number
     * of transmit clusters for copy-mode transmit, and one transmit
     * cluster for polling operation.
     */

    clNum = pDrvCtrl->rbdNum + MOT_FEC_BD_LOAN_NUM
	    + 1 + MOT_FEC_TX_CL_NUM;

    clSize = (MOT_FEC_TX_MEM (pDrvCtrl) + MOT_FEC_RX_MEM (pDrvCtrl)
	    + (CL_OVERHEAD * clNum)
	    + MOT_FEC_BD_ALIGN);

    /* pool of mblks */

    if (mclBlkConfig.mBlkNum == 0)
	mclBlkConfig.mBlkNum = clNum * 2;

    /* pool of clusters, including loaning buffers */

    if (clDescTbl[0].clNum == 0)
	{
	clDescTbl[0].clNum = clNum;
	clDescTbl[0].clSize = MOT_FEC_MAX_CL_LEN;
	}

    /* there's a cluster overhead and an alignment issue */

    clDescTbl[0].memSize = (clDescTbl[0].clNum * 
			    (clDescTbl[0].clSize + CL_OVERHEAD));
    clDescTbl[0].memArea = (char *) (memalign (CL_ALIGNMENT, clSize));

    if (clDescTbl[0].memArea == NULL)
	{
	return (ERROR);
	}

    /* store the pointer to the clBlock area */

    pDrvCtrl->pClBlkArea = clDescTbl[0].memArea;
    pDrvCtrl->clBlkSize = clDescTbl[0].memSize;

    /* pool of cluster blocks */

    if (mclBlkConfig.clBlkNum == 0)
	mclBlkConfig.clBlkNum = clDescTbl[0].clNum;

    /* get memory for mblks */

    if (mclBlkConfig.memArea == NULL)
	{
	/* memory size adjusted to hold the netPool pointer at the head */

	mclBlkConfig.memSize = ((mclBlkConfig.mBlkNum
				* (M_BLK_SZ + MBLK_ALIGNMENT))
				+ (mclBlkConfig.clBlkNum
				* (CL_BLK_SZ + CL_ALIGNMENT)));

	mclBlkConfig.memArea = (char *) memalign (MBLK_ALIGNMENT, 
						  mclBlkConfig.memSize);

	if (mclBlkConfig.memArea == NULL)
	    {
	    return (ERROR);
	    }

	/* store the pointer to the mBlock area */

	pDrvCtrl->pMBlkArea = mclBlkConfig.memArea;
	pDrvCtrl->mBlkSize = mclBlkConfig.memSize;
	}

    /* init the mem pool */

    if (netPoolInit (pDrvCtrl->endObj.pNetPool, &mclBlkConfig, 
		     &clDescTbl[0], clDescTblNumEnt, NULL) 
	== ERROR)
	{
	return (ERROR);
	}

    if ((pDrvCtrl->pClPoolId = netClPoolIdGet (pDrvCtrl->endObj.pNetPool,
					       MOT_FEC_MAX_CL_LEN, FALSE)) 
        == NULL)
	{
	return (ERROR);
	}

    MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("motFecInitMem... Done\n"),
				    0, 0, 0, 0, 0, 0);
  
    Drv_Print("motFecInitMem... Done\r\n");
    
    return OK;
    }

/**************************************************************************
*
* motFecStart - start the device
*
* This routine starts the FEC device and brings it up to an operational
* state.  The driver must have already been loaded with the motFecEndLoad()
* routine.
*
* RETURNS: OK, or ERROR if the device could not be initialized.
*
* INTERNAL
* The speed field inthe phyInfo structure is only set after the call
* to the physical layer init routine. On the other hand, the mib2 
* interface is initialized in the motFecEndLoad() routine, and the default
* value of 10Mbit assumed there is not always correct. We need to
* correct it here.
*
*/

LOCAL STATUS motFecStart
    (
    DRV_CTRL *pDrvCtrl       /* pointer to DRV_CTRL structure */
    )
    {
    int		retVal;		/* convenient holder for return value */
    char        bucket[4];

    MOT_FEC_LOG (MOT_FEC_DBG_START, ("Starting end...\n"), 1, 2, 3, 4, 5, 6);
   
     /*Drv_Print("starting end...\n");*/
   
    /* must have been loaded */

    if (!pDrvCtrl->loaded)
	return (ERROR);

    
    if (vxMemProbe ((char *) (pDrvCtrl->motCpmAddr + MOT_FEC_CSR_OFF),
		    VX_READ, 4, &bucket[0]) != OK)
        {
        MOT_FEC_LOG (MOT_FEC_DBG_START,
                   (": need MMU mapping for address 0x%x\n"),
                   (UINT32) pDrvCtrl->motCpmAddr, 2, 3, 4, 5, 6);
        Drv_Print (" need MMU mapping for address 0x%x\n",
                   (UINT32) pDrvCtrl->motCpmAddr);
        
	return (ERROR);
        }

    /* reset the chip */
    MOT_FEC_ETH_SET;
    if (motFecReset (pDrvCtrl) != OK)
	return (ERROR);

    if (motFecTbdInit (pDrvCtrl) == ERROR)
	return (ERROR);

    if (motFecRbdInit (pDrvCtrl) == ERROR)
	return (ERROR);

    /* set some flags to default values */

    pDrvCtrl->txStall = FALSE;
    pDrvCtrl->tbdIndex = 0;
    pDrvCtrl->usedTbdIndex = 0;
    pDrvCtrl->cleanTbdNum = pDrvCtrl->tbdNum;
    pDrvCtrl->rbdIndex = 0;

    /* connect the interrupt handler */
    
    SYS_FEC_INT_CONNECT (pDrvCtrl, motFecInt, (int) pDrvCtrl, retVal);
    if (retVal == ERROR)
	return (ERROR);

    /* enable system interrupt: set relevant bit in SIMASK */
    
    SYS_FEC_INT_ENABLE (pDrvCtrl, retVal);
    if (retVal == ERROR)
	return (ERROR);
	
    /* call the BSP to do any other initialization (port D) */

    SYS_FEC_ENET_ENABLE;

    /* configure some chip's registers */
    
    if (motFecPrePhyConfig (pDrvCtrl) == ERROR)
	return (ERROR);

    /* initialize some fields in the PHY info structure */
    
    if (motFecPhyPreInit (pDrvCtrl) != OK)
	{
	MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("Failed to pre-initialize the PHY\n"),
					0, 0, 0, 0, 0, 0);
	return (ERROR);
	}

    /* initialize the Physical medium layer */
   
    if (_func_motFecPhyInit == NULL)
	return (ERROR);

    if (((* _func_motFecPhyInit) (pDrvCtrl)) != OK)
	{
	MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("Failed to initialize the PHY\n"),
					0, 0, 0, 0, 0, 0);
	return (ERROR);
	}

    /* configure other chip's registers */
    
    if (motFecPostPhyConfig (pDrvCtrl) == ERROR)
	return (ERROR);

    /* correct the speed for the mib2 stuff */

    pDrvCtrl->endObj.mib2Tbl.ifSpeed = pDrvCtrl->phyInfo->phySpeed;

    if (END_FLAGS_ISSET (IFF_MULTICAST))
        MOT_FEC_FLAG_SET (MOT_FEC_MCAST);
 
    /* enable the Ethernet Controller */

    MOT_FEC_ETH_ENABLE;

    /* mark the interface as up */

    END_FLAGS_SET (&pDrvCtrl->endObj, (IFF_UP | IFF_RUNNING));

    /* startup the receiver */

    MOT_FEC_RX_ACTIVATE;

    /* Flush the write pipe */

    CACHE_PIPE_FLUSH ();

    MOT_FEC_LOG (MOT_FEC_DBG_START, ("Starting end... Done\n"), 
				     1, 2, 3, 4, 5, 6);
    
    /*Drv_Print("Starting end... Done\n");*/
    
    return (OK);
    }

/**************************************************************************
*
* motFecStop - stop the 'motfec' interface
*
* This routine marks the interface as inactive, disables interrupts and 
* the Ethernet Controller. As a result, reception is stopped immediately,
* and transmission is stopped after a bad CRC is appended to any frame
* currently being transmitted. The reception/transmission control logic
* (FIFO pointers, buffer descriptors, etc.) is reset. To bring the 
* interface back up, motFecStart() must be called.
*
* RETURNS: OK, always.
*/

LOCAL STATUS motFecStop
    (
    DRV_CTRL *  pDrvCtrl       /* pointer to DRV_CTRL structure */
    )
    {
    int		retVal;		/* convenient holder for return value */

    MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("motFecStop...\n"), 1, 2, 3, 4, 5, 6);
    Drv_Print("stop done\r\n");
   
    /* make sure driver is operational before stopping it */

    if (END_FLAGS_GET(&pDrvCtrl->endObj) & (IFF_UP | IFF_RUNNING))
        {

        /* mark the interface as down */

        END_FLAGS_CLR (&pDrvCtrl->endObj, (IFF_UP | IFF_RUNNING));

        /* issue a graceful transmit command */

        MOT_FEC_CSR_WR (MOT_FEC_TX_CTRL_OFF, MOT_FEC_TX_CTRL_GRA);

        /* wait for the related interrupt */

        MOT_FEC_GRA_SEM_TAKE;

        /* mask chip interrupts */

        MOT_FEC_INT_DISABLE;	  

        /* disable the Ethernet Controller */

        MOT_FEC_ETH_DISABLE;

        /* disable system interrupt: reset relevant bit in SIMASK */

        SYS_FEC_INT_DISABLE (pDrvCtrl, retVal);
        if (retVal == ERROR)
	    return (ERROR);

        /* disconnect the interrupt handler */

        SYS_FEC_INT_DISCONNECT (pDrvCtrl, motFecInt, (int)pDrvCtrl, retVal);
        if (retVal == ERROR)
	    return (ERROR);

        /* call the BSP to disable the Port D */

        SYS_FEC_ENET_DISABLE;

        if (motFecBdFree (pDrvCtrl) != OK)
	    return (ERROR);

        }

    MOT_FEC_LOG (MOT_FEC_DBG_LOAD, ("motFecStop... Done \n"), 
				    1, 2, 3, 4, 5, 6);

    
    

    return OK;
    } 

/**************************************************************************
*
* motFecReset - reset the `motFec' interface
*
* This routine resets the chip by setting the Reset bit in the Ethernet
* Control Register. The ETHER_EN bit i

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品在线观看一区二区| 极品少妇xxxx精品少妇| 成人国产在线观看| 国产清纯白嫩初高生在线观看91 | 国产精品人成在线观看免费| 国产伦理精品不卡| 欧美国产成人在线| 91亚洲永久精品| 午夜精品久久久久久久蜜桃app| 欧美在线看片a免费观看| 日韩中文字幕1| 久久久久久久久99精品| 大美女一区二区三区| 亚洲精品国产一区二区精华液 | 久草在线在线精品观看| 久久久久久久久久久黄色| 国产大片一区二区| 亚洲精品视频在线观看网站| 欧美色国产精品| 极品美女销魂一区二区三区免费 | 成人一区在线观看| 亚洲免费观看在线视频| 欧美精品自拍偷拍动漫精品| 精品一区二区三区久久| 亚洲综合丝袜美腿| 日韩视频123| 粉嫩一区二区三区性色av| 一区二区三区在线视频观看58| 欧美精品 国产精品| 国产成人啪免费观看软件| 一区二区三区精品视频| 久久一夜天堂av一区二区三区| 色综合天天视频在线观看| 免费在线看成人av| 亚洲三级免费观看| 日韩免费电影一区| 色婷婷精品久久二区二区蜜臀av| 美女www一区二区| 日韩伦理免费电影| 久久你懂得1024| 欧美主播一区二区三区美女| 国产一级精品在线| 日韩主播视频在线| 亚洲精品国产高清久久伦理二区 | 久久影视一区二区| 欧美精品丝袜久久久中文字幕| 成人午夜在线播放| 美国一区二区三区在线播放| 一区二区三区四区乱视频| 国产亚洲一本大道中文在线| 制服丝袜一区二区三区| 色综合久久中文字幕| 国产剧情一区二区| 另类成人小视频在线| 午夜精品久久久久久| 亚洲免费在线观看| 国产精品不卡一区二区三区| 26uuu国产一区二区三区| 欧美一区二区三区在线| 欧美唯美清纯偷拍| 色婷婷综合在线| av中文一区二区三区| 高清beeg欧美| 国产成人超碰人人澡人人澡| 久草这里只有精品视频| 久久精品国产**网站演员| 午夜影院久久久| 午夜国产精品一区| 午夜视频久久久久久| 一区二区三区产品免费精品久久75| 亚洲国产岛国毛片在线| 国产三级久久久| 国产亚洲一区二区三区| 久久久久国产免费免费| 久久久久国产精品厨房| 国产无一区二区| 国产亚洲午夜高清国产拍精品| 2024国产精品| 欧美激情艳妇裸体舞| 国产精品久久久久久亚洲伦| 国产精品久久久久婷婷二区次| 中国av一区二区三区| 国产精品久久久一本精品 | 国产精品久久久久久久久免费桃花 | 国产视频一区二区在线| 国产调教视频一区| 国产精品久久久久一区二区三区 | 91精彩视频在线| 欧美性高清videossexo| 欧美精品xxxxbbbb| 国产精品网站一区| 亚洲九九爱视频| 亚洲妇熟xx妇色黄| 日韩精品亚洲一区二区三区免费| 免费在线看成人av| 国产一区视频在线看| av在线不卡网| 欧美影片第一页| 91精品婷婷国产综合久久竹菊| 日韩三级电影网址| 欧美国产一区二区| 亚洲一区中文在线| 麻豆精品国产传媒mv男同| 国产一区二区在线视频| 99麻豆久久久国产精品免费优播| 91成人看片片| 精品久久久久久无| 国产精品久久免费看| 丝袜美腿亚洲综合| 国产一二精品视频| 欧美三级资源在线| 久久久精品欧美丰满| 一级做a爱片久久| 久久91精品久久久久久秒播| 94-欧美-setu| 欧美v亚洲v综合ⅴ国产v| 18涩涩午夜精品.www| 青草国产精品久久久久久| gogo大胆日本视频一区| 91精品国产欧美一区二区| 国产精品无人区| 男女男精品网站| 99久久伊人精品| 欧美一级视频精品观看| 亚洲欧洲色图综合| 精品亚洲成a人| 欧美午夜寂寞影院| 国产精品久久久久久久久免费丝袜| 午夜伦理一区二区| 成人av在线网| 日韩精品一区在线| 一区二区三区成人| 国产激情精品久久久第一区二区| 欧美日韩亚洲国产综合| 国产欧美日韩综合| 美女mm1313爽爽久久久蜜臀| 色av一区二区| 国产精品美女久久久久久久| 免费成人av在线播放| 一本色道久久综合亚洲精品按摩| 久久综合网色—综合色88| 极品少妇xxxx偷拍精品少妇| 欧美精品久久久久久久久老牛影院 | 午夜精品久久久久久久久久久| 成人综合日日夜夜| 337p粉嫩大胆色噜噜噜噜亚洲| 婷婷综合五月天| 欧美综合一区二区| 1024精品合集| 成人精品国产福利| 久久久三级国产网站| 久久 天天综合| 欧美一区二区国产| 日韩专区中文字幕一区二区| 色爱区综合激月婷婷| 中文字幕一区二区三区视频| 国产成人av影院| www精品美女久久久tv| 极品美女销魂一区二区三区免费 | 免费在线看一区| 69久久99精品久久久久婷婷| 亚洲va国产天堂va久久en| 欧美亚洲一区三区| 夜夜精品浪潮av一区二区三区| 色综合视频在线观看| 亚洲日本va在线观看| 97se狠狠狠综合亚洲狠狠| 亚洲欧美综合另类在线卡通| 不卡一二三区首页| 国产精品三级电影| 99精品一区二区三区| 亚洲视频电影在线| 欧美影视一区二区三区| 亚洲成a人片综合在线| 欧美精品18+| 激情欧美一区二区三区在线观看| 欧美电影免费观看高清完整版在 | 亚洲成人免费观看| 宅男噜噜噜66一区二区66| 日韩av一区二区三区| 精品国产乱码久久| 成人激情视频网站| 一区二区三区在线高清| 欧美人与性动xxxx| 日本亚洲天堂网| 久久精品一区八戒影视| 成人免费毛片嘿嘿连载视频| 亚洲天天做日日做天天谢日日欢| 一本一道波多野结衣一区二区| 亚洲国产成人tv| 精品噜噜噜噜久久久久久久久试看| 国产一区二区在线看| 亚洲国产精品v| 欧美三级在线看| 国内外精品视频| 1024亚洲合集| 日韩一区二区在线观看| 国产91精品精华液一区二区三区 | 91精品国产全国免费观看| 国产精品一区久久久久|