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

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

?? xemac_intr.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? 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一区二区三区免费野_久草精品视频
麻豆成人综合网| 日韩精品1区2区3区| 日韩av在线播放中文字幕| 91精品国产色综合久久ai换脸 | 色哟哟国产精品免费观看| 亚洲精品国产a| 日韩一区二区三区av| av电影天堂一区二区在线观看| 亚洲一区二区三区中文字幕 | 欧美日韩一级黄| 国产成人免费视频精品含羞草妖精| 亚洲黄色免费电影| 国产日韩亚洲欧美综合| 欧美一区二区三区在线观看视频 | 欧美三级三级三级| 成人免费观看男女羞羞视频| 美女视频第一区二区三区免费观看网站| 国产精品久久久久7777按摩| 久久久久久久久蜜桃| 精品精品国产高清一毛片一天堂| 欧美视频自拍偷拍| 欧美色视频在线| 欧美日韩视频不卡| 88在线观看91蜜桃国自产| 欧美日韩激情一区| 欧美图片一区二区三区| 91免费在线看| 欧美色图第一页| 欧美一区二区三区成人| 日韩欧美不卡在线观看视频| 欧美探花视频资源| 日韩欧美卡一卡二| 精品国产三级a在线观看| 久久美女艺术照精彩视频福利播放 | 欧美一级欧美一级在线播放| 日韩午夜中文字幕| 国产精品素人视频| 亚洲综合免费观看高清完整版| 亚洲综合在线第一页| 青青草视频一区| 成人av在线电影| 欧美日韩亚洲高清一区二区| 欧美精品一区二区三| 国产精品成人午夜| 亚瑟在线精品视频| 国产a级毛片一区| 色先锋资源久久综合| 91精品黄色片免费大全| 国产日韩欧美亚洲| 日韩av网站在线观看| 99免费精品在线观看| 久久综合九色综合欧美就去吻| 亚洲色图在线视频| 国产精品99久| 色94色欧美sute亚洲线路二| 91精品国产入口| 一个色妞综合视频在线观看| 国产乱码一区二区三区| 日韩精品中文字幕在线一区| 亚洲免费在线观看视频| 岛国一区二区三区| 久久久无码精品亚洲日韩按摩| 日韩专区在线视频| 欧美日韩亚洲综合在线 | 中文字幕不卡的av| 久久se精品一区精品二区| 欧美在线啊v一区| 一区二区理论电影在线观看| 99国产精品99久久久久久| 久久综合久久综合九色| 精一区二区三区| 久久久综合网站| www.久久久久久久久| 国产精品久久看| 91美女片黄在线| 亚洲成人精品一区| 日韩美女天天操| 国产aⅴ精品一区二区三区色成熟| 久久一区二区视频| 国产91精品精华液一区二区三区| 国产精品久久久久久久裸模| 欧美午夜在线一二页| 亚洲伦理在线精品| 欧美唯美清纯偷拍| 国产suv精品一区二区6| 精品国产免费久久| 欧美亚洲丝袜传媒另类| 久久精品二区亚洲w码| 专区另类欧美日韩| 欧美一级高清大全免费观看| 国产一区二区电影| 亚洲影视在线观看| 国产精品人成在线观看免费 | 91香蕉视频mp4| 国内精品免费在线观看| 日日夜夜精品视频天天综合网| 欧美国产一区二区| 久久综合九色综合97婷婷| 欧美熟乱第一页| 色94色欧美sute亚洲13| 国产精品18久久久久久久网站| 日韩电影免费在线看| 亚洲无线码一区二区三区| 国产精品灌醉下药二区| 国产亚洲污的网站| 久久久久久久国产精品影院| 91麻豆精品国产91久久久| 欧美久久久久久久久中文字幕| 丁香婷婷综合五月| 国产精品一区二区在线观看不卡 | 天天av天天翘天天综合网色鬼国产| 一区精品在线播放| 成人激情开心网| 亚洲精选视频在线| 亚洲国产精品精华液ab| 国产天堂亚洲国产碰碰| 中文字幕一区二区在线播放| 中文字幕国产一区二区| 亚洲美女少妇撒尿| 午夜av电影一区| 国产一区二区三区高清播放| 国产精品 日产精品 欧美精品| 成人丝袜视频网| 在线观看免费成人| 久久综合九色综合欧美就去吻| 欧美国产精品久久| 亚洲第一会所有码转帖| 激情五月婷婷综合网| 91啪九色porn原创视频在线观看| 欧美日本国产视频| 国产精品无人区| 日韩福利电影在线| 91色.com| 国产亚洲短视频| 图片区小说区国产精品视频| 国产大陆精品国产| 欧美精品乱码久久久久久按摩| 精品日韩99亚洲| 青青草国产成人99久久| 色94色欧美sute亚洲13| 久久精品一区蜜桃臀影院| 亚洲成人精品一区二区| 91蜜桃网址入口| 国产精品久久久久久久蜜臀 | 日韩精品乱码av一区二区| 国产激情一区二区三区四区| 精品精品国产高清一毛片一天堂| 亚洲午夜在线视频| 欧美色电影在线| 亚洲午夜精品17c| 欧美美女直播网站| 无吗不卡中文字幕| 7777精品伊人久久久大香线蕉| 亚洲美腿欧美偷拍| 在线观看成人小视频| 午夜精品久久久久久| 欧美日韩国产一级片| 午夜国产不卡在线观看视频| 欧美在线观看视频一区二区 | 夜夜嗨av一区二区三区网页| 色系网站成人免费| 午夜电影一区二区| 精品美女一区二区| 国产美女一区二区三区| 国产三级精品在线| 91理论电影在线观看| 亚洲第一成年网| 国产日韩欧美高清| 欧美性感一区二区三区| 开心九九激情九九欧美日韩精美视频电影 | 日韩三级视频在线看| 国产麻豆成人精品| 亚洲视频一区二区在线观看| 欧美日韩成人综合| 国产传媒欧美日韩成人| 亚洲一级不卡视频| 中文字幕在线观看一区| 欧美色区777第一页| 不卡电影一区二区三区| 日本中文字幕一区二区视频| 国产精品五月天| 久久精品人人做| 欧美顶级少妇做爰| 91久久免费观看| 成人av资源网站| 成人免费看片app下载| 国产精品一区二区黑丝| 日韩成人午夜精品| 午夜精品一区二区三区免费视频 | 日本亚洲电影天堂| 依依成人综合视频| 亚洲精品高清在线观看| 亚洲男同性视频| 欧美国产一区视频在线观看| 久久综合色鬼综合色| 欧美成人video| 国产欧美精品一区二区色综合 | 91社区在线播放| 不卡视频一二三四| 欧洲激情一区二区|