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

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

?? e1000.c

?? U-boot源碼 ARM7啟動代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
			udelay(5);			eecd = E1000_READ_REG(hw, EECD);		}		if (!(eecd & E1000_EECD_GNT)) {			eecd &= ~E1000_EECD_REQ;			E1000_WRITE_REG(hw, EECD, eecd);			DEBUGOUT("Could not acquire EEPROM grant\n");			return FALSE;		}	}	e1000_setup_eeprom(hw);	e1000_shift_out_ee_bits(hw, EEPROM_EWEN_OPCODE, 5);	e1000_shift_out_ee_bits(hw, Reg, (large_eeprom) ? 6 : 4);	e1000_standby_eeprom(hw);	e1000_shift_out_ee_bits(hw, EEPROM_WRITE_OPCODE, 3);	e1000_shift_out_ee_bits(hw, Reg, (large_eeprom) ? 8 : 6);	e1000_shift_out_ee_bits(hw, Data, 16);	if (!e1000_wait_eeprom_done(hw)) {		return FALSE;	}	e1000_shift_out_ee_bits(hw, EEPROM_EWDS_OPCODE, 5);	e1000_shift_out_ee_bits(hw, Reg, (large_eeprom) ? 6 : 4);	e1000_eeprom_cleanup(hw);	/* Stop requesting EEPROM access */	if (hw->mac_type > e1000_82544) {		eecd = E1000_READ_REG(hw, EECD);		eecd &= ~E1000_EECD_REQ;		E1000_WRITE_REG(hw, EECD, eecd);	}	i = 0;	eecd = E1000_READ_REG(hw, EECD);	while (((eecd & E1000_EECD_GNT)) && (i < 500)) {		i++;		udelay(10);		eecd = E1000_READ_REG(hw, EECD);	}	if ((eecd & E1000_EECD_GNT)) {		DEBUGOUT("Could not release EEPROM grant\n");	}	return TRUE;}#endif/****************************************************************************** * Verifies that the EEPROM has a valid checksum * * hw - Struct containing variables accessed by shared code * * Reads the first 64 16 bit words of the EEPROM and sums the values read. * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is * valid. *****************************************************************************/static inte1000_validate_eeprom_checksum(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint16_t checksum = 0;	uint16_t i, eeprom_data;	DEBUGFUNC();	for (i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) {		if (e1000_read_eeprom(hw, i, &eeprom_data) < 0) {			DEBUGOUT("EEPROM Read Error\n");			return -E1000_ERR_EEPROM;		}		checksum += eeprom_data;	}	if (checksum == (uint16_t) EEPROM_SUM) {		return 0;	} else {		DEBUGOUT("EEPROM Checksum Invalid\n");		return -E1000_ERR_EEPROM;	}}#endif /* #ifndef CONFIG_AP1000 *//****************************************************************************** * Reads the adapter's MAC address from the EEPROM and inverts the LSB for the * second function of dual function devices * * nic - Struct containing variables accessed by shared code *****************************************************************************/static inte1000_read_mac_addr(struct eth_device *nic){#ifndef CONFIG_AP1000	struct e1000_hw *hw = nic->priv;	uint16_t offset;	uint16_t eeprom_data;	int i;	DEBUGFUNC();	for (i = 0; i < NODE_ADDRESS_SIZE; i += 2) {		offset = i >> 1;		if (e1000_read_eeprom(hw, offset, &eeprom_data) < 0) {			DEBUGOUT("EEPROM Read Error\n");			return -E1000_ERR_EEPROM;		}		nic->enetaddr[i] = eeprom_data & 0xff;		nic->enetaddr[i + 1] = (eeprom_data >> 8) & 0xff;	}	if ((hw->mac_type == e1000_82546) &&	    (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {		/* Invert the last bit if this is the second device */		nic->enetaddr[5] += 1;	}#else	/*	 * The AP1000's e1000 has no eeprom; the MAC address is stored in the	 * environment variables.  Currently this does not support the addition	 * of a PMC e1000 card, which is certainly a possibility, so this should	 * be updated to properly use the env variable only for the onboard e1000	 */	int ii;	char *s, *e;	DEBUGFUNC();	s = getenv ("ethaddr");	if (s == NULL){		return -E1000_ERR_EEPROM;	}	else{		for(ii = 0; ii < 6; ii++) {			nic->enetaddr[ii] = s ? simple_strtoul (s, &e, 16) : 0;			if (s){				s = (*e) ? e + 1 : e;			}		}	}#endif	return 0;}/****************************************************************************** * Initializes receive address filters. * * hw - Struct containing variables accessed by shared code * * Places the MAC address in receive address register 0 and clears the rest * of the receive addresss registers. Clears the multicast table. Assumes * the receiver is in reset when the routine is called. *****************************************************************************/static voide1000_init_rx_addrs(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t i;	uint32_t addr_low;	uint32_t addr_high;	DEBUGFUNC();	/* Setup the receive address. */	DEBUGOUT("Programming MAC Address into RAR[0]\n");	addr_low = (nic->enetaddr[0] |		    (nic->enetaddr[1] << 8) |		    (nic->enetaddr[2] << 16) | (nic->enetaddr[3] << 24));	addr_high = (nic->enetaddr[4] | (nic->enetaddr[5] << 8) | E1000_RAH_AV);	E1000_WRITE_REG_ARRAY(hw, RA, 0, addr_low);	E1000_WRITE_REG_ARRAY(hw, RA, 1, addr_high);	/* Zero out the other 15 receive addresses. */	DEBUGOUT("Clearing RAR[1-15]\n");	for (i = 1; i < E1000_RAR_ENTRIES; i++) {		E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0);		E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0);	}}/****************************************************************************** * Clears the VLAN filer table * * hw - Struct containing variables accessed by shared code *****************************************************************************/static voide1000_clear_vfta(struct e1000_hw *hw){	uint32_t offset;	for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++)		E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0);}/****************************************************************************** * Set the mac type member in the hw struct. * * hw - Struct containing variables accessed by shared code *****************************************************************************/static inte1000_set_mac_type(struct e1000_hw *hw){	DEBUGFUNC();	switch (hw->device_id) {	case E1000_DEV_ID_82542:		switch (hw->revision_id) {		case E1000_82542_2_0_REV_ID:			hw->mac_type = e1000_82542_rev2_0;			break;		case E1000_82542_2_1_REV_ID:			hw->mac_type = e1000_82542_rev2_1;			break;		default:			/* Invalid 82542 revision ID */			return -E1000_ERR_MAC_TYPE;		}		break;	case E1000_DEV_ID_82543GC_FIBER:	case E1000_DEV_ID_82543GC_COPPER:		hw->mac_type = e1000_82543;		break;	case E1000_DEV_ID_82544EI_COPPER:	case E1000_DEV_ID_82544EI_FIBER:	case E1000_DEV_ID_82544GC_COPPER:	case E1000_DEV_ID_82544GC_LOM:		hw->mac_type = e1000_82544;		break;	case E1000_DEV_ID_82540EM:	case E1000_DEV_ID_82540EM_LOM:		hw->mac_type = e1000_82540;		break;	case E1000_DEV_ID_82545EM_COPPER:	case E1000_DEV_ID_82545EM_FIBER:		hw->mac_type = e1000_82545;		break;	case E1000_DEV_ID_82546EB_COPPER:	case E1000_DEV_ID_82546EB_FIBER:		hw->mac_type = e1000_82546;		break;	default:		/* Should never have loaded on this device */		return -E1000_ERR_MAC_TYPE;	}	return E1000_SUCCESS;}/****************************************************************************** * Reset the transmit and receive units; mask and clear all interrupts. * * hw - Struct containing variables accessed by shared code *****************************************************************************/voide1000_reset_hw(struct e1000_hw *hw){	uint32_t ctrl;	uint32_t ctrl_ext;	uint32_t icr;	uint32_t manc;	DEBUGFUNC();	/* For 82542 (rev 2.0), disable MWI before issuing a device reset */	if (hw->mac_type == e1000_82542_rev2_0) {		DEBUGOUT("Disabling MWI on 82542 rev 2.0\n");		pci_write_config_word(hw->pdev, PCI_COMMAND,				      hw->				      pci_cmd_word & ~PCI_COMMAND_INVALIDATE);	}	/* Clear interrupt mask to stop board from generating interrupts */	DEBUGOUT("Masking off all interrupts\n");	E1000_WRITE_REG(hw, IMC, 0xffffffff);	/* Disable the Transmit and Receive units.  Then delay to allow	 * any pending transactions to complete before we hit the MAC with	 * the global reset.	 */	E1000_WRITE_REG(hw, RCTL, 0);	E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP);	E1000_WRITE_FLUSH(hw);	/* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */	hw->tbi_compatibility_on = FALSE;	/* Delay to allow any outstanding PCI transactions to complete before	 * resetting the device	 */	mdelay(10);	/* Issue a global reset to the MAC.  This will reset the chip's	 * transmit, receive, DMA, and link units.  It will not effect	 * the current PCI configuration.  The global reset bit is self-	 * clearing, and should clear within a microsecond.	 */	DEBUGOUT("Issuing a global reset to MAC\n");	ctrl = E1000_READ_REG(hw, CTRL);#if 0	if (hw->mac_type > e1000_82543)		E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));	else#endif		E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST));	/* Force a reload from the EEPROM if necessary */	if (hw->mac_type < e1000_82540) {		/* Wait for reset to complete */		udelay(10);		ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);		ctrl_ext |= E1000_CTRL_EXT_EE_RST;		E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);		E1000_WRITE_FLUSH(hw);		/* Wait for EEPROM reload */		mdelay(2);	} else {		/* Wait for EEPROM reload (it happens automatically) */		mdelay(4);		/* Dissable HW ARPs on ASF enabled adapters */		manc = E1000_READ_REG(hw, MANC);		manc &= ~(E1000_MANC_ARP_EN);		E1000_WRITE_REG(hw, MANC, manc);	}	/* Clear interrupt mask to stop board from generating interrupts */	DEBUGOUT("Masking off all interrupts\n");	E1000_WRITE_REG(hw, IMC, 0xffffffff);	/* Clear any pending interrupt events. */	icr = E1000_READ_REG(hw, ICR);	/* If MWI was previously enabled, reenable it. */	if (hw->mac_type == e1000_82542_rev2_0) {		pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word);	}}/****************************************************************************** * Performs basic configuration of the adapter. * * hw - Struct containing variables accessed by shared code * * Assumes that the controller has previously been reset and is in a * post-reset uninitialized state. Initializes the receive address registers, * multicast table, and VLAN filter table. Calls routines to setup link * configuration and flow control settings. Clears all on-chip counters. Leaves * the transmit and receive units disabled and uninitialized. *****************************************************************************/static inte1000_init_hw(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t ctrl, status;	uint32_t i;	int32_t ret_val;	uint16_t pcix_cmd_word;	uint16_t pcix_stat_hi_word;	uint16_t cmd_mmrbc;	uint16_t stat_mmrbc;	e1000_bus_type bus_type = e1000_bus_type_unknown;	DEBUGFUNC();#if 0	/* Initialize Identification LED */	ret_val = e1000_id_led_init(hw);	if (ret_val < 0) {		DEBUGOUT("Error Initializing Identification LED\n");		return ret_val;	}#endif	/* Set the Media Type and exit with error if it is not valid. */	if (hw->mac_type != e1000_82543) {		/* tbi_compatibility is only valid on 82543 */		hw->tbi_compatibility_en = FALSE;	}	if (hw->mac_type >= e1000_82543) {		status = E1000_READ_REG(hw, STATUS);		if (status & E1000_STATUS_TBIMODE) {			hw->media_type = e1000_media_type_fiber;			/* tbi_compatibility not valid on fiber */			hw->tbi_compatibility_en = FALSE;		} else {			hw->media_type = e1000_media_type_copper;		}	} else {		/* This is an 82542 (fiber only) */		hw->media_type = e1000_media_type_fiber;	}	/* Disabling VLAN filtering. */	DEBUGOUT("Initializing the IEEE VLAN\n");	E1000_WRITE_REG(hw, VET, 0);	e1000_clear_vfta(hw);	/* For 82542 (rev 2.0), disable MWI and put the receiver into reset */	if (hw->mac_type == e1000_82542_rev2_0) {		DEBUGOUT("Disabling MWI on 82542 rev 2.0\n");		pci_write_config_word(hw->pdev, PCI_COMMAND,				      hw->				      pci_cmd_word & ~PCI_COMMAND_INVALIDATE);		E1000_WRITE_REG(hw, RCTL, E1000_RCTL_RST);		E1000_WRITE_FLUSH(hw);		mdelay(5);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情综合色综合久久综合| 亚洲黄色免费网站| 男人的j进女人的j一区| 欧美一区二区三区婷婷月色 | 日韩视频永久免费| 日本不卡一区二区| 精品免费国产一区二区三区四区| 久久国产精品第一页| 久久综合给合久久狠狠狠97色69| 国产乱码精品一区二区三区忘忧草 | 国产精品每日更新| 一本久久精品一区二区| 亚洲成av人片| 久久综合色之久久综合| 国产凹凸在线观看一区二区| 中文字幕亚洲区| 欧美色网站导航| 久久99精品久久久久| 国产精品乱码一区二三区小蝌蚪| 色婷婷av一区二区三区软件 | 欧美疯狂做受xxxx富婆| 久久国产生活片100| 国产精品日韩成人| 欧美中文字幕久久| 久久99热99| 亚洲理论在线观看| 精品免费一区二区三区| 91在线观看视频| 日韩极品在线观看| 亚洲国产精华液网站w| 欧美日本韩国一区二区三区视频| 另类欧美日韩国产在线| 国产精品久久久久天堂| 91精品国模一区二区三区| 国产寡妇亲子伦一区二区| 亚洲一区二区三区不卡国产欧美| 日韩免费观看高清完整版在线观看| 国产成人aaaa| 免费人成在线不卡| 亚洲少妇屁股交4| 久久久久久久av麻豆果冻| 色狠狠一区二区三区香蕉| 狠狠色丁香久久婷婷综| 亚洲最新视频在线播放| 欧美经典一区二区| 亚洲精品一区二区三区99| 91电影在线观看| 国产成人在线观看免费网站| 青娱乐精品视频| 亚洲自拍偷拍欧美| 综合久久综合久久| 国产欧美一区二区精品久导航| 欧美日本乱大交xxxxx| 91蜜桃传媒精品久久久一区二区| 久久国产三级精品| 奇米综合一区二区三区精品视频| 亚洲日本中文字幕区| 久久精品免视看| 日韩欧美卡一卡二| 欧美三级视频在线| 91久久久免费一区二区| av电影一区二区| 国产成人精品亚洲午夜麻豆| 免费人成网站在线观看欧美高清| 亚洲一二三区不卡| 一区二区三区欧美亚洲| 国产精品欧美一区二区三区| 久久久国产精品不卡| 精品美女在线播放| 精品国产髙清在线看国产毛片| 欧美日韩一级大片网址| 91在线精品一区二区三区| 国产福利91精品一区二区三区| 久草在线在线精品观看| 青青草一区二区三区| 亚洲成av人影院在线观看网| 午夜视频在线观看一区二区 | 午夜精品一区二区三区免费视频| 亚洲欧美日韩国产一区二区三区 | 一区二区三区四区乱视频| 国产精品成人一区二区艾草| 中文av一区二区| 国产精品福利一区| 日韩毛片视频在线看| 亚洲美女电影在线| 一区二区三区在线看| 亚洲综合图片区| 午夜欧美一区二区三区在线播放| 日韩精品免费专区| 亚洲一区二区三区国产| 日韩不卡手机在线v区| 日本不卡一区二区| 国产伦精一区二区三区| 成人av小说网| 欧美午夜精品久久久久久孕妇| 欧美日韩不卡在线| 日韩一区二区免费在线观看| 欧美大片顶级少妇| 国产午夜精品理论片a级大结局 | 国产人久久人人人人爽| 中文字幕精品在线不卡| 亚洲欧美日韩小说| 亚洲www啪成人一区二区麻豆| 奇米四色…亚洲| 粉嫩蜜臀av国产精品网站| 91麻豆文化传媒在线观看| 欧亚洲嫩模精品一区三区| 日韩一级大片在线| 中文字幕乱码久久午夜不卡| 一区二区在线观看视频 | 亚洲三级在线免费| 首页国产欧美日韩丝袜| 韩国女主播成人在线| 成人av动漫在线| 欧美一卡二卡在线观看| 中文字幕免费不卡| 日韩国产成人精品| 成人h精品动漫一区二区三区| 欧美日韩国产一区二区三区地区| 精品成人一区二区| 亚洲精品久久久蜜桃| 久久99蜜桃精品| 91久久精品一区二区| 精品国产网站在线观看| 亚洲少妇中出一区| 国产一区久久久| 色久综合一二码| 日本一区二区三区在线观看| 亚洲成a人v欧美综合天堂| 国产成人av电影在线观看| 欧美日韩日日夜夜| 日韩伦理电影网| 另类成人小视频在线| 欧美色精品在线视频| 国产精品私房写真福利视频| 日本午夜精品一区二区三区电影 | 在线观看一区不卡| 久久精品亚洲乱码伦伦中文| 亚洲成国产人片在线观看| 99在线热播精品免费| 精品国产污网站| 日本人妖一区二区| 欧美曰成人黄网| 亚洲色图19p| gogo大胆日本视频一区| 久久亚洲私人国产精品va媚药| 亚洲chinese男男1069| 91蝌蚪国产九色| 国产精品视频第一区| 国产激情91久久精品导航| 精品国产一区二区在线观看| 午夜a成v人精品| 欧美三级视频在线| 一区二区三区免费网站| 99国产麻豆精品| 国产精品嫩草影院com| 国产乱码精品一品二品| 日韩美女视频一区二区在线观看| 亚洲成av人影院在线观看网| 欧美优质美女网站| 亚洲精品免费播放| 99re成人精品视频| 18欧美亚洲精品| av影院午夜一区| 亚洲区小说区图片区qvod| av网站一区二区三区| 亚洲三级久久久| 色综合中文字幕国产| 亚洲视频在线一区观看| eeuss影院一区二区三区| 国产精品久久久久9999吃药| 处破女av一区二区| 亚洲色图制服丝袜| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产精品短视频| 成人avav影音| 亚洲麻豆国产自偷在线| 欧美少妇一区二区| 天天综合网 天天综合色| 91精品国产色综合久久不卡电影 | 国产婷婷精品av在线| 国产精品一区一区三区| 久久久精品国产99久久精品芒果 | 色婷婷综合五月| 亚洲激情在线播放| 欧美性色aⅴ视频一区日韩精品| 亚洲成av人片一区二区三区| 欧美高清dvd| 国产精品一区二区免费不卡| 中文字幕乱码亚洲精品一区| 91色婷婷久久久久合中文| 一区二区三区免费看视频| 欧美电视剧在线看免费| 国产福利一区二区三区在线视频| 中文字幕欧美一| 欧美日韩的一区二区| 国产精品自拍网站| 亚洲女同一区二区| 精品国产一区二区三区久久久蜜月| 国产成人免费视频精品含羞草妖精 |