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

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

?? e1000.c

?? u-boot-1.1.6 源碼包
?? C
?? 第 1 頁 / 共 5 頁
字號:
	/* Setup the receive address. This involves initializing all of the Receive	 * Address Registers (RARs 0 - 15).	 */	e1000_init_rx_addrs(nic);	/* For 82542 (rev 2.0), take the receiver out of reset and enable MWI */	if (hw->mac_type == e1000_82542_rev2_0) {		E1000_WRITE_REG(hw, RCTL, 0);		E1000_WRITE_FLUSH(hw);		mdelay(1);		pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word);	}	/* Zero out the Multicast HASH table */	DEBUGOUT("Zeroing the MTA\n");	for (i = 0; i < E1000_MC_TBL_SIZE; i++)		E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);#if 0	/* Set the PCI priority bit correctly in the CTRL register.  This	 * determines if the adapter gives priority to receives, or if it	 * gives equal priority to transmits and receives.	 */	if (hw->dma_fairness) {		ctrl = E1000_READ_REG(hw, CTRL);		E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PRIOR);	}#endif	if (hw->mac_type >= e1000_82543) {		status = E1000_READ_REG(hw, STATUS);		bus_type = (status & E1000_STATUS_PCIX_MODE) ?		    e1000_bus_type_pcix : e1000_bus_type_pci;	}	/* Workaround for PCI-X problem when BIOS sets MMRBC incorrectly. */	if (bus_type == e1000_bus_type_pcix) {		pci_read_config_word(hw->pdev, PCIX_COMMAND_REGISTER,				     &pcix_cmd_word);		pci_read_config_word(hw->pdev, PCIX_STATUS_REGISTER_HI,				     &pcix_stat_hi_word);		cmd_mmrbc =		    (pcix_cmd_word & PCIX_COMMAND_MMRBC_MASK) >>		    PCIX_COMMAND_MMRBC_SHIFT;		stat_mmrbc =		    (pcix_stat_hi_word & PCIX_STATUS_HI_MMRBC_MASK) >>		    PCIX_STATUS_HI_MMRBC_SHIFT;		if (stat_mmrbc == PCIX_STATUS_HI_MMRBC_4K)			stat_mmrbc = PCIX_STATUS_HI_MMRBC_2K;		if (cmd_mmrbc > stat_mmrbc) {			pcix_cmd_word &= ~PCIX_COMMAND_MMRBC_MASK;			pcix_cmd_word |= stat_mmrbc << PCIX_COMMAND_MMRBC_SHIFT;			pci_write_config_word(hw->pdev, PCIX_COMMAND_REGISTER,					      pcix_cmd_word);		}	}	/* Call a subroutine to configure the link and setup flow control. */	ret_val = e1000_setup_link(nic);	/* Set the transmit descriptor write-back policy */	if (hw->mac_type > e1000_82544) {		ctrl = E1000_READ_REG(hw, TXDCTL);		ctrl =		    (ctrl & ~E1000_TXDCTL_WTHRESH) |		    E1000_TXDCTL_FULL_TX_DESC_WB;		E1000_WRITE_REG(hw, TXDCTL, ctrl);	}#if 0	/* Clear all of the statistics registers (clear on read).  It is	 * important that we do this after we have tried to establish link	 * because the symbol error count will increment wildly if there	 * is no link.	 */	e1000_clear_hw_cntrs(hw);#endif	return ret_val;}/****************************************************************************** * Configures flow control and link settings. * * hw - Struct containing variables accessed by shared code * * Determines which flow control settings to use. Calls the apropriate media- * specific link configuration function. Configures the flow control settings. * Assuming the adapter has a valid link partner, a valid link should be * established. Assumes the hardware has previously been reset and the * transmitter and receiver are not enabled. *****************************************************************************/static inte1000_setup_link(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t ctrl_ext;	int32_t ret_val;	uint16_t eeprom_data;	DEBUGFUNC();#ifndef CONFIG_AP1000	/* Read and store word 0x0F of the EEPROM. This word contains bits	 * that determine the hardware's default PAUSE (flow control) mode,	 * a bit that determines whether the HW defaults to enabling or	 * disabling auto-negotiation, and the direction of the	 * SW defined pins. If there is no SW over-ride of the flow	 * control setting, then the variable hw->fc will	 * be initialized based on a value in the EEPROM.	 */	if (e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, &eeprom_data) < 0) {		DEBUGOUT("EEPROM Read Error\n");		return -E1000_ERR_EEPROM;	}#else	/* we have to hardcode the proper value for our hardware. */	/* this value is for the 82540EM pci card used for prototyping, and it works. */	eeprom_data = 0xb220;#endif	if (hw->fc == e1000_fc_default) {		if ((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == 0)			hw->fc = e1000_fc_none;		else if ((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) ==			 EEPROM_WORD0F_ASM_DIR)			hw->fc = e1000_fc_tx_pause;		else			hw->fc = e1000_fc_full;	}	/* We want to save off the original Flow Control configuration just	 * in case we get disconnected and then reconnected into a different	 * hub or switch with different Flow Control capabilities.	 */	if (hw->mac_type == e1000_82542_rev2_0)		hw->fc &= (~e1000_fc_tx_pause);	if ((hw->mac_type < e1000_82543) && (hw->report_tx_early == 1))		hw->fc &= (~e1000_fc_rx_pause);	hw->original_fc = hw->fc;	DEBUGOUT("After fix-ups FlowControl is now = %x\n", hw->fc);	/* Take the 4 bits from EEPROM word 0x0F that determine the initial	 * polarity value for the SW controlled pins, and setup the	 * Extended Device Control reg with that info.	 * This is needed because one of the SW controlled pins is used for	 * signal detection.  So this should be done before e1000_setup_pcs_link()	 * or e1000_phy_setup() is called.	 */	if (hw->mac_type == e1000_82543) {		ctrl_ext = ((eeprom_data & EEPROM_WORD0F_SWPDIO_EXT) <<			    SWDPIO__EXT_SHIFT);		E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext);	}	/* Call the necessary subroutine to configure the link. */	ret_val = (hw->media_type == e1000_media_type_fiber) ?	    e1000_setup_fiber_link(nic) : e1000_setup_copper_link(nic);	if (ret_val < 0) {		return ret_val;	}	/* Initialize the flow control address, type, and PAUSE timer	 * registers to their default values.  This is done even if flow	 * control is disabled, because it does not hurt anything to	 * initialize these registers.	 */	DEBUGOUT	    ("Initializing the Flow Control address, type and timer regs\n");	E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW);	E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH);	E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE);	E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time);	/* Set the flow control receive threshold registers.  Normally,	 * these registers will be set to a default threshold that may be	 * adjusted later by the driver's runtime code.  However, if the	 * ability to transmit pause frames in not enabled, then these	 * registers will be set to 0.	 */	if (!(hw->fc & e1000_fc_tx_pause)) {		E1000_WRITE_REG(hw, FCRTL, 0);		E1000_WRITE_REG(hw, FCRTH, 0);	} else {		/* We need to set up the Receive Threshold high and low water marks		 * as well as (optionally) enabling the transmission of XON frames.		 */		if (hw->fc_send_xon) {			E1000_WRITE_REG(hw, FCRTL,					(hw->fc_low_water | E1000_FCRTL_XONE));			E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water);		} else {			E1000_WRITE_REG(hw, FCRTL, hw->fc_low_water);			E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water);		}	}	return ret_val;}/****************************************************************************** * Sets up link for a fiber based adapter * * hw - Struct containing variables accessed by shared code * * Manipulates Physical Coding Sublayer functions in order to configure * link. Assumes the hardware has been previously reset and the transmitter * and receiver are not enabled. *****************************************************************************/static inte1000_setup_fiber_link(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t ctrl;	uint32_t status;	uint32_t txcw = 0;	uint32_t i;	uint32_t signal;	int32_t ret_val;	DEBUGFUNC();	/* On adapters with a MAC newer that 82544, SW Defineable pin 1 will be	 * set when the optics detect a signal. On older adapters, it will be	 * cleared when there is a signal	 */	ctrl = E1000_READ_REG(hw, CTRL);	if ((hw->mac_type > e1000_82544) && !(ctrl & E1000_CTRL_ILOS))		signal = E1000_CTRL_SWDPIN1;	else		signal = 0;	printf("signal for %s is %x (ctrl %08x)!!!!\n", nic->name, signal,	       ctrl);	/* Take the link out of reset */	ctrl &= ~(E1000_CTRL_LRST);	e1000_config_collision_dist(hw);	/* Check for a software override of the flow control settings, and setup	 * the device accordingly.  If auto-negotiation is enabled, then software	 * will have to set the "PAUSE" bits to the correct value in the Tranmsit	 * Config Word Register (TXCW) and re-start auto-negotiation.  However, if	 * auto-negotiation is disabled, then software will have to manually	 * configure the two flow control enable bits in the CTRL register.	 *	 * The possible values of the "fc" parameter are:	 *      0:  Flow control is completely disabled	 *      1:  Rx flow control is enabled (we can receive pause frames, but	 *          not send pause frames).	 *      2:  Tx flow control is enabled (we can send pause frames but we do	 *          not support receiving pause frames).	 *      3:  Both Rx and TX flow control (symmetric) are enabled.	 */	switch (hw->fc) {	case e1000_fc_none:		/* Flow control is completely disabled by a software over-ride. */		txcw = (E1000_TXCW_ANE | E1000_TXCW_FD);		break;	case e1000_fc_rx_pause:		/* RX Flow control is enabled and TX Flow control is disabled by a		 * software over-ride. Since there really isn't a way to advertise		 * that we are capable of RX Pause ONLY, we will advertise that we		 * support both symmetric and asymmetric RX PAUSE. Later, we will		 *  disable the adapter's ability to send PAUSE frames.		 */		txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK);		break;	case e1000_fc_tx_pause:		/* TX Flow control is enabled, and RX Flow control is disabled, by a		 * software over-ride.		 */		txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_ASM_DIR);		break;	case e1000_fc_full:		/* Flow control (both RX and TX) is enabled by a software over-ride. */		txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK);		break;	default:		DEBUGOUT("Flow control param set incorrectly\n");		return -E1000_ERR_CONFIG;		break;	}	/* Since auto-negotiation is enabled, take the link out of reset (the link	 * will be in reset, because we previously reset the chip). This will	 * restart auto-negotiation.  If auto-neogtiation is successful then the	 * link-up status bit will be set and the flow control enable bits (RFCE	 * and TFCE) will be set according to their negotiated value.	 */	DEBUGOUT("Auto-negotiation enabled (%#x)\n", txcw);	E1000_WRITE_REG(hw, TXCW, txcw);	E1000_WRITE_REG(hw, CTRL, ctrl);	E1000_WRITE_FLUSH(hw);	hw->txcw = txcw;	mdelay(1);	/* If we have a signal (the cable is plugged in) then poll for a "Link-Up"	 * indication in the Device Status Register.  Time-out if a link isn't	 * seen in 500 milliseconds seconds (Auto-negotiation should complete in	 * less than 500 milliseconds even if the other end is doing it in SW).	 */	if ((E1000_READ_REG(hw, CTRL) & E1000_CTRL_SWDPIN1) == signal) {		DEBUGOUT("Looking for Link\n");		for (i = 0; i < (LINK_UP_TIMEOUT / 10); i++) {			mdelay(10);			status = E1000_READ_REG(hw, STATUS);			if (status & E1000_STATUS_LU)				break;		}		if (i == (LINK_UP_TIMEOUT / 10)) {			/* AutoNeg failed to achieve a link, so we'll call			 * e1000_check_for_link. This routine will force the link up if we			 * detect a signal. This will allow us to communicate with			 * non-autonegotiating link partners.			 */			DEBUGOUT("Never got a valid link from auto-neg!!!\n");			hw->autoneg_failed = 1;			ret_val = e1000_check_for_link(nic);			if (ret_val < 0) {				DEBUGOUT("Error while checking for link\n");				return ret_val;			}			hw->autoneg_failed = 0;		} else {			hw->autoneg_failed = 0;			DEBUGOUT("Valid Link Found\n");		}	} else {		DEBUGOUT("No Signal Detected\n");		return -E1000_ERR_NOLINK;	}	return 0;}/******************************************************************************* Detects which PHY is present and the speed and duplex** hw - Struct containing variables accessed by shared code******************************************************************************/static inte1000_setup_copper_link(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t ctrl;	int32_t ret_val;	uint16_t i;	uint16_t phy_data;	DEBUGFUNC();	ctrl = E1000_READ_REG(hw, CTRL);	/* With 82543, we need to force speed and duplex on the MAC equal to what	 * the PHY speed and duplex configuration is. In addition, we need to	 * perform a hardware reset on the PHY to take it out of reset.	 */	if (hw->mac_type > e1000_82543) {		ctrl |= E1000_CTRL_SLU;		ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);		E1000_WRITE_REG(hw, CTRL, ctrl);	} else {		ctrl |=		    (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX | E1000_CTRL_SLU);		E1000_WRITE_REG(hw, CTRL, ctrl);		e1000_phy_hw_reset(hw);	}	/* Make sure we have a valid PHY */	ret_val = e1000_detect_gig_phy(hw);	if (ret_val < 0) {		DEBUGOUT("Error, did not detect valid phy.\n");		return ret_val;	}	DEBUGOUT("Phy ID = %x \n", hw->phy_id);	/* Enable CRS on TX. This must be set for half-duplex operation. */	if (e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	phy_data |= M88E1000_PSCR_ASSERT_CRS_ON_TX;#if 0	/* Options:	 *   MDI/MDI-X = 0 (default)	 *   0 - Auto for all speeds	 *   1 - MDI mode	 *   2 - MDI-X mode	 *   3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes)	 */	phy_data &= ~M88E1000_PSCR_AUTO_X_MODE;	switch (hw->mdix) {	case 1:		phy_data |= M88E1000_PSCR_MDI_MANUAL_MODE;		break;	case 2:		phy_data |= M88E1000_PSCR_MDIX_MANUAL_MODE;		break;	case 3:		phy_data |= M88E1000_PSCR_AUTO_X_1000T;		break;	case 0:	default:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91超碰这里只有精品国产| 国产成人精品1024| 一区二区三区国产精华| 国产精品全国免费观看高清| 精品成人a区在线观看| 欧美精品高清视频| 欧美一区二区精美| 日韩欧美一二区| 精品国产乱码久久久久久影片| 日韩欧美的一区| 国产日韩欧美一区二区三区乱码| 久久久久久久综合| 国产精品福利电影一区二区三区四区| 中日韩av电影| 一区二区在线免费| 三级欧美在线一区| 日本不卡一区二区三区高清视频| 日韩电影免费一区| 国产酒店精品激情| 成a人片亚洲日本久久| 97se亚洲国产综合自在线不卡| 在线亚洲欧美专区二区| 欧美在线色视频| 欧美一区二区三区不卡| 久久精品一二三| 在线不卡一区二区| 欧美不卡一区二区| 日韩一区有码在线| 亚洲视频电影在线| 日韩专区中文字幕一区二区| 国产精品亚洲午夜一区二区三区| 成人高清视频在线| 欧美一区二区三区精品| 久久综合九色综合97婷婷| 亚洲乱码精品一二三四区日韩在线| 性做久久久久久| 成人av网址在线| 在线成人小视频| 成人欧美一区二区三区1314| 日韩成人一区二区| 91激情五月电影| 国产农村妇女毛片精品久久麻豆| 亚洲成在人线在线播放| 成人午夜伦理影院| 日韩一区二区三区视频在线观看| 亚洲视频在线观看三级| 久久精品国产澳门| 欧美日韩精品系列| 亚洲欧美电影一区二区| 国产精品一级片| 欧美一区二区久久久| 亚洲精品乱码久久久久久| 精品午夜久久福利影院| 成人黄色在线看| 精品美女一区二区| 亚洲成av人在线观看| 丰满岳乱妇一区二区三区| 欧美美女bb生活片| 国产精品日日摸夜夜摸av| 激情综合色综合久久| 日韩情涩欧美日韩视频| 午夜激情综合网| 欧美性受极品xxxx喷水| 国产精品久久久久影院老司| 久久精品国产亚洲aⅴ| 欧美日韩二区三区| 午夜视频久久久久久| 91麻豆精品在线观看| 1024国产精品| 成人精品亚洲人成在线| 欧美国产在线观看| 国产老妇另类xxxxx| 久久色在线观看| 美女网站色91| 日韩亚洲欧美在线观看| 免费成人av在线| 欧美一区二区三区在线观看视频| 国产精品久久久久三级| 国产91高潮流白浆在线麻豆 | 久久毛片高清国产| 亚洲h在线观看| 欧美日韩日日摸| 亚洲一区二区av电影| 91麻豆精东视频| 亚洲欧洲日韩综合一区二区| 国产91高潮流白浆在线麻豆| 国产日韩欧美麻豆| 不卡一区二区三区四区| 国产精品久久久久久久久免费丝袜 | 国产在线视频一区二区| 精品少妇一区二区三区在线播放 | 五月天网站亚洲| 3d动漫精品啪啪一区二区竹菊| 亚洲国产精品综合小说图片区| 日本韩国欧美三级| 亚洲1区2区3区视频| 88在线观看91蜜桃国自产| 美女在线一区二区| 337p日本欧洲亚洲大胆色噜噜| 国产精品亚洲а∨天堂免在线| 国产亚洲欧美日韩日本| av一区二区三区在线| 亚洲影院理伦片| 7777精品伊人久久久大香线蕉超级流畅 | 久久久国际精品| 成人av电影在线网| 综合在线观看色| 91精品综合久久久久久| 国产在线视频精品一区| 中文字幕亚洲一区二区va在线| 91老师片黄在线观看| 免费人成在线不卡| 久久久久久黄色| 欧美日韩国产免费一区二区| 久久99九九99精品| 亚洲蜜臀av乱码久久精品| 91精品免费观看| www..com久久爱| 日韩综合一区二区| 中文字幕一区二区三区不卡在线 | 国产精品久久久久久久蜜臀| 欧美日韩mp4| 成人ar影院免费观看视频| 日本不卡不码高清免费观看| 中文字幕久久午夜不卡| 欧美一级理论片| 99精品视频中文字幕| 捆绑调教美女网站视频一区| 亚洲婷婷综合色高清在线| 欧美www视频| 欧美在线观看视频一区二区三区 | 亚洲自拍偷拍av| 国产午夜亚洲精品不卡 | 国产成人综合亚洲网站| 亚洲国产精品精华液网站| 久久久久久99久久久精品网站| 欧美日韩中文一区| 99久久综合国产精品| 国内成+人亚洲+欧美+综合在线| 亚洲免费在线观看| 中文字幕国产一区二区| 日韩一区二区在线看| 欧美午夜不卡在线观看免费| 粗大黑人巨茎大战欧美成人| 免费视频最近日韩| 亚洲国产成人91porn| 亚洲欧美电影一区二区| 日本一区二区免费在线观看视频| 91精品午夜视频| 欧美福利一区二区| 欧美性受极品xxxx喷水| 91国偷自产一区二区三区成为亚洲经典 | 精品入口麻豆88视频| 欧美一激情一区二区三区| 欧美日韩国产一区| 日本高清无吗v一区| 91在线观看一区二区| 91视视频在线观看入口直接观看www | 国产综合久久久久影院| 久久99精品久久久久久| 天天综合色天天综合色h| 亚洲精品老司机| 一区二区三区国产精华| 亚洲精品中文在线| 综合久久给合久久狠狠狠97色| 欧美激情中文不卡| 久久精品一区二区| 国产精品丝袜久久久久久app| 国产亚洲女人久久久久毛片| 国产午夜精品久久久久久久| 国产网站一区二区三区| 中文成人av在线| 亚洲精品国产一区二区精华液 | 日韩精品在线网站| 欧美哺乳videos| 国产色婷婷亚洲99精品小说| 国产女人18水真多18精品一级做 | 欧美少妇性性性| 91精品国产美女浴室洗澡无遮挡| 精品国产乱子伦一区| 国产精品国产成人国产三级| 一区二区三区四区不卡视频| 亚洲国产日韩a在线播放性色| 午夜精品久久久久久久| 精品一区二区在线观看| 成人高清视频在线| 欧美性受极品xxxx喷水| 精品国产一区二区三区四区四 | 一区二区在线免费| 日韩精品高清不卡| 国产一区二区三区四区五区美女 | 国产女同性恋一区二区| 午夜成人在线视频| 不卡的电影网站| 日韩色在线观看| 一区二区激情视频| 成人动漫一区二区在线| 欧美一级日韩免费不卡| 亚洲欧美另类综合偷拍| 国产黄色成人av|