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

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

?? e1000.c

?? u-boot-1.1.6 源碼包
?? C
?? 第 1 頁 / 共 5 頁
字號:
		phy_data |= M88E1000_PSCR_AUTO_X_MODE;		break;	}#else	phy_data |= M88E1000_PSCR_AUTO_X_MODE;#endif#if 0	/* Options:	 *   disable_polarity_correction = 0 (default)	 *       Automatic Correction for Reversed Cable Polarity	 *   0 - Disabled	 *   1 - Enabled	 */	phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL;	if (hw->disable_polarity_correction == 1)		phy_data |= M88E1000_PSCR_POLARITY_REVERSAL;#else	phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL;#endif	if (e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data) < 0) {		DEBUGOUT("PHY Write Error\n");		return -E1000_ERR_PHY;	}	/* Force TX_CLK in the Extended PHY Specific Control Register	 * to 25MHz clock.	 */	if (e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	phy_data |= M88E1000_EPSCR_TX_CLK_25;	/* Configure Master and Slave downshift values */	phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |		      M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);	phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X |		     M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);	if (e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data) < 0) {		DEBUGOUT("PHY Write Error\n");		return -E1000_ERR_PHY;	}	/* SW Reset the PHY so all changes take effect */	ret_val = e1000_phy_reset(hw);	if (ret_val < 0) {		DEBUGOUT("Error Resetting the PHY\n");		return ret_val;	}	/* Options:	 *   autoneg = 1 (default)	 *      PHY will advertise value(s) parsed from	 *      autoneg_advertised and fc	 *   autoneg = 0	 *      PHY will be set to 10H, 10F, 100H, or 100F	 *      depending on value parsed from forced_speed_duplex.	 */	/* Is autoneg enabled?  This is enabled by default or by software override.	 * If so, call e1000_phy_setup_autoneg routine to parse the	 * autoneg_advertised and fc options. If autoneg is NOT enabled, then the	 * user should have provided a speed/duplex override.  If so, then call	 * e1000_phy_force_speed_duplex to parse and set this up.	 */	/* Perform some bounds checking on the hw->autoneg_advertised	 * parameter.  If this variable is zero, then set it to the default.	 */	hw->autoneg_advertised &= AUTONEG_ADVERTISE_SPEED_DEFAULT;	/* If autoneg_advertised is zero, we assume it was not defaulted	 * by the calling code so we set to advertise full capability.	 */	if (hw->autoneg_advertised == 0)		hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT;	DEBUGOUT("Reconfiguring auto-neg advertisement params\n");	ret_val = e1000_phy_setup_autoneg(hw);	if (ret_val < 0) {		DEBUGOUT("Error Setting up Auto-Negotiation\n");		return ret_val;	}	DEBUGOUT("Restarting Auto-Neg\n");	/* Restart auto-negotiation by setting the Auto Neg Enable bit and	 * the Auto Neg Restart bit in the PHY control register.	 */	if (e1000_read_phy_reg(hw, PHY_CTRL, &phy_data) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	phy_data |= (MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG);	if (e1000_write_phy_reg(hw, PHY_CTRL, phy_data) < 0) {		DEBUGOUT("PHY Write Error\n");		return -E1000_ERR_PHY;	}#if 0	/* Does the user want to wait for Auto-Neg to complete here, or	 * check at a later time (for example, callback routine).	 */	if (hw->wait_autoneg_complete) {		ret_val = e1000_wait_autoneg(hw);		if (ret_val < 0) {			DEBUGOUT			    ("Error while waiting for autoneg to complete\n");			return ret_val;		}	}#else	/* If we do not wait for autonegtation to complete I	 * do not see a valid link status.	 */	ret_val = e1000_wait_autoneg(hw);	if (ret_val < 0) {		DEBUGOUT("Error while waiting for autoneg to complete\n");		return ret_val;	}#endif	/* Check link status. Wait up to 100 microseconds for link to become	 * valid.	 */	for (i = 0; i < 10; i++) {		if (e1000_read_phy_reg(hw, PHY_STATUS, &phy_data) < 0) {			DEBUGOUT("PHY Read Error\n");			return -E1000_ERR_PHY;		}		if (e1000_read_phy_reg(hw, PHY_STATUS, &phy_data) < 0) {			DEBUGOUT("PHY Read Error\n");			return -E1000_ERR_PHY;		}		if (phy_data & MII_SR_LINK_STATUS) {			/* We have link, so we need to finish the config process:			 *   1) Set up the MAC to the current PHY speed/duplex			 *      if we are on 82543.  If we			 *      are on newer silicon, we only need to configure			 *      collision distance in the Transmit Control Register.			 *   2) Set up flow control on the MAC to that established with			 *      the link partner.			 */			if (hw->mac_type >= e1000_82544) {				e1000_config_collision_dist(hw);			} else {				ret_val = e1000_config_mac_to_phy(hw);				if (ret_val < 0) {					DEBUGOUT					    ("Error configuring MAC to PHY settings\n");					return ret_val;				}			}			ret_val = e1000_config_fc_after_link_up(hw);			if (ret_val < 0) {				DEBUGOUT("Error Configuring Flow Control\n");				return ret_val;			}			DEBUGOUT("Valid link established!!!\n");			return 0;		}		udelay(10);	}	DEBUGOUT("Unable to establish link!!!\n");	return -E1000_ERR_NOLINK;}/******************************************************************************* Configures PHY autoneg and flow control advertisement settings** hw - Struct containing variables accessed by shared code******************************************************************************/static inte1000_phy_setup_autoneg(struct e1000_hw *hw){	uint16_t mii_autoneg_adv_reg;	uint16_t mii_1000t_ctrl_reg;	DEBUGFUNC();	/* Read the MII Auto-Neg Advertisement Register (Address 4). */	if (e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	/* Read the MII 1000Base-T Control Register (Address 9). */	if (e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	/* Need to parse both autoneg_advertised and fc and set up	 * the appropriate PHY registers.  First we will parse for	 * autoneg_advertised software override.  Since we can advertise	 * a plethora of combinations, we need to check each bit	 * individually.	 */	/* First we clear all the 10/100 mb speed bits in the Auto-Neg	 * Advertisement Register (Address 4) and the 1000 mb speed bits in	 * the  1000Base-T Control Register (Address 9).	 */	mii_autoneg_adv_reg &= ~REG4_SPEED_MASK;	mii_1000t_ctrl_reg &= ~REG9_SPEED_MASK;	DEBUGOUT("autoneg_advertised %x\n", hw->autoneg_advertised);	/* Do we want to advertise 10 Mb Half Duplex? */	if (hw->autoneg_advertised & ADVERTISE_10_HALF) {		DEBUGOUT("Advertise 10mb Half duplex\n");		mii_autoneg_adv_reg |= NWAY_AR_10T_HD_CAPS;	}	/* Do we want to advertise 10 Mb Full Duplex? */	if (hw->autoneg_advertised & ADVERTISE_10_FULL) {		DEBUGOUT("Advertise 10mb Full duplex\n");		mii_autoneg_adv_reg |= NWAY_AR_10T_FD_CAPS;	}	/* Do we want to advertise 100 Mb Half Duplex? */	if (hw->autoneg_advertised & ADVERTISE_100_HALF) {		DEBUGOUT("Advertise 100mb Half duplex\n");		mii_autoneg_adv_reg |= NWAY_AR_100TX_HD_CAPS;	}	/* Do we want to advertise 100 Mb Full Duplex? */	if (hw->autoneg_advertised & ADVERTISE_100_FULL) {		DEBUGOUT("Advertise 100mb Full duplex\n");		mii_autoneg_adv_reg |= NWAY_AR_100TX_FD_CAPS;	}	/* We do not allow the Phy to advertise 1000 Mb Half Duplex */	if (hw->autoneg_advertised & ADVERTISE_1000_HALF) {		DEBUGOUT		    ("Advertise 1000mb Half duplex requested, request denied!\n");	}	/* Do we want to advertise 1000 Mb Full Duplex? */	if (hw->autoneg_advertised & ADVERTISE_1000_FULL) {		DEBUGOUT("Advertise 1000mb Full duplex\n");		mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS;	}	/* Check for a software override of the flow control settings, and	 * setup the PHY advertisement registers accordingly.  If	 * auto-negotiation is enabled, then software will have to set the	 * "PAUSE" bits to the correct value in the Auto-Negotiation	 * Advertisement Register (PHY_AUTONEG_ADV) and re-start auto-negotiation.	 *	 * 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.	 *  other:  No software override.  The flow control configuration	 *          in the EEPROM is used.	 */	switch (hw->fc) {	case e1000_fc_none:	/* 0 */		/* Flow control (RX & TX) is completely disabled by a		 * software over-ride.		 */		mii_autoneg_adv_reg &= ~(NWAY_AR_ASM_DIR | NWAY_AR_PAUSE);		break;	case e1000_fc_rx_pause:	/* 1 */		/* 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		 * (in e1000_config_fc_after_link_up) we will disable the		 *hw's ability to send PAUSE frames.		 */		mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE);		break;	case e1000_fc_tx_pause:	/* 2 */		/* TX Flow control is enabled, and RX Flow control is		 * disabled, by a software over-ride.		 */		mii_autoneg_adv_reg |= NWAY_AR_ASM_DIR;		mii_autoneg_adv_reg &= ~NWAY_AR_PAUSE;		break;	case e1000_fc_full:	/* 3 */		/* Flow control (both RX and TX) is enabled by a software		 * over-ride.		 */		mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE);		break;	default:		DEBUGOUT("Flow control param set incorrectly\n");		return -E1000_ERR_CONFIG;	}	if (e1000_write_phy_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg) < 0) {		DEBUGOUT("PHY Write Error\n");		return -E1000_ERR_PHY;	}	DEBUGOUT("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg);	if (e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg) < 0) {		DEBUGOUT("PHY Write Error\n");		return -E1000_ERR_PHY;	}	return 0;}/******************************************************************************* Sets the collision distance in the Transmit Control register** hw - Struct containing variables accessed by shared code** Link should have been established previously. Reads the speed and duplex* information from the Device Status register.******************************************************************************/static voide1000_config_collision_dist(struct e1000_hw *hw){	uint32_t tctl;	tctl = E1000_READ_REG(hw, TCTL);	tctl &= ~E1000_TCTL_COLD;	tctl |= E1000_COLLISION_DISTANCE << E1000_COLD_SHIFT;	E1000_WRITE_REG(hw, TCTL, tctl);	E1000_WRITE_FLUSH(hw);}/******************************************************************************* Sets MAC speed and duplex settings to reflect the those in the PHY** hw - Struct containing variables accessed by shared code* mii_reg - data to write to the MII control register** The contents of the PHY register containing the needed information need to* be passed in.******************************************************************************/static inte1000_config_mac_to_phy(struct e1000_hw *hw){	uint32_t ctrl;	uint16_t phy_data;	DEBUGFUNC();	/* Read the Device Control Register and set the bits to Force Speed	 * and Duplex.	 */	ctrl = E1000_READ_REG(hw, CTRL);	ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);	ctrl &= ~(E1000_CTRL_SPD_SEL | E1000_CTRL_ILOS);	/* Set up duplex in the Device Control and Transmit Control	 * registers depending on negotiated values.	 */	if (e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data) < 0) {		DEBUGOUT("PHY Read Error\n");		return -E1000_ERR_PHY;	}	if (phy_data & M88E1000_PSSR_DPLX)		ctrl |= E1000_CTRL_FD;	else		ctrl &= ~E1000_CTRL_FD;	e1000_config_collision_dist(hw);	/* Set up speed in the Device Control register depending on	 * negotiated values.	 */	if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS)		ctrl |= E1000_CTRL_SPD_1000;	else if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS)		ctrl |= E1000_CTRL_SPD_100;	/* Write the configured values back to the Device Control Reg. */	E1000_WRITE_REG(hw, CTRL, ctrl);	return 0;}/****************************************************************************** * Forces the MAC's flow control settings. * * hw - Struct containing variables accessed by shared code * * Sets the TFCE and RFCE bits in the device control register to reflect * the adapter settings. TFCE and RFCE need to be explicitly set by * software when a Copper PHY is used because autonegotiation is managed * by the PHY rather than the MAC. Software must also configure these * bits when link is forced on a fiber connection. *****************************************************************************/static inte1000_force_mac_fc(struct e1000_hw *hw){	uint32_t ctrl;	DEBUGFUNC();	/* Get the current configuration of the Device Control Register */	ctrl = E1000_READ_REG(hw, CTRL);	/* Because we didn't get link via the internal auto-negotiation	 * mechanism (we either forced link or we got link via PHY

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色狠狠色合久久伊人| 欧美大尺度电影在线| 久久久综合精品| 奇米影视一区二区三区小说| 91尤物视频在线观看| 亚洲综合一区二区精品导航| 99re这里都是精品| 国产精品成人在线观看| 成人午夜视频网站| 亚洲免费在线观看| 99在线精品免费| 国产精品久久久久久久久快鸭| 视频一区欧美日韩| 日韩欧美一二三| 午夜日韩在线观看| 在线不卡免费欧美| 亚洲一区在线视频| 欧美色区777第一页| 午夜精品久久久久久久久| 欧美久久一二区| 国产在线日韩欧美| 国产清纯白嫩初高生在线观看91 | 精品一区二区免费视频| 日韩精品专区在线| 亚洲成人免费观看| 久久午夜国产精品| 国产成人精品影院| 综合久久综合久久| 精一区二区三区| **网站欧美大片在线观看| 91免费在线看| 丝袜亚洲另类欧美| 精品处破学生在线二十三| 成人永久aaa| 一区二区三区影院| 欧美日韩www| 国产精品一区2区| 自拍av一区二区三区| 欧美性大战久久久久久久| 日本特黄久久久高潮| 国产精品天天摸av网| 欧美丝袜丝交足nylons| 毛片av中文字幕一区二区| 国产网红主播福利一区二区| 成人18视频日本| 麻豆成人久久精品二区三区小说| 欧美激情一区三区| 欧洲另类一二三四区| 日韩和欧美一区二区三区| 国产精品日日摸夜夜摸av| 在线免费亚洲电影| 青青青伊人色综合久久| 国产精品无圣光一区二区| 欧美一区二区高清| 不卡一区二区三区四区| 日韩高清电影一区| 国产精品欧美久久久久无广告 | 日韩免费电影网站| 成人国产一区二区三区精品| 日韩在线卡一卡二| 亚洲综合色成人| 国产午夜亚洲精品羞羞网站| 欧美精品 国产精品| 成人免费视频网站在线观看| 国产一区二区三区国产| 夜夜夜精品看看| 久久久久久久综合日本| 欧美美女bb生活片| 91黄色在线观看| 国产成人精品免费视频网站| 视频一区免费在线观看| 国产精品国产三级国产a| 欧美专区日韩专区| 成人av资源下载| 国产乱码一区二区三区| 日韩电影在线一区| 天天做天天摸天天爽国产一区| 亚洲你懂的在线视频| 国产人妖乱国产精品人妖| 日韩精品一区在线观看| 欧美在线影院一区二区| 一本大道久久a久久综合| 国产激情一区二区三区四区| 日av在线不卡| 亚洲精品欧美综合四区| 亚洲女人的天堂| **性色生活片久久毛片| 国产精品毛片高清在线完整版| 欧美乱熟臀69xxxxxx| 91精品国产综合久久福利软件| 一本色道久久综合狠狠躁的推荐| 成人高清伦理免费影院在线观看| 国产麻豆日韩欧美久久| 久久国产乱子精品免费女| 一区二区三区在线播放| 亚洲美女淫视频| 亚洲毛片av在线| 一区二区三区国产豹纹内裤在线| 久久久亚洲精品石原莉奈| 精品久久久久久无| 2020日本不卡一区二区视频| 久久久久97国产精华液好用吗| 久久精品视频免费| 69久久夜色精品国产69蝌蚪网| 91丨porny丨国产| 欧美精品第1页| 欧美一区二区三区系列电影| 欧美一二三区在线观看| 欧美日韩三级在线| 日韩精品一区二区三区在线播放 | 成人av在线资源网| 欧美国产精品v| 国产精品久久久久久久久图文区| 亚洲精品欧美二区三区中文字幕| 午夜免费久久看| 久久99久久久久| 成人av网站免费| 欧美日韩一区二区在线观看| 精品日产卡一卡二卡麻豆| 久久影院视频免费| 亚洲乱码国产乱码精品精小说| 日韩高清国产一区在线| 国产成人在线视频网址| 在线视频观看一区| 精品国内二区三区| 亚洲色图.com| 蜜桃久久久久久| 91色视频在线| 337p日本欧洲亚洲大胆色噜噜| 亚洲日本一区二区| 久久99精品久久久久久国产越南 | 国产精品综合一区二区| 在线免费观看成人短视频| 精品久久久久久久久久久久久久久 | 日韩午夜激情视频| 国产精品久久久久久亚洲伦| 欧美aaaaa成人免费观看视频| 91在线porny国产在线看| 精品成人一区二区三区四区| 午夜在线成人av| 91麻豆免费看| 国产精品麻豆久久久| 久久99精品久久久久久国产越南 | 亚洲综合免费观看高清完整版 | 欧美一区欧美二区| 亚洲精品久久7777| jlzzjlzz国产精品久久| 欧美电影免费观看高清完整版 | 成人午夜视频网站| 欧美mv和日韩mv的网站| 五月综合激情婷婷六月色窝| 91视频观看免费| 国产精品毛片久久久久久| 激情六月婷婷久久| 日韩一级免费观看| 亚洲va国产va欧美va观看| 94-欧美-setu| 18涩涩午夜精品.www| 国产凹凸在线观看一区二区| 久久综合九色综合97_久久久| 麻豆专区一区二区三区四区五区| 91麻豆精品国产综合久久久久久| 亚洲成av人影院| 欧美精品自拍偷拍| 三级久久三级久久| 欧美二区在线观看| 日韩中文字幕不卡| 欧美一区二区视频观看视频| 日韩电影免费在线| 欧美裸体bbwbbwbbw| 日韩国产一二三区| 91麻豆精品国产综合久久久久久 | 欧美视频一区二区三区在线观看 | 蜜臂av日日欢夜夜爽一区| 欧美日韩国产区一| 亚洲大片免费看| 欧美一区在线视频| 精品一区二区免费看| 欧美精品一区二区三区高清aⅴ| 久99久精品视频免费观看| 欧美电影免费观看完整版| 韩日欧美一区二区三区| 欧美成人艳星乳罩| 国产剧情av麻豆香蕉精品| 国产日韩欧美电影| a级精品国产片在线观看| 亚洲欧美日韩成人高清在线一区| 91官网在线免费观看| 亚洲国产乱码最新视频| 3d成人h动漫网站入口| 日本伊人精品一区二区三区观看方式| 日韩欧美一卡二卡| 国产成人高清视频| 亚洲另类中文字| 91精品福利在线一区二区三区| 在线区一区二视频| 久久女同互慰一区二区三区| 不卡的电影网站| 亚洲激情在线激情| 日韩一区二区三区在线|