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

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

?? zl5011xpki.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/********************************************************************************
*
*  File name:              zl5011xPki.c
*
*  Version:                47
*
*  Author:                 PJE
*
*  Date created:           16/04/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This file contains all the functions that will initialise and control
*  the Packet Queue Module.
*  The Lan ports should only be referred to by number, and the number
*  that support 1Gbit can be a simple number. This means that the number of ports and
*  the speed they support can be easily changed.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     18/04/2002  PJE      Done easy bits - compile OK.
*  2     17/05/2002  PJE      tested most.
*  3     21/05/2002  PJE      tested rest.
*  4     31/05/2002  PJE      most review items done.
*  5     05/06/2002  PJE      review items done.
*  6     06/06/2002  PJE      PKI review items tested.
*  7     10/06/2002  PJE      bug - stepped outside status checking.
*  8     14/06/2002  PJE      bugs from partial review.
*  9     18/06/2002  PJE      bugs from partial review.
*  10    18/06/2002  PJE      reorganised intr masks.
*  11    24/06/2002  PJE      review items complete.
*  12    26/06/2002  PJE      bug - left Uint64T in Borland mode
*  13    08/07/2002  PJE      fiddle the port link down bit
*  14    11/07/2002  PJE      new fns PkiEnable(Disable)PcsInterrupt
*  15    16/08/2002  MRC      Added ifndef to delay to allow compiler command
*                             line override.
*  16    27/08/2002  MRC      minor review comments
*  17    28/08/2002  PJE      First clear the interrupts before enabling.
*  18    29/08/2002  PJE      removed bug introduced clearing the interrupts
*  20    27/09/2002  DJA      Function zl5011xAdd64bit renamed to zl5011xPkiAdd64bit
*                             Function zl5011xSubtract64bit renamed to zl5011xPkiSubtract64bit
*                             SOS version updated
*  21    02/10/2002  DJA      ZL5011X_TRACE messages fixed up
*  22    07/10/2002  PJE      new fns zl5011xPkiEnable/DisableWrapInterrupts,
*                              zl5011xPkiGetPcsStatus
*  23    11/10/2002  PJE      peer rev itms
*  24    11/10/2002  PJE      debug zl5011xPkiEnableWrapInterrupts
*  25    23/10/2002  PJE      zl5011xPkiSetPacketFiltering had bits in wrong order
*  26    25/10/2002  PJE      API tidy up
*  27    30/10/2002  MRC      Fixed compiler warning and changed to using the
*                             64 bit structure from compiler.h
*  28    31/10/2002  MRC      Added variants + minor fixes
*  29    03/04/2003  MRC      Modified the read counters function to disable
*                             interrupts around handling the upper words
*  30    07/04/2003  MRC      Changed polarity of wrap interrupt mask bits
*  31    06/05/2003  ARW      Fixed a bug in zl5011xPkiReadCounters
*  32    03/06/2003  PJE      SetMaxPacketLength define, PCS intr is self clearing and
*                             mask reg is ONE to mask off the intr.
*  33    06/06/2003  PJE      Bugfix added to zl5011xPkiEnablePcsInterrupt():
*                             ports 2 & 3 need ZL5011X_PKI_SPECIAL_PCS_MODE for PCS intr
*  34    30/06/2003  PJE      removed unwanted reference writeBits
*  35    29/07/2003  APL      Renamed global wanLimits structure to devLimits
*  36    11/08/2003  MRC      Reordered function calls in configure fn
*  37    08/09/2003  APL      Set both linkdown bit and reset bit to disable port
*                             in PkiEnablePort. Removed PkiReset function
*  38    23/07/2004  MRC      Fixed some compiler warnings
*  39    29/07/2004  MRC      Fixed some compiler warnings
*  40    06/09/2004  APL      Added port remapping for new device variants
*  41    08/09/2004  MRC      Added option to call library fn for 64 bit calcs
*  42    13/09/2004  APL      Renamed port mapping functions following review
*  43    22/09/2004  APL      Added ability to control Linkup LEDs for devices
*                                where this is not in the main control register
*  44    06/10/2004  APL      Improved robustness of port mapping functions
*  45    09/12/2004  MRC      Added extra device variants
*  46    31/01/2005  APL      Added Zl30301/2 device variants
*                             Enable support for long packets
*  47    03/02/2005  APL      Renamed device ID's to allow new family members
*
*******************************************************************************/

/*****************   INCLUDE FILES                *****************************/

#include "zl5011x.h"
#include "zl5011xPki.h"
#include "zl5011xPkiMap.h"
#include "zl5011xUtilLib.h"

/*****************   # DEFINES   **********************************************/

/* define types for 64 bit numbers. This is being done locally to this file
   and its usage should be minimised. */
#ifdef _ZL5011X_DISABLE_64_BIT_OPERATIONS
   #include "gmp.h"
   #include "gmp-impl.h"

   typedef mpz_t Uint64T;
#else
   typedef unsigned OS_INT64 Uint64T;
#endif

#define ZL5011X_PKI_FRAME_SIZE_BITS   0x7fff /* used in SetMaxPacketLength  */

#define ZL5011X_MAX_PHY_ADDRESS       31  /* The PHY ID field in the MDIO register
                                           is 5 bits in size */
#define ZL5011X_MAX_PHY_REGISTER      31  /* The REG ADR field in the MDIO register
                                           is 5 bits in size */
#define ZL5011X_MDIO_PHY_POLL_TIMEOUT 100 /* Polling loop timeout delay, 1 second
                                           (100 * 10 mS) */
#ifndef ZL5011X_WAIT_10MS
   #define ZL5011X_WAIT_10MS 10
#endif

#ifdef _DEBUG
   #ifdef static
      #undef static
   #endif

   #define static
#endif

/*****************   EXPORTED GLOBAL VARIABLES    *****************************/

/*****************   STATIC GLOBAL VARIABLES      *****************************/
/* Map of external port number to internal port number.*/
/* ZL5011X_INVALID indicates that the requested external port is not supported
   on this device */
static const Sint8T InternalPorts[ZL_MAX_NUM_DEVICE_TYPES][ZL5011X_MAX_NUM_LAN_PORTS] =
{
   { 0,             1, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50110 */
   { 0,             1,             2,             3 },   /* ZL_DEVICE_ZL50111 */
   { 0,             1, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50114 */
   { 1, ZL5011X_INVALID, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50115 */
   { 1, ZL5011X_INVALID, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50116 */
   { 1, ZL5011X_INVALID, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50117 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50118 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50119 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL50120 */
   { 0,             1,             2,             3 },   /* ZL_DEVICE_ZL50130 */
   { 0,             1,             2,             3 },   /* ZL_DEVICE_ZL80041 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL30300 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL30301 */
   { 1,             3, ZL5011X_INVALID, ZL5011X_INVALID },   /* ZL_DEVICE_ZL30302 */
};

/*****************   STATIC FUNCTION DECLARATIONS *****************************/
static zlStatusE zl5011xPkiSetPcsSignalDetectMask(zl5011xParamsS *zl5011xParams,
                                                 Uint8T   portNum,
                                                 zl5011xBooleanE enablePcsDet);

static zlStatusE zl5011xPkiAdd64bit( Uint64S *pUint64X,
                                    Uint64S *pUint64Y);

static zlStatusE zl5011xPkiSubtract64bit( Uint64S *pUint64Pos,
                                         Uint64S *pUint64Neg);

/*****************   EXPORTED FUNCTION DEFINTIONS   ***************************/

/*******************************************************************************
 Function:
    zl5011xPkiInit

 Description:
   Called at initialisation time.
   Sets the ports into low power mode.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance

 Outputs:

 Returns:
    zlStatusE

 Remarks:

*******************************************************************************/
extern zlStatusE zl5011xPkiInit(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   Uint8T portNum= 0;

   ZL5011X_TRACE(ZL5011X_PKI_FN_ID, "zl5011xPkiInit:", 0, 0, 0, 0, 0, 0);

   /* reset 64 bit stats to disabled  */
   zl5011xParams->pki.lanPort[ portNum].macStats64bits = ZL5011X_FALSE;

   /* disable the ports to put them in power saving mode */
   for( portNum= 0;( portNum< ZL5011X_MAX_NUM_LAN_PORTS)&&( status== ZL5011X_OK); portNum++)
   {
      status= zl5011xPkiEnablePort(zl5011xParams, portNum, ZL5011X_FALSE );
   }
   if( status == ZL5011X_OK)
   {
      /* pulse reset bit for all stats reset */
      status = zl5011xReadModWrite(zl5011xParams, ZL5011X_PKI0_CTRL,
                              (ZL5011X_1BIT_MASK << ZL5011X_PKI_CTRL_REG_STA_RESET),
                              (ZL5011X_1BIT_MASK << ZL5011X_PKI_CTRL_REG_STA_RESET));
   }
   if( status == ZL5011X_OK)
   {
      status = zl5011xReadModWrite(zl5011xParams, ZL5011X_PKI0_CTRL, 0,
                              (ZL5011X_1BIT_MASK << ZL5011X_PKI_CTRL_REG_STA_RESET));
   }

   /* Set Pcs  SignalDetectMask to inactive for all ports */
   for( portNum= 0;( portNum< ZL5011X_MAX_NUM_LAN_PORTS)&&( status== ZL5011X_OK); portNum++)
   {
      status= zl5011xPkiSetPcsSignalDetectMask(zl5011xParams, portNum, ZL5011X_FALSE );
   }
   return(status);
}


/*******************************************************************************
 Function:
    zl5011xPkiConfigure

 Description:
   Configure the Lan port mode etc.
   Resets all of the counters in the MAC and the s/w to 0.
   If 64 bit statistics are required, then the interrupts for wrap on the required
   counters is enabled and the interrupt mask set for this port.
   (the ISR is already initialised).

 Inputs:
    zl5011xParams            - Pointer to the structure for this device instance
    Uint8T  portNum         - port number 0 to 3
    Uint8T * macAddress,    - MAC address - 6 bytes
    Uint32T   pktLength     - max packet length
    zl5011xMacTypeE macType  - interface type - MII, GMII, PCS
    Uint32T pktFilterMask   - packet filtering mask - broadcast, multicast, non-matching
                              unicast
    zl5011xBooleanE vlanEnabled    - VLAN aware enable / disable
    zl5011xBooleanE macStats64bits - statistics mode - 32 or 64 bit

 Outputs:

 Returns:
    zlStatusE

 Remarks:

*******************************************************************************/
extern zlStatusE zl5011xPkiConfigure(zl5011xParamsS *zl5011xParams,
                                   Uint8T  portNum,
                                   Uint8T * macAddress,
                                   Uint32T   pktLength,
                                   zl5011xMacTypeE macType,
                                   zl5011xBooleanE filterBroadcast,
                                   zl5011xBooleanE filterMulticast,
                                   zl5011xBooleanE filterWrongUnicast,
                                   zl5011xBooleanE vlanEnabled,
                                   zl5011xBooleanE macStats64bits)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PKI_FN_ID, "zl5011xPkiConfigure: port number %d,"
                          " packet length %d, mac type %d, "
                          " vlan enabled %d, mac stats 64 bits %d",
         portNum, pktLength, macType, vlanEnabled, macStats64bits, 0);

   /* check enums are in range. */
   if( status==  ZL5011X_OK)
   {
      status= ZL5011X_CHECK_MAC_TYPE( macType);
   }
   if( status== ZL5011X_OK)
   {
      status= ZL5011X_CHECK_BOOLEAN( filterBroadcast);
   }
   if( status== ZL5011X_OK)
   {
      status= ZL5011X_CHECK_BOOLEAN( filterMulticast);
   }
   if( status== ZL5011X_OK)
   {
      status= ZL5011X_CHECK_BOOLEAN( filterWrongUnicast);
   }
   if( status==  ZL5011X_OK)
   {
      status= ZL5011X_CHECK_BOOLEAN( vlanEnabled);
   }
   if( status==  ZL5011X_OK)
   {
      status= ZL5011X_CHECK_BOOLEAN( macStats64bits);
   }
   if( status== ZL5011X_OK)
   {
      if( macAddress== NULL)
      {
         status= ZL5011X_PARAMETER_INVALID;
      }
   }

   /* set mac type - MII, GMII, PCS  */
   if( status== ZL5011X_OK)
   {
      status= zl5011xPkiSetInterfaceType(zl5011xParams, portNum, macType);
   }

   /* set statistics mode - 32 or 64 bit */
   if( status== ZL5011X_OK)
   {
      zl5011xParams->pki.lanPort[ portNum].macStats64bits= macStats64bits;
   }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成影院在线观看| 4438x亚洲最大成人网| 国产女人aaa级久久久级| 久久99久久精品| 精品成人免费观看| 国产·精品毛片| 亚洲精品视频在线观看免费 | 美女www一区二区| 日韩欧美国产高清| 国产美女娇喘av呻吟久久| 久久欧美中文字幕| 97久久超碰精品国产| 一区二区三区免费观看| 欧美日韩国产不卡| 蜜臀久久99精品久久久画质超高清 | 国产精品色一区二区三区| 99久久er热在这里只有精品66| 亚洲精品视频在线观看免费| 欧美日韩一区视频| 国产美女娇喘av呻吟久久| 最新久久zyz资源站| 欧美日韩黄色一区二区| 国产精品一二三四区| 国产精品久久午夜夜伦鲁鲁| 在线中文字幕不卡| 国产又黄又大久久| 亚洲精品中文在线| 精品国产青草久久久久福利| 国产69精品久久99不卡| 亚洲成a人片综合在线| 久久嫩草精品久久久精品| 97精品电影院| 精品中文av资源站在线观看| 亚洲乱码日产精品bd| 欧美成人在线直播| 一本大道久久a久久综合| 精品制服美女丁香| 亚洲va欧美va人人爽午夜| 精品国产3级a| 在线视频你懂得一区| 国产高清无密码一区二区三区| 一区二区三区四区激情| 国产日韩精品一区二区三区在线| 欧美在线综合视频| 不卡av在线网| 国精品**一区二区三区在线蜜桃| 一区二区三区美女视频| 国产精品无码永久免费888| 日韩一级二级三级精品视频| 一本色道久久综合亚洲精品按摩| 极品少妇一区二区| 偷窥国产亚洲免费视频 | 一区二区三区免费在线观看| 2023国产一二三区日本精品2022| 在线免费观看日本一区| 国产精品99久久久久久久女警| 日韩精品高清不卡| 亚洲五月六月丁香激情| 自拍偷自拍亚洲精品播放| 久久无码av三级| 日韩一区二区视频| 在线电影一区二区三区| 色综合久久久久综合体| www.日韩在线| 国产成人精品免费网站| 国产精品亚洲专一区二区三区| 视频一区在线播放| 亚洲高清在线精品| 一区二区三区欧美激情| 亚洲男同1069视频| 亚洲视频资源在线| 国产精品成人在线观看| 国产精品理论片| 国产精品久久久久aaaa樱花 | 日韩午夜在线影院| 91精品国产综合久久婷婷香蕉| 欧美自拍丝袜亚洲| 欧美日韩中文精品| 欧美三级一区二区| 欧美视频一区二| 5858s免费视频成人| 91精品国产综合久久精品app| 精品视频免费在线| 欧美群妇大交群中文字幕| 欧洲生活片亚洲生活在线观看| 91在线观看成人| 91色乱码一区二区三区| 色婷婷av一区| 欧美三级电影网站| 日韩亚洲欧美一区二区三区| 欧美人与禽zozo性伦| 日韩欧美国产小视频| 精品美女一区二区三区| 久久久久免费观看| 中文字幕不卡的av| 亚洲男女一区二区三区| 一区二区三区四区激情| 日本欧美加勒比视频| 精品亚洲欧美一区| 成人做爰69片免费看网站| 99国产精品99久久久久久| 色噜噜狠狠一区二区三区果冻| 欧美丝袜第三区| 91精品国产91综合久久蜜臀| 日韩精品中文字幕一区| 国产三级精品视频| 亚洲人成亚洲人成在线观看图片| 亚洲成人中文在线| 国内精品国产成人| 91在线观看成人| 91精品婷婷国产综合久久| 亚洲精品一区二区三区香蕉| 国产欧美综合在线观看第十页| 亚洲女与黑人做爰| 婷婷综合在线观看| 成人免费视频视频在线观看免费| 色www精品视频在线观看| 欧美一级日韩免费不卡| 欧美激情资源网| 亚洲高清视频在线| 国产激情视频一区二区在线观看 | 亚洲三级在线免费观看| 日本v片在线高清不卡在线观看| 精品一区二区三区在线观看| aaa亚洲精品| 精品日韩在线观看| 亚洲宅男天堂在线观看无病毒| 激情都市一区二区| 欧美性生活大片视频| 久久天天做天天爱综合色| 亚洲黄色录像片| 国产精品中文字幕日韩精品| 欧美亚洲免费在线一区| 亚洲国产精华液网站w| 婷婷六月综合亚洲| 色综合亚洲欧洲| 久久亚洲精精品中文字幕早川悠里 | 国产精品女主播在线观看| 日韩精品乱码免费| 欧美在线免费视屏| 中文字幕欧美激情一区| 日本成人在线不卡视频| 一本色道亚洲精品aⅴ| 国产视频一区二区三区在线观看| 日韩精品一级中文字幕精品视频免费观看 | 久久国产精品免费| 欧美日韩国产免费| 亚洲三级理论片| 国产精品2024| 日韩一卡二卡三卡| 亚洲成在人线在线播放| 9i看片成人免费高清| 久久日韩粉嫩一区二区三区| 日日嗨av一区二区三区四区| 色999日韩国产欧美一区二区| 国产精品午夜春色av| 国产精品夜夜嗨| 精品99一区二区三区| 免费成人在线网站| 91精品国产免费| 亚洲成人免费看| 欧美色偷偷大香| 亚洲成av人片在线| 欧洲亚洲精品在线| 亚洲一区二区成人在线观看| 一本久道中文字幕精品亚洲嫩| 国产精品乱人伦| 成人a免费在线看| 国产日产亚洲精品系列| 国产精品538一区二区在线| 久久九九国产精品| 国产宾馆实践打屁股91| 久久久91精品国产一区二区三区| 狠狠色狠狠色综合系列| 精品国产一区a| 国产成人精品午夜视频免费| 久久久美女艺术照精彩视频福利播放 | 久久免费看少妇高潮| 国产激情一区二区三区四区 | 蜜臀99久久精品久久久久久软件| 678五月天丁香亚洲综合网| 午夜国产精品影院在线观看| 69p69国产精品| 久久99久久久久| 国产人伦精品一区二区| 成人晚上爱看视频| 亚洲精品亚洲人成人网| 欧美三级一区二区| 久久国产精品色| 中文乱码免费一区二区| 91一区二区在线观看| 亚洲成人午夜电影| 日韩精品最新网址| 国产成人精品一区二| 亚洲欧美aⅴ...| 欧美一级二级在线观看| 国产精品99久| 亚洲欧美韩国综合色| 欧美美女一区二区在线观看| 久久se这里有精品|