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

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

?? mv_eth.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 5 頁
字號:
*       Note: Each Rx and Tx queue descriptor's list must be initialized prior*       to calling this function (use ether_init_tx_desc_ring for Tx queues and*       ether_init_rx_desc_ring for Rx queues).** INPUT:*       ETH_PORT_INFO 	*p_eth_port_ctrl       Ethernet port control struct** OUTPUT:*       Ethernet port is ready to receive and transmit.** RETURN:*       false if the port PHY is not up.*       true otherwise.********************************************************************************/static bool eth_port_start (ETH_PORT_INFO * p_eth_port_ctrl){	int queue;	volatile ETH_TX_DESC *p_tx_curr_desc;	volatile ETH_RX_DESC *p_rx_curr_desc;	unsigned int phy_reg_data;	ETH_PORT eth_port_num = p_eth_port_ctrl->port_num;	/* Assignment of Tx CTRP of given queue */	for (queue = 0; queue < MAX_TX_QUEUE_NUM; queue++) {		CURR_TFD_GET (p_tx_curr_desc, queue);		MV_REG_WRITE ((MV64360_ETH_TX_CURRENT_QUEUE_DESC_PTR_0			       (eth_port_num)			       + (4 * queue)),			      ((unsigned int) p_tx_curr_desc));	}	/* Assignment of Rx CRDP of given queue */	for (queue = 0; queue < MAX_RX_QUEUE_NUM; queue++) {		CURR_RFD_GET (p_rx_curr_desc, queue);		MV_REG_WRITE ((MV64360_ETH_RX_CURRENT_QUEUE_DESC_PTR_0			       (eth_port_num)			       + (4 * queue)),			      ((unsigned int) p_rx_curr_desc));		if (p_rx_curr_desc != NULL)			/* Add the assigned Ethernet address to the port's address table */			eth_port_uc_addr_set (p_eth_port_ctrl->port_num,					      p_eth_port_ctrl->port_mac_addr,					      queue);	}	/* Assign port configuration and command. */	MV_REG_WRITE (MV64360_ETH_PORT_CONFIG_REG (eth_port_num),		      p_eth_port_ctrl->port_config);	MV_REG_WRITE (MV64360_ETH_PORT_CONFIG_EXTEND_REG (eth_port_num),		      p_eth_port_ctrl->port_config_extend);	MV_REG_WRITE (MV64360_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num),		      p_eth_port_ctrl->port_serial_control);	MV_SET_REG_BITS (MV64360_ETH_PORT_SERIAL_CONTROL_REG (eth_port_num),			 ETH_SERIAL_PORT_ENABLE);	/* Assign port SDMA configuration */	MV_REG_WRITE (MV64360_ETH_SDMA_CONFIG_REG (eth_port_num),		      p_eth_port_ctrl->port_sdma_config);	MV_REG_WRITE (MV64360_ETH_TX_QUEUE_0_TOKEN_BUCKET_COUNT		      (eth_port_num), 0x3fffffff);	MV_REG_WRITE (MV64360_ETH_TX_QUEUE_0_TOKEN_BUCKET_CONFIG		      (eth_port_num), 0x03fffcff);	/* Turn off the port/queue bandwidth limitation */	MV_REG_WRITE (MV64360_ETH_MAXIMUM_TRANSMIT_UNIT (eth_port_num), 0x0);	/* Enable port Rx. */	MV_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG (eth_port_num),		      p_eth_port_ctrl->port_rx_queue_command);	/* Check if link is up */	eth_port_read_smi_reg (eth_port_num, 1, &phy_reg_data);	if (!(phy_reg_data & 0x20))		return false;	return true;}/******************************************************************************** eth_port_uc_addr_set - This function Set the port Unicast address.** DESCRIPTION:*		This function Set the port Ethernet MAC address.** INPUT:*	ETH_PORT eth_port_num     Port number.*	char *        p_addr		Address to be set*	ETH_QUEUE 	  queue		Rx queue number for this MAC address.** OUTPUT:*	Set MAC address low and high registers. also calls eth_port_uc_addr()*       To set the unicast table with the proper information.** RETURN:*	N/A.********************************************************************************/static void eth_port_uc_addr_set (ETH_PORT eth_port_num,				  unsigned char *p_addr, ETH_QUEUE queue){	unsigned int mac_h;	unsigned int mac_l;	mac_l = (p_addr[4] << 8) | (p_addr[5]);	mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) |		(p_addr[2] << 8) | (p_addr[3] << 0);	MV_REG_WRITE (MV64360_ETH_MAC_ADDR_LOW (eth_port_num), mac_l);	MV_REG_WRITE (MV64360_ETH_MAC_ADDR_HIGH (eth_port_num), mac_h);	/* Accept frames of this address */	eth_port_uc_addr (eth_port_num, p_addr[5], queue, ACCEPT_MAC_ADDR);	return;}/******************************************************************************** eth_port_uc_addr - This function Set the port unicast address table** DESCRIPTION:*	This function locates the proper entry in the Unicast table for the*	specified MAC nibble and sets its properties according to function*	parameters.** INPUT:*	ETH_PORT 	eth_port_num      Port number.*	unsigned char uc_nibble		Unicast MAC Address last nibble.*	ETH_QUEUE 		 queue		Rx queue number for this MAC address.*	int 			option      0 = Add, 1 = remove address.** OUTPUT:*	This function add/removes MAC addresses from the port unicast address*	table.** RETURN:*	true is output succeeded.*	false if option parameter is invalid.********************************************************************************/static bool eth_port_uc_addr (ETH_PORT eth_port_num,			      unsigned char uc_nibble,			      ETH_QUEUE queue, int option){	unsigned int unicast_reg;	unsigned int tbl_offset;	unsigned int reg_offset;	/* Locate the Unicast table entry */	uc_nibble = (0xf & uc_nibble);	tbl_offset = (uc_nibble / 4) * 4;	/* Register offset from unicast table base */	reg_offset = uc_nibble % 4;	/* Entry offset within the above register */	switch (option) {	case REJECT_MAC_ADDR:		/* Clear accepts frame bit at specified unicast DA table entry */		unicast_reg =			MV_REG_READ ((MV64360_ETH_DA_FILTER_UNICAST_TABLE_BASE				      (eth_port_num)				      + tbl_offset));		unicast_reg &= (0x0E << (8 * reg_offset));		MV_REG_WRITE ((MV64360_ETH_DA_FILTER_UNICAST_TABLE_BASE			       (eth_port_num)			       + tbl_offset), unicast_reg);		break;	case ACCEPT_MAC_ADDR:		/* Set accepts frame bit at unicast DA filter table entry */		unicast_reg =			MV_REG_READ ((MV64360_ETH_DA_FILTER_UNICAST_TABLE_BASE				      (eth_port_num)				      + tbl_offset));		unicast_reg |= ((0x01 | queue) << (8 * reg_offset));		MV_REG_WRITE ((MV64360_ETH_DA_FILTER_UNICAST_TABLE_BASE			       (eth_port_num)			       + tbl_offset), unicast_reg);		break;	default:		return false;	}	return true;}#if 0				/* FIXME *//******************************************************************************** eth_port_mc_addr - Multicast address settings.** DESCRIPTION:*	This API controls the MV device MAC multicast support.*	The MV device supports multicast using two tables:*	1) Special Multicast Table for MAC addresses of the form*	   0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_fF).*	   The MAC DA[7:0] bits are used as a pointer to the Special Multicast*	   Table entries in the DA-Filter table.*	   In this case, the function calls eth_port_smc_addr() routine to set the*	   Special Multicast Table.*	2) Other Multicast Table for multicast of another type. A CRC-8bit*	   is used as an index to the Other Multicast Table entries in the*	   DA-Filter table.*	   In this case, the function calculates the CRC-8bit value and calls*	   eth_port_omc_addr() routine to set the Other Multicast Table.* INPUT:*	ETH_PORT 	eth_port_num      Port number.*	unsigned char 	*p_addr		Unicast MAC Address.*	ETH_QUEUE 		 queue		Rx queue number for this MAC address.*	int 			option      0 = Add, 1 = remove address.** OUTPUT:*	See description.** RETURN:*	true is output succeeded.*	false if add_address_table_entry( ) failed.********************************************************************************/static void eth_port_mc_addr (ETH_PORT eth_port_num,			      unsigned char *p_addr,			      ETH_QUEUE queue, int option){	unsigned int mac_h;	unsigned int mac_l;	unsigned char crc_result = 0;	int mac_array[48];	int crc[8];	int i;	if ((p_addr[0] == 0x01) &&	    (p_addr[1] == 0x00) &&	    (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00))		eth_port_smc_addr (eth_port_num, p_addr[5], queue, option);	else {		/* Calculate CRC-8 out of the given address */		mac_h = (p_addr[0] << 8) | (p_addr[1]);		mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |			(p_addr[4] << 8) | (p_addr[5] << 0);		for (i = 0; i < 32; i++)			mac_array[i] = (mac_l >> i) & 0x1;		for (i = 32; i < 48; i++)			mac_array[i] = (mac_h >> (i - 32)) & 0x1;		crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^			mac_array[39] ^ mac_array[35] ^ mac_array[34] ^			mac_array[31] ^ mac_array[30] ^ mac_array[28] ^			mac_array[23] ^ mac_array[21] ^ mac_array[19] ^			mac_array[18] ^ mac_array[16] ^ mac_array[14] ^			mac_array[12] ^ mac_array[8] ^ mac_array[7] ^			mac_array[6] ^ mac_array[0];		crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^			mac_array[43] ^ mac_array[41] ^ mac_array[39] ^			mac_array[36] ^ mac_array[34] ^ mac_array[32] ^			mac_array[30] ^ mac_array[29] ^ mac_array[28] ^			mac_array[24] ^ mac_array[23] ^ mac_array[22] ^			mac_array[21] ^ mac_array[20] ^ mac_array[18] ^			mac_array[17] ^ mac_array[16] ^ mac_array[15] ^			mac_array[14] ^ mac_array[13] ^ mac_array[12] ^			mac_array[9] ^ mac_array[6] ^ mac_array[1] ^			mac_array[0];		crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^			mac_array[43] ^ mac_array[42] ^ mac_array[39] ^			mac_array[37] ^ mac_array[34] ^ mac_array[33] ^			mac_array[29] ^ mac_array[28] ^ mac_array[25] ^			mac_array[24] ^ mac_array[22] ^ mac_array[17] ^			mac_array[15] ^ mac_array[13] ^ mac_array[12] ^			mac_array[10] ^ mac_array[8] ^ mac_array[6] ^			mac_array[2] ^ mac_array[1] ^ mac_array[0];		crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^			mac_array[43] ^ mac_array[40] ^ mac_array[38] ^			mac_array[35] ^ mac_array[34] ^ mac_array[30] ^			mac_array[29] ^ mac_array[26] ^ mac_array[25] ^			mac_array[23] ^ mac_array[18] ^ mac_array[16] ^			mac_array[14] ^ mac_array[13] ^ mac_array[11] ^			mac_array[9] ^ mac_array[7] ^ mac_array[3] ^			mac_array[2] ^ mac_array[1];		crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^			mac_array[41] ^ mac_array[39] ^ mac_array[36] ^			mac_array[35] ^ mac_array[31] ^ mac_array[30] ^			mac_array[27] ^ mac_array[26] ^ mac_array[24] ^			mac_array[19] ^ mac_array[17] ^ mac_array[15] ^			mac_array[14] ^ mac_array[12] ^ mac_array[10] ^			mac_array[8] ^ mac_array[4] ^ mac_array[3] ^			mac_array[2];		crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^			mac_array[42] ^ mac_array[40] ^ mac_array[37] ^			mac_array[36] ^ mac_array[32] ^ mac_array[31] ^			mac_array[28] ^ mac_array[27] ^ mac_array[25] ^			mac_array[20] ^ mac_array[18] ^ mac_array[16] ^			mac_array[15] ^ mac_array[13] ^ mac_array[11] ^			mac_array[9] ^ mac_array[5] ^ mac_array[4] ^			mac_array[3];		crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^			mac_array[41] ^ mac_array[38] ^ mac_array[37] ^			mac_array[33] ^ mac_array[32] ^ mac_array[29] ^			mac_array[28] ^ mac_array[26] ^ mac_array[21] ^			mac_array[19] ^ mac_array[17] ^ mac_array[16] ^			mac_array[14] ^ mac_array[12] ^ mac_array[10] ^			mac_array[6] ^ mac_array[5] ^ mac_array[4];		crc[7] = mac_array[47] ^ mac_array[44] ^ mac_array[42] ^			mac_array[39] ^ mac_array[38] ^ mac_array[34] ^			mac_array[33] ^ mac_array[30] ^ mac_array[29] ^			mac_array[27] ^ mac_array[22] ^ mac_array[20] ^			mac_array[18] ^ mac_array[17] ^ mac_array[15] ^			mac_array[13] ^ mac_array[11] ^ mac_array[7] ^			mac_array[6] ^ mac_array[5];		for (i = 0; i < 8; i++)			crc_result = crc_result | (crc[i] << i);		eth_port_omc_addr (eth_port_num, crc_result, queue, option);	}	return;}/******************************************************************************** eth_port_smc_addr - Special Multicast address settings.** DESCRIPTION:*	This routine controls the MV device special MAC multicast support.*	The Special Multicast Table for MAC addresses supports MAC of the form*	0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_fF).*	The MAC DA[7:0] bits are used as a pointer to the Special Multicast*	Table entries in the DA-Filter table.*	This function set the Special Multicast Table appropriate entry*	according to the argument given.** INPUT:*	ETH_PORT 	eth_port_num      Port number.*	unsigned char 	mc_byte		Multicast addr last byte (MAC DA[7:0] bits).*	ETH_QUEUE 		 queue		Rx queue number for this MAC address.*	int 			option      0 = Add, 1 = remove address.** OUTPUT:*	See description.** RETURN:*	true is output succeeded.*	false if option parameter is invalid.********************************************************************************/static bool eth_port_smc_addr (ETH_PORT eth_port_num,			       unsigned char mc_byte,			       ETH_QUEUE queue, int option){	unsigned int smc_table_reg;	unsigned int tbl_offset;	unsigned int reg_offset;	/* Locate the SMC table entry */	tbl_offset = (mc_byte / 4) * 4;	/* Register offset from SMC table base */	reg_offset = mc_byte % 4;	/* Entry offset within the above register */	queue &= 0x7;	switch (option) {	case REJECT_MAC_ADDR:		/* Clear accepts frame bit at specified Special DA table entry */		smc_table_reg =			MV_REG_READ ((MV64360_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE (eth_port_num) + tbl_offset));		smc_table_reg &= (0x0E << (8 * reg_offset));		MV_REG_WRITE ((MV64360_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BAS

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区视频| 国产精品白丝jk黑袜喷水| ...xxx性欧美| 国产精品乱码妇女bbbb| 欧美韩国日本一区| 欧美国产日韩a欧美在线观看 | 中文av一区特黄| 国产午夜精品理论片a级大结局 | 亚洲成人精品一区二区| 又紧又大又爽精品一区二区| 亚洲精品老司机| 午夜视频在线观看一区二区| 日精品一区二区| 精品综合久久久久久8888| 国产剧情一区在线| aa级大片欧美| 精品视频一区二区三区免费| 日韩视频免费观看高清完整版在线观看 | 国产精品丝袜黑色高跟| 亚洲视频狠狠干| 午夜精品久久久久久久蜜桃app| 日韩**一区毛片| 国产a级毛片一区| 在线免费一区三区| 欧美大片日本大片免费观看| 欧美高清在线精品一区| 亚洲在线观看免费| 久久不见久久见免费视频1| 波多野结衣精品在线| 国产寡妇亲子伦一区二区| 不卡的av电影在线观看| 欧美日韩夫妻久久| 国产视频亚洲色图| 日韩精品91亚洲二区在线观看| 久久精品国产99| 9色porny自拍视频一区二区| 欧美精品黑人性xxxx| 中文字幕乱码亚洲精品一区 | 久久成人精品无人区| 国产成人av电影| 91久久精品一区二区三| 精品第一国产综合精品aⅴ| 国产精品黄色在线观看| 男女性色大片免费观看一区二区| 国产高清不卡二三区| 8v天堂国产在线一区二区| 亚洲欧洲另类国产综合| 精品在线视频一区| 欧美三级电影在线看| 国产精品成人网| 国产成人在线电影| 日韩一区二区三区高清免费看看| 综合中文字幕亚洲| 国产精品综合二区| 欧美大片日本大片免费观看| 亚洲午夜在线视频| 99久久久久久99| 日本一区二区三区四区| 精品在线免费观看| 制服丝袜国产精品| 日韩国产在线一| 欧美在线观看视频一区二区三区| 国产精品每日更新| av动漫一区二区| 国产清纯白嫩初高生在线观看91| 久久99精品久久只有精品| 欧美浪妇xxxx高跟鞋交| 一区二区三区中文字幕| 色94色欧美sute亚洲13| 亚洲欧美在线观看| 99麻豆久久久国产精品免费 | 色婷婷亚洲综合| 亚洲视频1区2区| 色婷婷av一区| 有码一区二区三区| 欧美三级蜜桃2在线观看| 亚洲成人1区2区| 在线成人免费视频| 美女一区二区视频| 精品欧美乱码久久久久久1区2区 | 国产午夜精品一区二区三区嫩草 | 91黄视频在线观看| 亚洲国产综合色| 欧美片网站yy| 免费观看在线色综合| 精品国产一区二区三区av性色 | 欧美色网一区二区| 亚洲国产日韩精品| 日韩欧美的一区二区| 精品一区二区三区在线观看国产| 欧美电视剧在线观看完整版| 国产成人亚洲综合a∨猫咪| 国产欧美一区二区精品秋霞影院| 成人av影视在线观看| 亚洲精品国产高清久久伦理二区| 欧美日韩你懂的| 久久疯狂做爰流白浆xx| 国产精品视频yy9299一区| 色哟哟日韩精品| 青青草视频一区| 欧美高清在线一区| 欧美高清激情brazzers| 国产传媒久久文化传媒| 一区av在线播放| 精品久久久久久久久久久久久久久| 国产精品一二三| 亚洲一区二区在线播放相泽| 91精品麻豆日日躁夜夜躁| 国产乱理伦片在线观看夜一区| 成人欧美一区二区三区白人| 欧美日韩国产123区| 国产精品一区二区久久不卡| 亚洲精品久久7777| 久久久久国产精品免费免费搜索| www.日韩精品| 精品在线你懂的| 午夜一区二区三区在线观看| 26uuu成人网一区二区三区| 91福利资源站| 国产精品羞羞答答xxdd| 午夜久久电影网| 中文字幕亚洲成人| 日韩欧美视频一区| 91免费看`日韩一区二区| 激情五月婷婷综合网| 亚洲国产精品久久艾草纯爱| 中文字幕日韩精品一区| 久久先锋影音av| 欧美一区二区在线免费播放| 91福利在线免费观看| 懂色av噜噜一区二区三区av| 免费黄网站欧美| 亚洲一卡二卡三卡四卡无卡久久 | 欧美群妇大交群中文字幕| 成人福利视频在线看| 久久国内精品自在自线400部| 亚洲观看高清完整版在线观看| 国产精品乱人伦中文| 国产三级久久久| 久久综合一区二区| 日韩一区二区三区四区| 欧美一区二区三区视频免费播放| 91久久精品一区二区| 色久综合一二码| 一本色道亚洲精品aⅴ| 99国产精品国产精品毛片| 粉嫩aⅴ一区二区三区四区五区| 国产在线精品免费| 黄色资源网久久资源365| 久久99精品国产91久久来源| 捆绑调教一区二区三区| 久久国产精品免费| 久久99久久99| 国产suv精品一区二区6| 成人午夜碰碰视频| a美女胸又www黄视频久久| 成人av在线观| 在线观看av一区二区| 欧美日韩国产小视频在线观看| 欧美日韩免费电影| 日韩欧美在线影院| 精品久久人人做人人爱| 久久先锋影音av| 中文字幕一区二区三区不卡| 亚洲天堂av老司机| 亚洲国产精品麻豆| 老司机午夜精品| 国产高清精品网站| 色哟哟日韩精品| 欧美一区二区日韩| 久久午夜国产精品| 国产精品国产精品国产专区不片| 亚洲精品欧美在线| 麻豆中文一区二区| 国产成人福利片| 在线视频你懂得一区| 日韩美女在线视频| 亚洲视频一区二区在线观看| 一区二区成人在线视频| 免费久久精品视频| 99久久精品国产观看| 欧美精品亚洲二区| 久久精品男人天堂av| 亚洲激情在线播放| 蜜臀av国产精品久久久久 | 亚洲日本va午夜在线电影| 五月婷婷综合激情| 成人免费视频网站在线观看| 欧美性色aⅴ视频一区日韩精品| 日韩欧美在线一区二区三区| 亚洲天堂免费看| 国产老妇另类xxxxx| 欧美天天综合网| 国产精品嫩草99a| 日韩中文字幕不卡| 94色蜜桃网一区二区三区| 欧美v日韩v国产v| 亚洲综合一区二区| 福利一区二区在线观看| 欧美一区二区三区在线观看视频|