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

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

?? xemac_intr.c

?? gumstiz u-boot loader in linux
?? C
字號:
/********************************************************************************     Author: Xilinx, Inc.***     This program is free software; you can redistribute it and/or modify it*     under the terms of the GNU General Public License as published by the*     Free Software Foundation; either version 2 of the License, or (at your*     option) any later version.***     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.*     XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO*     THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY*     WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM*     CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND*     FITNESS FOR A PARTICULAR PURPOSE.***     Xilinx hardware products are not intended for use in life support*     appliances, devices, or systems. Use in such applications is*     expressly prohibited.***     (c) Copyright 2002-2004 Xilinx Inc.*     All rights reserved.***     You should have received a copy of the GNU General Public License along*     with this program; if not, write to the Free Software Foundation, Inc.,*     675 Mass Ave, Cambridge, MA 02139, USA.*******************************************************************************//*****************************************************************************//**** @file xemac_intr.c** This file contains general interrupt-related functions of the XEmac driver.** <pre>* MODIFICATION HISTORY:** Ver   Who  Date     Changes* ----- ---- -------- -----------------------------------------------* 1.00a rpm  07/31/01 First release* 1.00b rpm  02/20/02 Repartitioned files and functions* 1.00c rpm  12/05/02 New version includes support for simple DMA* 1.00c rpm  03/31/03 Added comment to indicate that no Receive Length FIFO*                     overrun interrupts occur in v1.00l and later of the EMAC*                     device. This avoids the need to reset the device on*                     receive overruns.* </pre>*******************************************************************************//***************************** Include Files *********************************/#include "xbasic_types.h"#include "xemac_i.h"#include "xio.h"#include "xipif_v1_23_b.h"	/* Uses v1.23b of the IPIF *//************************** Constant Definitions *****************************//**************************** Type Definitions *******************************//***************** Macros (Inline Functions) Definitions *********************//************************** Variable Definitions *****************************//************************** Function Prototypes ******************************//*****************************************************************************//**** Set the callback function for handling asynchronous errors.  The upper layer* software should call this function during initialization.** The error callback is invoked by the driver within interrupt context, so it* needs to do its job quickly. If there are potentially slow operations within* the callback, these should be done at task-level.** The Xilinx errors that must be handled by the callback are:* - XST_DMA_ERROR indicates an unrecoverable DMA error occurred. This is*   typically a bus error or bus timeout. The handler must reset and*   re-configure the device.* - XST_FIFO_ERROR indicates an unrecoverable FIFO error occurred. This is a*   deadlock condition in the packet FIFO. The handler must reset and*   re-configure the device.* - XST_RESET_ERROR indicates an unrecoverable MAC error occurred, usually an*   overrun or underrun. The handler must reset and re-configure the device.* - XST_DMA_SG_NO_LIST indicates an attempt was made to access a scatter-gather*   DMA list that has not yet been created.* - XST_DMA_SG_LIST_EMPTY indicates the driver tried to get a descriptor from*   the receive descriptor list, but the list was empty.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param CallBackRef is a reference pointer to be passed back to the adapter in*        the callback. This helps the adapter correlate the callback to a*        particular driver.* @param FuncPtr is the pointer to the callback function.** @return** None.** @note** None.*******************************************************************************/voidXEmac_SetErrorHandler(XEmac * InstancePtr, void *CallBackRef,		      XEmac_ErrorHandler FuncPtr){	XASSERT_VOID(InstancePtr != NULL);	XASSERT_VOID(FuncPtr != NULL);	XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	InstancePtr->ErrorHandler = FuncPtr;	InstancePtr->ErrorRef = CallBackRef;}/****************************************************************************//*** Check the interrupt status bits of the Ethernet MAC for errors. Errors* currently handled are:* - Receive length FIFO overrun. Indicates data was lost due to the receive*   length FIFO becoming full during the reception of a packet. Only a device*   reset clears this condition.* - Receive length FIFO underrun. An attempt to read an empty FIFO. Only a*   device reset clears this condition.* - Transmit status FIFO overrun. Indicates data was lost due to the transmit*   status FIFO becoming full following the transmission of a packet. Only a*   device reset clears this condition.* - Transmit status FIFO underrun. An attempt to read an empty FIFO. Only a*   device reset clears this condition.* - Transmit length FIFO overrun. Indicates data was lost due to the transmit*   length FIFO becoming full following the transmission of a packet. Only a*   device reset clears this condition.* - Transmit length FIFO underrun. An attempt to read an empty FIFO. Only a*   device reset clears this condition.* - Receive data FIFO overrun. Indicates data was lost due to the receive data*   FIFO becoming full during the reception of a packet.* - Receive data errors:*   - Receive missed frame error. Valid data was lost by the MAC.*   - Receive collision error. Data was lost by the MAC due to a collision.*   - Receive FCS error.  Data was dicarded by the MAC due to FCS error.*   - Receive length field error. Data was dicarded by the MAC due to an invalid*     length field in the packet.*   - Receive short error. Data was dicarded by the MAC because a packet was*     shorter than allowed.*   - Receive long error. Data was dicarded by the MAC because a packet was*     longer than allowed.*   - Receive alignment error. Data was truncated by the MAC because its length*     was not byte-aligned.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param IntrStatus is the contents of the interrupt status register to be checked** @return** None.** @note** This function is intended for internal use only.*******************************************************************************/voidXEmac_CheckEmacError(XEmac * InstancePtr, u32 IntrStatus){	u32 ResetError = FALSE;	/*	 * First check for receive fifo overrun/underrun errors. Most require a	 * reset by the user to clear, but the data FIFO overrun error does not.	 */	if (IntrStatus & XEM_EIR_RECV_DFIFO_OVER_MASK) {		InstancePtr->Stats.RecvOverrunErrors++;		InstancePtr->Stats.FifoErrors++;	}	if (IntrStatus & XEM_EIR_RECV_LFIFO_OVER_MASK) {		/*		 * Receive Length FIFO overrun interrupts no longer occur in v1.00l		 * and later of the EMAC device. Frames are just dropped by the EMAC		 * if the length FIFO is full. The user would notice the Receive Missed		 * Frame count incrementing without any other errors being reported.		 * This code is left here for backward compatibility with v1.00k and		 * older EMAC devices.		 */		InstancePtr->Stats.RecvOverrunErrors++;		InstancePtr->Stats.FifoErrors++;		ResetError = TRUE;	/* requires a reset */	}	if (IntrStatus & XEM_EIR_RECV_LFIFO_UNDER_MASK) {		InstancePtr->Stats.RecvUnderrunErrors++;		InstancePtr->Stats.FifoErrors++;		ResetError = TRUE;	/* requires a reset */	}	/*	 * Now check for general receive errors. Get the latest count where	 * available, otherwise just bump the statistic so we know the interrupt	 * occurred.	 */	if (IntrStatus & XEM_EIR_RECV_ERROR_MASK) {		if (IntrStatus & XEM_EIR_RECV_MISSED_FRAME_MASK) {			/*			 * Caused by length FIFO or data FIFO overruns on receive side			 */			InstancePtr->Stats.RecvMissedFrameErrors =			    XIo_In32(InstancePtr->BaseAddress +				     XEM_RMFC_OFFSET);		}		if (IntrStatus & XEM_EIR_RECV_COLLISION_MASK) {			InstancePtr->Stats.RecvCollisionErrors =			    XIo_In32(InstancePtr->BaseAddress + XEM_RCC_OFFSET);		}		if (IntrStatus & XEM_EIR_RECV_FCS_ERROR_MASK) {			InstancePtr->Stats.RecvFcsErrors =			    XIo_In32(InstancePtr->BaseAddress +				     XEM_RFCSEC_OFFSET);		}		if (IntrStatus & XEM_EIR_RECV_LEN_ERROR_MASK) {			InstancePtr->Stats.RecvLengthFieldErrors++;		}		if (IntrStatus & XEM_EIR_RECV_SHORT_ERROR_MASK) {			InstancePtr->Stats.RecvShortErrors++;		}		if (IntrStatus & XEM_EIR_RECV_LONG_ERROR_MASK) {			InstancePtr->Stats.RecvLongErrors++;		}		if (IntrStatus & XEM_EIR_RECV_ALIGN_ERROR_MASK) {			InstancePtr->Stats.RecvAlignmentErrors =			    XIo_In32(InstancePtr->BaseAddress +				     XEM_RAEC_OFFSET);		}		/*		 * Bump recv interrupts stats only if not scatter-gather DMA (this		 * stat gets bumped elsewhere in that case)		 */		if (!XEmac_mIsSgDma(InstancePtr)) {			InstancePtr->Stats.RecvInterrupts++;	/* TODO: double bump? */		}	}	/*	 * Check for transmit errors. These apply to both DMA and non-DMA modes	 * of operation. The entire device should be reset after overruns or	 * underruns.	 */	if (IntrStatus & (XEM_EIR_XMIT_SFIFO_OVER_MASK |			  XEM_EIR_XMIT_LFIFO_OVER_MASK)) {		InstancePtr->Stats.XmitOverrunErrors++;		InstancePtr->Stats.FifoErrors++;		ResetError = TRUE;	}	if (IntrStatus & (XEM_EIR_XMIT_SFIFO_UNDER_MASK |			  XEM_EIR_XMIT_LFIFO_UNDER_MASK)) {		InstancePtr->Stats.XmitUnderrunErrors++;		InstancePtr->Stats.FifoErrors++;		ResetError = TRUE;	}	if (ResetError) {		/*		 * If a reset error occurred, disable the EMAC interrupts since the		 * reset-causing interrupt(s) is latched in the EMAC - meaning it will		 * keep occurring until the device is reset. In order to give the higher		 * layer software time to reset the device, we have to disable the		 * overrun/underrun interrupts until that happens. We trust that the		 * higher layer resets the device. We are able to get away with disabling		 * all EMAC interrupts since the only interrupts it generates are for		 * error conditions, and we don't care about any more errors right now.		 */		XIIF_V123B_WRITE_IIER(InstancePtr->BaseAddress, 0);		/*		 * Invoke the error handler callback, which should result in a reset		 * of the device by the upper layer software.		 */		InstancePtr->ErrorHandler(InstancePtr->ErrorRef,					  XST_RESET_ERROR);	}}/*****************************************************************************//*** Check the receive packet FIFO for errors. FIFO error interrupts are:* - Deadlock.  See the XPacketFifo component for a description of deadlock on a*   FIFO.** @param InstancePtr is a pointer to the XEmac instance to be worked on.** @return** Although the function returns void, it can return an asynchronous error to the* application through the error handler.  It can return XST_FIFO_ERROR if a FIFO* error occurred.** @note** This function is intended for internal use only.*******************************************************************************/voidXEmac_CheckFifoRecvError(XEmac * InstancePtr){	/*	 * Although the deadlock is currently the only interrupt from a packet	 * FIFO, make sure it is deadlocked before taking action. There is no	 * need to clear this interrupt since it requires a reset of the device.	 */	if (XPF_V100B_IS_DEADLOCKED(&InstancePtr->RecvFifo)) {		u32 IntrEnable;		InstancePtr->Stats.FifoErrors++;		/*		 * Invoke the error callback function, which should result in a reset		 * of the device by the upper layer software. We first need to disable		 * the FIFO interrupt, since otherwise the upper layer thread that		 * handles the reset may never run because this interrupt condition		 * doesn't go away until a reset occurs (there is no way to ack it).		 */		IntrEnable = XIIF_V123B_READ_DIER(InstancePtr->BaseAddress);		XIIF_V123B_WRITE_DIER(InstancePtr->BaseAddress,				      IntrEnable & ~XEM_IPIF_RECV_FIFO_MASK);		InstancePtr->ErrorHandler(InstancePtr->ErrorRef,					  XST_FIFO_ERROR);	}}/*****************************************************************************//*** Check the send packet FIFO for errors. FIFO error interrupts are:* - Deadlock. See the XPacketFifo component for a description of deadlock on a*   FIFO.** @param InstancePtr is a pointer to the XEmac instance to be worked on.** @return** Although the function returns void, it can return an asynchronous error to the* application through the error handler.  It can return XST_FIFO_ERROR if a FIFO* error occurred.** @note** This function is intended for internal use only.*******************************************************************************/voidXEmac_CheckFifoSendError(XEmac * InstancePtr){	/*	 * Although the deadlock is currently the only interrupt from a packet	 * FIFO, make sure it is deadlocked before taking action. There is no	 * need to clear this interrupt since it requires a reset of the device.	 */	if (XPF_V100B_IS_DEADLOCKED(&InstancePtr->SendFifo)) {		u32 IntrEnable;		InstancePtr->Stats.FifoErrors++;		/*		 * Invoke the error callback function, which should result in a reset		 * of the device by the upper layer software. We first need to disable		 * the FIFO interrupt, since otherwise the upper layer thread that		 * handles the reset may never run because this interrupt condition		 * doesn't go away until a reset occurs (there is no way to ack it).		 */		IntrEnable = XIIF_V123B_READ_DIER(InstancePtr->BaseAddress);		XIIF_V123B_WRITE_DIER(InstancePtr->BaseAddress,				      IntrEnable & ~XEM_IPIF_SEND_FIFO_MASK);		InstancePtr->ErrorHandler(InstancePtr->ErrorRef,					  XST_FIFO_ERROR);	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲动漫制服丝袜| xf在线a精品一区二区视频网站| 91精品国产入口| 国产精品嫩草久久久久| 日韩二区在线观看| 9人人澡人人爽人人精品| 欧美r级在线观看| 亚洲一区中文日韩| 99久久免费国产| 中文字幕欧美日本乱码一线二线| 午夜电影网一区| 在线观看视频一区二区 | 亚洲日本青草视频在线怡红院| 偷拍日韩校园综合在线| 91色porny| 中文字幕亚洲一区二区av在线 | 久久亚洲欧美国产精品乐播| 夜夜亚洲天天久久| 99久精品国产| 亚洲欧洲精品一区二区精品久久久 | 在线91免费看| 亚洲青青青在线视频| 成人免费观看av| 久久久www成人免费毛片麻豆| 蜜桃视频一区二区三区在线观看| 欧美日韩mp4| 亚洲一区欧美一区| 色8久久精品久久久久久蜜| 亚洲精品视频在线观看免费| 不卡大黄网站免费看| 亚洲国产高清不卡| 99精品久久久久久| 亚洲综合在线观看视频| 99re66热这里只有精品3直播| 国产精品久久久久一区二区三区共| 国产99久久精品| 中文字幕欧美日本乱码一线二线| 成人理论电影网| 中文字幕制服丝袜一区二区三区 | 麻豆精品在线播放| 久久综合av免费| 国产一区二区美女| 中文字幕av一区 二区| 成人免费福利片| 亚洲欧美一区二区三区国产精品| 在线观看国产一区二区| 偷偷要91色婷婷| 久久综合资源网| 成人ar影院免费观看视频| 中文字幕在线一区免费| 精品视频资源站| 蜜桃视频在线观看一区二区| 国产亚洲欧美激情| 色狠狠桃花综合| 日韩精品福利网| 久久综合久久99| 91免费看`日韩一区二区| 亚洲国产精品一区二区www在线| 欧美群妇大交群中文字幕| 九色|91porny| 一区二区久久久久久| 欧美电视剧免费观看| 成人av集中营| 成人免费黄色在线| 亚洲一卡二卡三卡四卡 | 在线观看欧美黄色| 久久成人av少妇免费| 国产精品护士白丝一区av| 欧美三级视频在线观看| 国产精品99久久久久久久vr| 亚洲猫色日本管| 欧美成人午夜电影| 色婷婷亚洲精品| 九色综合国产一区二区三区| 亚洲黄色免费网站| 欧美精品一区二区三| 在线免费不卡电影| 国产盗摄视频一区二区三区| 亚洲一区在线视频观看| 久久久一区二区| 9191成人精品久久| 91香蕉视频污在线| 国产91丝袜在线18| 麻豆成人久久精品二区三区红| 亚洲欧美电影一区二区| 久久免费美女视频| 日韩一级黄色大片| 欧美美女视频在线观看| 成人免费三级在线| 国产在线视频精品一区| 午夜欧美一区二区三区在线播放| 国产精品视频观看| 国产欧美日韩精品在线| 日韩免费观看高清完整版在线观看| 色噜噜夜夜夜综合网| 99国产精品国产精品久久| 韩国女主播一区| 久久99精品久久久久婷婷| 日韩高清不卡一区二区三区| 亚洲美女在线一区| 136国产福利精品导航| 国产精品免费av| 国产精品国产精品国产专区不片| 久久久99久久精品欧美| 欧美成人r级一区二区三区| 制服丝袜成人动漫| 欧美精品在线一区二区| 欧美狂野另类xxxxoooo| 欧美精品1区2区3区| 欧美三片在线视频观看| 欧美日韩国产经典色站一区二区三区| 日本高清无吗v一区| 色噜噜狠狠成人中文综合| 91国产视频在线观看| 色视频成人在线观看免| 91免费在线看| 欧美日韩一区不卡| 久久久精品tv| 国产精品全国免费观看高清| 欧美国产97人人爽人人喊| 国产精品久久久久久久久搜平片| 国产精品麻豆欧美日韩ww| 亚洲欧美日韩久久| 一区二区三区精密机械公司| 一区二区不卡在线播放 | 久久99精品一区二区三区| 美女视频一区二区三区| 国产精品综合av一区二区国产馆| 国产乱码精品1区2区3区| www.亚洲国产| 在线免费av一区| 欧美一级久久久| 国产日韩欧美在线一区| 综合色天天鬼久久鬼色| 亚洲美女区一区| 日本欧洲一区二区| 成人高清视频在线| 欧美在线影院一区二区| 欧美精品 日韩| 欧美精品一区二区三区蜜桃| 国产精品青草综合久久久久99| 亚洲日韩欧美一区二区在线| 偷拍日韩校园综合在线| 国产精品99久久久久久似苏梦涵 | 风间由美性色一区二区三区| 99热在这里有精品免费| 欧美色爱综合网| 久久久综合激的五月天| 亚洲日韩欧美一区二区在线| 人妖欧美一区二区| 国产成人av电影| 欧美系列日韩一区| 久久综合色天天久久综合图片| 国产精品伦一区| 男男gaygay亚洲| 99久久精品免费精品国产| 91精品国产麻豆| 国产精品久久久久久久久搜平片| 日本在线不卡一区| av亚洲产国偷v产偷v自拍| 91精品国产入口| 亚洲欧美一区二区三区孕妇| 国产最新精品精品你懂的| 欧美无砖砖区免费| 国产精品女上位| 毛片基地黄久久久久久天堂| 97久久人人超碰| 国产日韩欧美高清| 久久精品国产精品亚洲精品| 一本色道久久综合亚洲91| 久久日一线二线三线suv| 香蕉av福利精品导航| av不卡免费在线观看| 久久尤物电影视频在线观看| 亚洲国产日产av| 97久久精品人人爽人人爽蜜臀| 日韩美女一区二区三区四区| 亚洲精品视频一区二区| 暴力调教一区二区三区| 久久久精品中文字幕麻豆发布| 国产乱码一区二区三区| 91精品国产入口在线| 亚洲v中文字幕| 91啦中文在线观看| 久久久久久久久久久久久夜| 日本成人中文字幕| 欧美日韩一区二区在线观看视频| 18成人在线观看| 成人在线视频一区| 国产婷婷一区二区| 国产美女一区二区三区| 精品国产电影一区二区| 麻豆视频观看网址久久| 日韩欧美国产综合一区 | 国产宾馆实践打屁股91| 久久色在线观看| 国产.欧美.日韩| 国产精品福利影院| 色婷婷国产精品久久包臀| 国产精品你懂的|