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

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

?? mv_eth.c

?? AT9260的BOOTLOADER,還有幾個版本的,需要的我再放
?? C
?? 第 1 頁 / 共 5 頁
字號:
			break;		default:	/* should not happen */			break;		}	} while (release_result == ETH_OK);	return 0;		/* success */      error:	return 1;		/* Failed - higher layers will free the skb */}/********************************************************************** * mv64360_eth_receive * * This function is forward packets that are received from the port's * queues toward kernel core or FastRoute them to another interface. * * Input : dev - a pointer to the required interface *         max - maximum number to receive (0 means unlimted) * * Output : number of served packets **********************************************************************/int mv64360_eth_receive (struct eth_device *dev){	ETH_PORT_INFO *ethernet_private;	struct mv64360_eth_priv *port_private;	unsigned int port_num;	PKT_INFO pkt_info;	struct net_device_stats *stats;	ethernet_private = (ETH_PORT_INFO *) dev->priv;	port_private =		(struct mv64360_eth_priv *) ethernet_private->port_private;	port_num = port_private->port_num;	stats = port_private->stats;	while ((eth_port_receive (ethernet_private, ETH_Q0, &pkt_info) ==		ETH_OK)) {#ifdef DEBUG_MV_ETH		if (pkt_info.byte_cnt != 0) {			printf ("%s: Received %d byte Packet @ 0x%x\n",				__FUNCTION__, pkt_info.byte_cnt,				pkt_info.buf_ptr);		}#endif		/* Update statistics. Note byte count includes 4 byte CRC count */		stats->rx_packets++;		stats->rx_bytes += pkt_info.byte_cnt;		/*		 * In case received a packet without first / last bits on OR the error		 * summary bit is on, the packets needs to be dropeed.		 */		if (((pkt_info.		      cmd_sts & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=		     (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))		    || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {			stats->rx_dropped++;			printf ("Received packet spread on multiple descriptors\n");			/* Is this caused by an error ? */			if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY) {				stats->rx_errors++;			}			/* free these descriptors again without forwarding them to the higher layers */			pkt_info.buf_ptr &= ~0x7;	/* realign buffer again */			pkt_info.byte_cnt = 0x0000;	/* Reset Byte count */			if (eth_rx_return_buff			    (ethernet_private, ETH_Q0, &pkt_info) != ETH_OK) {				printf ("Error while returning the RX Desc to Ring\n");			} else {				DP (printf ("RX Desc returned to Ring\n"));			}			/* /free these descriptors again */		} else {/* !!! call higher layer processing */#ifdef DEBUG_MV_ETH			printf ("\nNow send it to upper layer protocols (NetReceive) ...\n");#endif			/* let the upper layer handle the packet */			NetReceive ((uchar *) pkt_info.buf_ptr,				    (int) pkt_info.byte_cnt);/* **************************************************************** *//* free descriptor  */			pkt_info.buf_ptr &= ~0x7;	/* realign buffer again */			pkt_info.byte_cnt = 0x0000;	/* Reset Byte count */			DP (printf			    ("RX: pkt_info.buf_ptr =	%x\n",			     pkt_info.buf_ptr));			if (eth_rx_return_buff			    (ethernet_private, ETH_Q0, &pkt_info) != ETH_OK) {				printf ("Error while returning the RX Desc to Ring\n");			} else {				DP (printf ("RX Desc returned to Ring\n"));			}/* **************************************************************** */		}	}	mv64360_eth_get_stats (dev);	/* update statistics */	return 1;}/********************************************************************** * mv64360_eth_get_stats * * Returns a pointer to the interface statistics. * * Input : dev - a pointer to the required interface * * Output : a pointer to the interface's statistics **********************************************************************/static struct net_device_stats *mv64360_eth_get_stats (struct eth_device *dev){	ETH_PORT_INFO *ethernet_private;	struct mv64360_eth_priv *port_private;	unsigned int port_num;	ethernet_private = (ETH_PORT_INFO *) dev->priv;	port_private =		(struct mv64360_eth_priv *) ethernet_private->port_private;	port_num = port_private->port_num;	mv64360_eth_update_stat (dev);	return port_private->stats;}/********************************************************************** * mv64360_eth_update_stat * * Update the statistics structure in the private data structure * * Input : pointer to ethernet interface network device structure * Output : N/A **********************************************************************/static void mv64360_eth_update_stat (struct eth_device *dev){	ETH_PORT_INFO *ethernet_private;	struct mv64360_eth_priv *port_private;	struct net_device_stats *stats;	unsigned int port_num;	volatile unsigned int dummy;	ethernet_private = (ETH_PORT_INFO *) dev->priv;	port_private =		(struct mv64360_eth_priv *) ethernet_private->port_private;	port_num = port_private->port_num;	stats = port_private->stats;	/* These are false updates */	stats->rx_packets += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_FRAMES_RECEIVED);	stats->tx_packets += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_FRAMES_SENT);	stats->rx_bytes += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_OCTETS_RECEIVED_LOW);	/*	 * Ideally this should be as follows -	 *	 *   stats->rx_bytes   += stats->rx_bytes +	 * ((unsigned long) ethReadMibCounter (ethernet_private->port_num ,	 * ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH) << 32);	 *	 * But the unsigned long in PowerPC and MIPS are 32bit. So the next read	 * is just a dummy read for proper work of the GigE port	 */	dummy = eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH);	stats->tx_bytes += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_OCTETS_SENT_LOW);	dummy = eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_GOOD_OCTETS_SENT_HIGH);	stats->rx_errors += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_MAC_RECEIVE_ERROR);	/* Rx dropped is for received packet with CRC error */	stats->rx_dropped +=		(unsigned long) eth_read_mib_counter (ethernet_private->						      port_num,						      ETH_MIB_BAD_CRC_EVENT);	stats->multicast += (unsigned long)		eth_read_mib_counter (ethernet_private->port_num,				      ETH_MIB_MULTICAST_FRAMES_RECEIVED);	stats->collisions +=		(unsigned long) eth_read_mib_counter (ethernet_private->						      port_num,						      ETH_MIB_COLLISION) +		(unsigned long) eth_read_mib_counter (ethernet_private->						      port_num,						      ETH_MIB_LATE_COLLISION);	/* detailed rx errors */	stats->rx_length_errors +=		(unsigned long) eth_read_mib_counter (ethernet_private->						      port_num,						      ETH_MIB_UNDERSIZE_RECEIVED)		+		(unsigned long) eth_read_mib_counter (ethernet_private->						      port_num,						      ETH_MIB_OVERSIZE_RECEIVED);	/* detailed tx errors */}#ifndef  UPDATE_STATS_BY_SOFTWARE/********************************************************************** * mv64360_eth_print_stat * * Update the statistics structure in the private data structure * * Input : pointer to ethernet interface network device structure * Output : N/A **********************************************************************/static void mv64360_eth_print_stat (struct eth_device *dev){	ETH_PORT_INFO *ethernet_private;	struct mv64360_eth_priv *port_private;	struct net_device_stats *stats;	unsigned int port_num;	ethernet_private = (ETH_PORT_INFO *) dev->priv;	port_private =		(struct mv64360_eth_priv *) ethernet_private->port_private;	port_num = port_private->port_num;	stats = port_private->stats;	/* These are false updates */	printf ("\n### Network statistics: ###\n");	printf ("--------------------------\n");	printf (" Packets received:		%ld\n", stats->rx_packets);	printf (" Packets send:			%ld\n", stats->tx_packets);	printf (" Received bytes:		%ld\n", stats->rx_bytes);	printf (" Send bytes:			%ld\n", stats->tx_bytes);	if (stats->rx_errors != 0)		printf (" Rx Errors:			%ld\n",			stats->rx_errors);	if (stats->rx_dropped != 0)		printf (" Rx dropped (CRC Errors):	%ld\n",			stats->rx_dropped);	if (stats->multicast != 0)		printf (" Rx mulicast frames:		%ld\n",			stats->multicast);	if (stats->collisions != 0)		printf (" No. of collisions:		%ld\n",			stats->collisions);	if (stats->rx_length_errors != 0)		printf (" Rx length errors:		%ld\n",			stats->rx_length_errors);}#endif/************************************************************************** *network_start - Network Kick Off Routine UBoot *Inputs : *Outputs : **************************************************************************/bool db64360_eth_start (struct eth_device *dev){	return (mv64360_eth_open (dev));	/* calls real open */}/******************************************************************************************************************************************************************************************************************************  The second part is the low level driver of the gigE ethernet ports.   ******************************************************************************************************************************************************************************************************************************//* * based on Linux code * arch/ppc/galileo/EVB64360/mv64360_eth.c - Driver for MV64360X ethernet ports * Copyright (C) 2002 rabeeh@galileo.co.il * 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. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * *//******************************************************************************** * Marvell's Gigabit Ethernet controller low level driver * * DESCRIPTION: *       This file introduce low level API to Marvell's Gigabit Ethernet *		controller. This Gigabit Ethernet Controller driver API controls *		1) Operations (i.e. port init, start, reset etc'). *		2) Data flow (i.e. port send, receive etc'). *		Each Gigabit Ethernet port is controlled via ETH_PORT_INFO *		struct. *		This struct includes user configuration information as well as *		driver internal data needed for its operations. * *		Supported Features: *		- This low level driver is OS independent. Allocating memory for *		  the descriptor rings and buffers are not within the scope of *		  this driver. *		- The user is free from Rx/Tx queue managing. *		- This low level driver introduce functionality API that enable *		  the to operate Marvell's Gigabit Ethernet Controller in a *		  convenient way. *		- Simple Gigabit Ethernet port operation API. *		- Simple Gigabit Ethernet port data flow API. *		- Data flow and operation API support per queue functionality. *		- Support cached descriptors for better performance. *		- Enable access to all four DRAM banks and internal SRAM memory *		  spaces. *		- PHY access and control API. *		- Port control register configuration API. *		- Full control over Unicast and Multicast MAC configurations. * *		Operation flow: * *		Initialization phase *		This phase complete the initialization of the ETH_PORT_INFO *		struct. *		User information regarding port configuration has to be set *		prior to calling the port initialization routine. For example, *		the user has to assign the port_phy_addr field which is board *		depended parameter. *		In this phase any port Tx/Rx activity is halted, MIB counters *		are cleared, PHY address is set according to user parameter and *		access to DRAM and internal SRAM memory spaces. * *		Driver ring initialization *		Allocating memory for the descriptor rings and buffers is not *		within the scope of this driver. Thus, the user is required to *		allocate memory for the descriptors ring and buffers. Those *		memory parameters are used by the Rx and Tx ring initialization *		routines in order to curve the descriptor linked list in a form *		of a ring. *		Note: Pay special attention to alignment issues when using *		cached descriptors/buffers. In this phase the driver store *		information in the ETH_PORT_INFO struct regarding each queue *		ring. * *		Driver start *		This phase prepares the Ethernet port for Rx and Tx activity. *		It uses the information stored in the ETH_PORT_INFO struct to *		initialize the various port registers. * *		Data flow: *		All packet references to/from the driver are done using PKT_INFO *		struct. *		This struct is a unified struct used with Rx and Tx operations. *		This way the user is not required to be familiar with neither *		Tx nor Rx descriptors structures. *		The driver's descriptors rings are management by indexes. *		Those indexes controls the ring resources and used to indicate *		a SW resource error: *		'current' *		This index points to the current available resource for use. For *		example in Rx process this index will point to the descriptor *		that will be passed to the user upon calling the receive routine. *		In Tx process, this index will point to the descriptor *		that will be assigned with the user packet info and transmitted. *		'used' *		This index points to the descriptor that need to restore its *		resources. For example in Rx process, using the Rx buffer return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人快播电影网| 亚洲一区在线视频| 日韩电影一区二区三区| 免费欧美高清视频| 国产欧美日韩激情| 久久婷婷色综合| av中文字幕不卡| 亚洲成精国产精品女| 欧美成人vps| 春色校园综合激情亚洲| 亚洲男女一区二区三区| 91麻豆精品国产91久久久久久久久| 国产精品一区二区你懂的| 欧美一卡二卡三卡| 亚洲欧洲av一区二区三区久久| 蜜臀精品一区二区三区在线观看| 欧美亚洲一区二区在线| 亚洲色图欧美激情| 成熟亚洲日本毛茸茸凸凹| 精品精品国产高清a毛片牛牛| 亚洲bt欧美bt精品| 色婷婷国产精品久久包臀| 中文字幕亚洲电影| 波多野结衣中文一区| 国产女同互慰高潮91漫画| 国产一区不卡精品| 久久丝袜美腿综合| 国产一本一道久久香蕉| 久久久久久综合| 欧美性色欧美a在线播放| 亚洲欧美一区二区久久| 99久久婷婷国产精品综合| 国产精品天干天干在观线| 高清国产一区二区| 国产精品欧美一级免费| av电影在线观看不卡| 亚洲人成人一区二区在线观看| av一区二区三区| 一区二区三区在线影院| 欧美在线观看视频一区二区三区| 亚洲欧美区自拍先锋| 欧美午夜一区二区三区免费大片| 亚洲国产成人av| 欧美一区二区三区婷婷月色| 精品一区精品二区高清| 国产日韩欧美综合一区| 91在线视频播放地址| 亚洲已满18点击进入久久| 欧美日韩一区二区三区高清| 蜜桃精品视频在线| 国产午夜精品一区二区三区嫩草| 99精品欧美一区二区三区综合在线| 亚洲精品五月天| 欧美一区二区在线免费播放| 国产自产v一区二区三区c| 中文字幕一区二区三区四区| 欧美日韩在线免费视频| 蜜桃久久精品一区二区| 精品国产免费视频| 人人爽香蕉精品| 91行情网站电视在线观看高清版| 国产精品美女久久久久久| 亚洲成国产人片在线观看| 精品一区二区三区在线观看国产| 在线观看免费成人| 国产日韩一级二级三级| 青青草原综合久久大伊人精品| 国产精品自产自拍| 91九色最新地址| 成人免费一区二区三区视频| 国产一区二区三区美女| 亚洲欧洲韩国日本视频 | 欧美高清hd18日本| 狠狠色2019综合网| 亚洲少妇中出一区| 精品国产乱码久久久久久久久| 91亚洲精品久久久蜜桃| 国产专区欧美精品| 亚洲一区影音先锋| 亚洲国产精品v| 日韩视频免费观看高清完整版| 99久久99精品久久久久久| 日本成人中文字幕在线视频| 综合婷婷亚洲小说| 久久久久久久综合色一本| 欧美日韩高清一区| 色婷婷亚洲精品| 国产成a人亚洲| 精品一区二区三区视频| 性做久久久久久免费观看| 国产精品高潮久久久久无| 欧美成人官网二区| 欧美精品第1页| 欧美视频在线一区二区三区 | 国产精品欧美一级免费| 日韩一区二区高清| 欧美日韩精品一区二区三区蜜桃| 99国产精品久久久久久久久久| 极品少妇xxxx精品少妇| 日韩黄色免费电影| 亚洲自拍偷拍九九九| 中文字幕中文字幕在线一区| 国产欧美一区二区三区沐欲| 亚洲精品在线网站| 日韩亚洲欧美一区二区三区| 欧美一区二区视频在线观看| 欧美美女一区二区三区| 欧美日韩久久一区| 欧美女孩性生活视频| 欧美性大战久久| 在线观看免费亚洲| 在线精品观看国产| 在线视频你懂得一区二区三区| 91尤物视频在线观看| 日本韩国视频一区二区| 91麻豆视频网站| 欧美四级电影在线观看| 欧美日产国产精品| 日韩一级高清毛片| 精品国产乱码久久久久久久久 | 4438x亚洲最大成人网| 成年人网站91| 国产一区不卡在线| 国产精品自拍在线| 奇米影视7777精品一区二区| 亚洲欧美日韩国产一区二区三区 | 成人永久免费视频| 婷婷夜色潮精品综合在线| 国产精品久久久久久久浪潮网站 | 精品国产免费久久| 久久一区二区视频| 中文字幕成人av| 亚洲精品视频观看| 午夜精品久久久| 激情欧美一区二区三区在线观看| 国产成人在线影院| av中文一区二区三区| 欧美亚洲丝袜传媒另类| 欧美一区二区三区小说| 国产色产综合色产在线视频| 亚洲日穴在线视频| 男女视频一区二区| 国产suv精品一区二区三区| 色综合久久88色综合天天| 日韩视频免费观看高清完整版| 国产午夜亚洲精品午夜鲁丝片| 亚洲精品美腿丝袜| 久久99国内精品| 色美美综合视频| 日韩欧美黄色影院| 亚洲另类春色国产| 久久爱www久久做| 91麻豆国产福利在线观看| 91精品国产入口在线| 国产精品久久久久久久久动漫 | 亚洲一卡二卡三卡四卡无卡久久 | 欧美精品一区二区三区一线天视频| 中文成人综合网| 日韩精品乱码免费| 色综合天天综合色综合av| 精品国产免费人成电影在线观看四季| 国产精品欧美综合在线| 看电视剧不卡顿的网站| 色8久久人人97超碰香蕉987| 久久综合99re88久久爱| 亚洲成a人片在线不卡一二三区| 国产精品123| 欧美一级久久久久久久大片| 亚洲精品高清在线观看| 国产精品99久久久久久宅男| 欧美欧美欧美欧美| 亚洲精品福利视频网站| 国产成人免费网站| 日韩一区二区视频| 性做久久久久久| 一本大道av一区二区在线播放| 久久只精品国产| 久久国产精品一区二区| 欧美精品一卡两卡| 91毛片在线观看| 午夜欧美在线一二页| 欧美电视剧免费观看| 国产日韩精品视频一区| 国产福利精品导航| 国产日韩欧美一区二区三区综合| 老司机一区二区| 久久久一区二区三区捆绑**| 国产suv精品一区二区三区| 久久久久久久久久久黄色| 国产伦精品一区二区三区视频青涩| 欧美va亚洲va香蕉在线| 韩国女主播成人在线| 欧美激情综合在线| 91麻豆精品国产91久久久| 亚洲成人精品一区二区| 91黄色小视频| 夜色激情一区二区| 色婷婷亚洲精品| 亚洲国产人成综合网站| 欧美日韩成人高清|