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

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

?? mv_eth.c

?? AT9260的BOOTLOADER,還有幾個版本的,需要的我再放
?? 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_BASE (eth_port_num) + tbl

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区视频 | 91首页免费视频| 91欧美一区二区| 欧美日韩美少妇| 欧美精品一区二区高清在线观看| 国产日本欧洲亚洲| 一区二区三区 在线观看视频| 日韩高清在线电影| 懂色av中文字幕一区二区三区 | 亚洲国产一区在线观看| 日韩精品1区2区3区| 国产精品一区在线观看乱码 | 亚洲国产视频a| 精品午夜一区二区三区在线观看| 成人av在线资源网站| 欧美日韩国产免费| 国产欧美一区二区在线| 香蕉影视欧美成人| 国产成人午夜99999| 欧美日韩国产综合视频在线观看| 久久嫩草精品久久久精品| 亚洲国产人成综合网站| 国产乱码精品一区二区三区忘忧草 | 亚洲天天做日日做天天谢日日欢| 亚洲妇女屁股眼交7| 国产成人av网站| 欧美性videosxxxxx| 国产午夜精品在线观看| 亚洲一级电影视频| 高清不卡一区二区| 日韩一级二级三级精品视频| 亚洲色图视频网| 国内精品在线播放| 欧美日韩一级二级| 国产精品国产三级国产aⅴ中文| 日本美女视频一区二区| 97久久超碰精品国产| 精品国产1区二区| 日韩一区精品视频| 色婷婷综合久久久久中文一区二区| 精品成a人在线观看| 污片在线观看一区二区| 99久久综合99久久综合网站| 久久久久88色偷偷免费| 欧美96一区二区免费视频| 在线看国产一区| 成人欧美一区二区三区小说| 国产精品一区二区你懂的| 欧美一级高清片在线观看| 亚洲一区国产视频| 在线亚洲一区二区| 亚洲色图清纯唯美| av动漫一区二区| 国产精品沙发午睡系列990531| 久久国产精品99精品国产 | 美女www一区二区| 欧美日韩五月天| 一区二区理论电影在线观看| aaa欧美日韩| 国产精品久久毛片| 高清不卡在线观看av| 国产免费成人在线视频| 国产成人综合在线| 久久久国产午夜精品| 激情偷乱视频一区二区三区| 日韩精品一区二区三区中文不卡 | 欧美一区二区啪啪| 天堂久久一区二区三区| 欧美日本在线看| 日韩专区中文字幕一区二区| 欧美精品777| 三级一区在线视频先锋| 6080日韩午夜伦伦午夜伦| 视频一区二区国产| 91精品国产麻豆| 欧美一区二区不卡视频| 美女精品一区二区| 久久午夜色播影院免费高清 | 国产精品亲子乱子伦xxxx裸| 成人听书哪个软件好| 国产精品素人视频| 成人丝袜18视频在线观看| 国产精品久久久久久久久免费丝袜| 成人丝袜18视频在线观看| 亚洲品质自拍视频网站| 在线精品视频一区二区三四| 亚洲成人精品在线观看| 欧美一区二区三区白人 | 国产精品毛片无遮挡高清| 成人精品gif动图一区| 亚洲青青青在线视频| 欧美日韩卡一卡二| 久久国产综合精品| 欧美激情一区二区| 97精品视频在线观看自产线路二| 尤物av一区二区| 欧美手机在线视频| 极品少妇xxxx精品少妇| 日本一区二区免费在线| 91老师片黄在线观看| 五月天激情综合| 欧美精品一区视频| 色综合色综合色综合| 亚洲不卡av一区二区三区| 日韩精品一区二区三区蜜臀| 国产99久久精品| 亚洲综合一二区| 日韩免费电影一区| 不卡欧美aaaaa| 亚洲国产精品麻豆| 久久综合久久综合久久| 99精品偷自拍| 免费欧美高清视频| 欧美国产一区二区在线观看| 欧美日韩专区在线| 欧美sm美女调教| 波多野洁衣一区| 日日欢夜夜爽一区| 欧美激情综合网| 欧美日韩国产高清一区二区| 国产精品综合二区| 亚洲制服欧美中文字幕中文字幕| 欧美成人精品高清在线播放| 91麻豆产精品久久久久久| 免费观看成人av| 中文字幕亚洲欧美在线不卡| 3atv一区二区三区| aaa欧美大片| 激情久久五月天| 亚洲国产精品视频| 国产精品久久久久久久久久久免费看 | 欧美国产激情二区三区| 欧美日韩成人综合天天影院| 粉嫩一区二区三区在线看| 午夜一区二区三区在线观看| 国产午夜亚洲精品羞羞网站| 欧美日韩精品一区二区| 高清久久久久久| 奇米精品一区二区三区在线观看一 | 日韩国产欧美视频| 中文字幕在线观看一区| 日韩亚洲欧美综合| 在线视频一区二区三区| 国产乱码精品一区二区三| 亚洲h精品动漫在线观看| 国产精品久久久久久久久果冻传媒 | 亚洲一区二区三区在线看| 国产欧美日韩亚州综合| 欧美一级在线视频| 在线视频一区二区免费| caoporn国产精品| 国产乱码精品一品二品| 日韩综合一区二区| 亚洲国产精品一区二区www | 色哟哟一区二区| 国产成人免费视| 精品在线播放免费| 三级欧美韩日大片在线看| 亚洲精品国产高清久久伦理二区 | 91社区在线播放| 国产福利精品导航| 裸体健美xxxx欧美裸体表演| 亚洲不卡av一区二区三区| 亚洲日本一区二区三区| 中文文精品字幕一区二区| 久久女同性恋中文字幕| 久久综合中文字幕| 日韩欧美一二三区| 91精品欧美综合在线观看最新| 色老综合老女人久久久| 97精品国产97久久久久久久久久久久| 久久久青草青青国产亚洲免观| 欧美一区二区三区视频免费播放| 欧美色窝79yyyycom| 欧洲人成人精品| 色综合天天综合网国产成人综合天| 国产69精品一区二区亚洲孕妇 | 国产精品拍天天在线| 国产欧美日韩视频一区二区| 久久精品人人做人人综合| 精品福利一二区| 久久亚区不卡日本| 久久亚洲一区二区三区明星换脸 | 成人三级在线视频| 国产成人精品午夜视频免费| 国产成人综合亚洲网站| 丰满少妇在线播放bd日韩电影| 国产精品77777| 高清不卡一区二区在线| 成人性生交大片免费| 91在线精品一区二区| 91污片在线观看| 日本韩国精品一区二区在线观看| 91精品91久久久中77777| 欧洲精品在线观看| 91精品久久久久久久久99蜜臂| 日韩你懂的在线观看| 2024国产精品视频| 国产欧美一区二区精品忘忧草| 中文字幕在线播放不卡一区|