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

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

?? e1000.c

?? u-boot-1.1.6 源碼包
?? C
?? 第 1 頁 / 共 5 頁
字號:
	 * auto-neg), we have to manually enable/disable transmit an	 * receive flow control.	 *	 * The "Case" statement below enables/disable flow control	 * according to the "hw->fc" parameter.	 *	 * 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	 *          frames but we do not receive pause frames).	 *      3:  Both Rx and TX flow control (symmetric) is enabled.	 *  other:  No other values should be possible at this point.	 */	switch (hw->fc) {	case e1000_fc_none:		ctrl &= (~(E1000_CTRL_TFCE | E1000_CTRL_RFCE));		break;	case e1000_fc_rx_pause:		ctrl &= (~E1000_CTRL_TFCE);		ctrl |= E1000_CTRL_RFCE;		break;	case e1000_fc_tx_pause:		ctrl &= (~E1000_CTRL_RFCE);		ctrl |= E1000_CTRL_TFCE;		break;	case e1000_fc_full:		ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE);		break;	default:		DEBUGOUT("Flow control param set incorrectly\n");		return -E1000_ERR_CONFIG;	}	/* Disable TX Flow Control for 82542 (rev 2.0) */	if (hw->mac_type == e1000_82542_rev2_0)		ctrl &= (~E1000_CTRL_TFCE);	E1000_WRITE_REG(hw, CTRL, ctrl);	return 0;}/****************************************************************************** * Configures flow control settings after link is established * * hw - Struct containing variables accessed by shared code * * Should be called immediately after a valid link has been established. * Forces MAC flow control settings if link was forced. When in MII/GMII mode * and autonegotiation is enabled, the MAC flow control settings will be set * based on the flow control negotiated by the PHY. In TBI mode, the TFCE * and RFCE bits will be automaticaly set to the negotiated flow control mode. *****************************************************************************/static inte1000_config_fc_after_link_up(struct e1000_hw *hw){	int32_t ret_val;	uint16_t mii_status_reg;	uint16_t mii_nway_adv_reg;	uint16_t mii_nway_lp_ability_reg;	uint16_t speed;	uint16_t duplex;	DEBUGFUNC();	/* Check for the case where we have fiber media and auto-neg failed	 * so we had to force link.  In this case, we need to force the	 * configuration of the MAC to match the "fc" parameter.	 */	if ((hw->media_type == e1000_media_type_fiber) && (hw->autoneg_failed)) {		ret_val = e1000_force_mac_fc(hw);		if (ret_val < 0) {			DEBUGOUT("Error forcing flow control settings\n");			return ret_val;		}	}	/* Check for the case where we have copper media and auto-neg is	 * enabled.  In this case, we need to check and see if Auto-Neg	 * has completed, and if so, how the PHY and link partner has	 * flow control configured.	 */	if (hw->media_type == e1000_media_type_copper) {		/* Read the MII Status Register and check to see if AutoNeg		 * has completed.  We read this twice because this reg has		 * some "sticky" (latched) bits.		 */		if (e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg) < 0) {			DEBUGOUT("PHY Read Error \n");			return -E1000_ERR_PHY;		}		if (e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg) < 0) {			DEBUGOUT("PHY Read Error \n");			return -E1000_ERR_PHY;		}		if (mii_status_reg & MII_SR_AUTONEG_COMPLETE) {			/* The AutoNeg process has completed, so we now need to			 * read both the Auto Negotiation Advertisement Register			 * (Address 4) and the Auto_Negotiation Base Page Ability			 * Register (Address 5) to determine how flow control was			 * negotiated.			 */			if (e1000_read_phy_reg			    (hw, PHY_AUTONEG_ADV, &mii_nway_adv_reg) < 0) {				DEBUGOUT("PHY Read Error\n");				return -E1000_ERR_PHY;			}			if (e1000_read_phy_reg			    (hw, PHY_LP_ABILITY,			     &mii_nway_lp_ability_reg) < 0) {				DEBUGOUT("PHY Read Error\n");				return -E1000_ERR_PHY;			}			/* Two bits in the Auto Negotiation Advertisement Register			 * (Address 4) and two bits in the Auto Negotiation Base			 * Page Ability Register (Address 5) determine flow control			 * for both the PHY and the link partner.  The following			 * table, taken out of the IEEE 802.3ab/D6.0 dated March 25,			 * 1999, describes these PAUSE resolution bits and how flow			 * control is determined based upon these settings.			 * NOTE:  DC = Don't Care			 *			 *   LOCAL DEVICE  |   LINK PARTNER			 * PAUSE | ASM_DIR | PAUSE | ASM_DIR | NIC Resolution			 *-------|---------|-------|---------|--------------------			 *   0   |    0    |  DC   |   DC    | e1000_fc_none			 *   0   |    1    |   0   |   DC    | e1000_fc_none			 *   0   |    1    |   1   |    0    | e1000_fc_none			 *   0   |    1    |   1   |    1    | e1000_fc_tx_pause			 *   1   |    0    |   0   |   DC    | e1000_fc_none			 *   1   |   DC    |   1   |   DC    | e1000_fc_full			 *   1   |    1    |   0   |    0    | e1000_fc_none			 *   1   |    1    |   0   |    1    | e1000_fc_rx_pause			 *			 */			/* Are both PAUSE bits set to 1?  If so, this implies			 * Symmetric Flow Control is enabled at both ends.  The			 * ASM_DIR bits are irrelevant per the spec.			 *			 * For Symmetric Flow Control:			 *			 *   LOCAL DEVICE  |   LINK PARTNER			 * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result			 *-------|---------|-------|---------|--------------------			 *   1   |   DC    |   1   |   DC    | e1000_fc_full			 *			 */			if ((mii_nway_adv_reg & NWAY_AR_PAUSE) &&			    (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE)) {				/* Now we need to check if the user selected RX ONLY				 * of pause frames.  In this case, we had to advertise				 * FULL flow control because we could not advertise RX				 * ONLY. Hence, we must now check to see if we need to				 * turn OFF  the TRANSMISSION of PAUSE frames.				 */				if (hw->original_fc == e1000_fc_full) {					hw->fc = e1000_fc_full;					DEBUGOUT("Flow Control = FULL.\r\n");				} else {					hw->fc = e1000_fc_rx_pause;					DEBUGOUT					    ("Flow Control = RX PAUSE frames only.\r\n");				}			}			/* For receiving PAUSE frames ONLY.			 *			 *   LOCAL DEVICE  |   LINK PARTNER			 * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result			 *-------|---------|-------|---------|--------------------			 *   0   |    1    |   1   |    1    | e1000_fc_tx_pause			 *			 */			else if (!(mii_nway_adv_reg & NWAY_AR_PAUSE) &&				 (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&				 (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&				 (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR))			{				hw->fc = e1000_fc_tx_pause;				DEBUGOUT				    ("Flow Control = TX PAUSE frames only.\r\n");			}			/* For transmitting PAUSE frames ONLY.			 *			 *   LOCAL DEVICE  |   LINK PARTNER			 * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result			 *-------|---------|-------|---------|--------------------			 *   1   |    1    |   0   |    1    | e1000_fc_rx_pause			 *			 */			else if ((mii_nway_adv_reg & NWAY_AR_PAUSE) &&				 (mii_nway_adv_reg & NWAY_AR_ASM_DIR) &&				 !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&				 (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR))			{				hw->fc = e1000_fc_rx_pause;				DEBUGOUT				    ("Flow Control = RX PAUSE frames only.\r\n");			}			/* Per the IEEE spec, at this point flow control should be			 * disabled.  However, we want to consider that we could			 * be connected to a legacy switch that doesn't advertise			 * desired flow control, but can be forced on the link			 * partner.  So if we advertised no flow control, that is			 * what we will resolve to.  If we advertised some kind of			 * receive capability (Rx Pause Only or Full Flow Control)			 * and the link partner advertised none, we will configure			 * ourselves to enable Rx Flow Control only.  We can do			 * this safely for two reasons:  If the link partner really			 * didn't want flow control enabled, and we enable Rx, no			 * harm done since we won't be receiving any PAUSE frames			 * anyway.  If the intent on the link partner was to have			 * flow control enabled, then by us enabling RX only, we			 * can at least receive pause frames and process them.			 * This is a good idea because in most cases, since we are			 * predominantly a server NIC, more times than not we will			 * be asked to delay transmission of packets than asking			 * our link partner to pause transmission of frames.			 */			else if (hw->original_fc == e1000_fc_none ||				 hw->original_fc == e1000_fc_tx_pause) {				hw->fc = e1000_fc_none;				DEBUGOUT("Flow Control = NONE.\r\n");			} else {				hw->fc = e1000_fc_rx_pause;				DEBUGOUT				    ("Flow Control = RX PAUSE frames only.\r\n");			}			/* Now we need to do one last check...  If we auto-			 * negotiated to HALF DUPLEX, flow control should not be			 * enabled per IEEE 802.3 spec.			 */			e1000_get_speed_and_duplex(hw, &speed, &duplex);			if (duplex == HALF_DUPLEX)				hw->fc = e1000_fc_none;			/* Now we call a subroutine to actually force the MAC			 * controller to use the correct flow control settings.			 */			ret_val = e1000_force_mac_fc(hw);			if (ret_val < 0) {				DEBUGOUT				    ("Error forcing flow control settings\n");				return ret_val;			}		} else {			DEBUGOUT			    ("Copper PHY and Auto Neg has not completed.\r\n");		}	}	return 0;}/****************************************************************************** * Checks to see if the link status of the hardware has changed. * * hw - Struct containing variables accessed by shared code * * Called by any function that needs to check the link status of the adapter. *****************************************************************************/static inte1000_check_for_link(struct eth_device *nic){	struct e1000_hw *hw = nic->priv;	uint32_t rxcw;	uint32_t ctrl;	uint32_t status;	uint32_t rctl;	uint32_t signal;	int32_t ret_val;	uint16_t phy_data;	uint16_t lp_capability;	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;	status = E1000_READ_REG(hw, STATUS);	rxcw = E1000_READ_REG(hw, RXCW);	DEBUGOUT("ctrl: %#08x status %#08x rxcw %#08x\n", ctrl, status, rxcw);	/* If we have a copper PHY then we only want to go out to the PHY	 * registers to see if Auto-Neg has completed and/or if our link	 * status has changed.  The get_link_status flag will be set if we	 * receive a Link Status Change interrupt or we have Rx Sequence	 * Errors.	 */	if ((hw->media_type == e1000_media_type_copper) && hw->get_link_status) {		/* First we want to see if the MII Status Register reports		 * link.  If so, then we want to get the current speed/duplex		 * of the PHY.		 * Read the register twice since the link bit is sticky.		 */		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) {			hw->get_link_status = FALSE;		} else {			/* No link detected */			return -E1000_ERR_NOLINK;		}		/* We have a M88E1000 PHY and Auto-Neg is enabled.  If we		 * have Si on board that is 82544 or newer, Auto		 * Speed Detection takes care of MAC speed/duplex		 * configuration.  So we only need to configure Collision		 * Distance in the MAC.  Otherwise, we need to force		 * speed/duplex on the MAC to the current PHY speed/duplex		 * settings.		 */		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;			}		}		/* Configure Flow Control now that Auto-Neg has completed. First, we		 * need to restore the desired flow control settings because we may		 * have had to re-autoneg with a different link partner.		 */		ret_val = e1000_config_fc_after_link_up(hw);		if (ret_val < 0) {			DEBUGOUT("Error configuring flow control\n");			return ret_val;		}		/* At this point we know that we are on copper and we have		 * auto-negotiated link.  These are conditions for checking the link		 * parter capability register.  We use the link partner capability to		 * determine if TBI Compatibility needs to be turned on or off.  If		 * the link partner advertises any speed in addition to Gigabit, then		 * we assume that they are GMII-based, and TBI compatibility is not		 * needed. If no other speeds are advertised, we assume the link		 * partner is TBI-based, and we turn on TBI Compatibility.		 */		if (hw->tbi_compatibility_en) {			if (e1000_read_phy_reg			    (hw, PHY_LP_ABILITY, &lp_capability) < 0) {				DEBUGOUT("PHY Read Error\n");				return -E1000_ERR_PHY;			}			if (lp_capability & (NWAY_LPAR_10T_HD_CAPS |					     NWAY_LPAR_10T_FD_CAPS |					     NWAY_LPAR_100TX_HD_CAPS |					     NWAY_LPAR_100TX_FD_CAPS |					     NWAY_LPAR_100T4_CAPS)) {				/* If our link partner advertises anything in addition to				 * gigabit, we do not need to enable TBI compatibility.				 */				if (hw->tbi_compatibility_on) {					/* If we previously were in the mode, turn it off. */					rctl = E1000_READ_REG(hw, RCTL);					rctl &= ~E1000_RCTL_SBP;					E1000_WRITE_REG(hw, RCTL, rctl);					hw->tbi_compatibility_on = FALSE;				}			} else {				/* If TBI compatibility is was previously off, turn it on. For				 * compatibility with a TBI link partner, we will store bad				 * packets. Some frames have an additional byte on the end and				 * will look like CRC errors to to the hardware.				 */				if (!hw->tbi_compatibility_on) {					hw->tbi_compatibility_on = TRUE;					rctl = E1000_READ_REG(hw, RCTL);					rctl |= E1000_RCTL_SBP;					E1000_WRITE_REG(hw, RCTL, rctl);				}			}		}	}	/* If we don't have link (auto-negotiation failed or link partner cannot	 * auto-negotiate), the cable is plugged in (we have signal), and our	 * link partner is not trying to auto-negotiate with us (we are receiving	 * idles or data), we need to force link up. We also need to give	 * auto-negotiation time to complete, in case the cable was just plugged	 * in. The autoneg_failed flag does this.	 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米四色…亚洲| 精品国产成人系列| 国产偷国产偷精品高清尤物| 亚洲一区国产视频| 99久久国产免费看| 久久青草欧美一区二区三区| 午夜成人免费电影| 97aⅴ精品视频一二三区| 精品国产sm最大网站| 亚洲第一二三四区| 91蝌蚪porny| 国产日韩精品一区二区三区| 秋霞电影一区二区| 欧美日韩精品免费观看视频| 《视频一区视频二区| 福利一区福利二区| 久久夜色精品一区| 狠狠色狠狠色综合| 欧美大片在线观看一区| 婷婷开心激情综合| 欧美视频一区二区三区在线观看| 国产精品毛片无遮挡高清| 国产一区二区三区高清播放| 日韩午夜激情电影| 美女性感视频久久| 欧美一区日韩一区| 男女男精品网站| 91精品中文字幕一区二区三区| 亚洲一区二区成人在线观看| 在线观看一区二区视频| 亚洲欧美日韩综合aⅴ视频| av电影天堂一区二区在线观看| 欧美韩国日本不卡| 丁香婷婷综合网| 国产精品污网站| 从欧美一区二区三区| 亚洲国产精品av| 成人av资源站| 国产精品的网站| 99精品国产视频| 婷婷中文字幕一区三区| 国产精品 日产精品 欧美精品| 精品美女一区二区三区| 国内成人自拍视频| 国产日本欧洲亚洲| 97精品久久久久中文字幕| 亚洲精品美国一| 色呦呦一区二区三区| 亚洲一区二区三区四区的 | 性做久久久久久| 在线播放视频一区| 美日韩一区二区| 久久蜜桃av一区二区天堂| 国产成人精品免费在线| 国产欧美一区二区精品性色| 成人手机电影网| 亚洲精品日韩一| 欧美日韩成人在线| 美女免费视频一区二区| 久久综合九色综合97_久久久| 国产成人福利片| 亚洲日本在线看| 欧美日韩精品欧美日韩精品| 久久精品999| 国产精品色哟哟| 在线观看91视频| 亚洲图片欧美综合| 日韩精品一区在线观看| 国产成人免费网站| 一区二区三区中文在线观看| 欧美一区午夜视频在线观看| 国产毛片精品国产一区二区三区| 中文字幕一区二区三区色视频 | 色婷婷综合五月| 舔着乳尖日韩一区| 久久久午夜精品理论片中文字幕| 99久久综合精品| 亚洲国产美女搞黄色| 日韩欧美国产系列| eeuss鲁一区二区三区| 午夜精品一区二区三区电影天堂 | 国产精品久久久一本精品 | 欧美人妇做爰xxxⅹ性高电影| 久久99精品久久久久婷婷| 国产精品盗摄一区二区三区| 欧美剧情片在线观看| 国产成人av资源| 亚洲国产综合91精品麻豆| 久久青草欧美一区二区三区| 91精品1区2区| 国产一区二区三区国产| 亚洲综合偷拍欧美一区色| 97se亚洲国产综合自在线不卡| 一本大道久久a久久综合婷婷| 日韩激情av在线| 国产精品狼人久久影院观看方式| 欧美三级三级三级| 国产成人啪午夜精品网站男同| 亚洲激情中文1区| 精品国产髙清在线看国产毛片| 91麻豆国产精品久久| 久久精品久久99精品久久| 亚洲色大成网站www久久九九| 日韩一级在线观看| 91免费观看视频在线| 久久99国产精品久久99 | 欧美不卡在线视频| 欧美在线免费视屏| 成人激情校园春色| 久久精品国产77777蜜臀| 亚洲欧美在线视频| 久久久一区二区三区捆绑**| 欧美日韩三级一区二区| 成人av网在线| 国产专区综合网| 视频一区免费在线观看| 日韩理论片在线| 久久久久国产精品免费免费搜索| 91精品一区二区三区久久久久久| 91丨porny丨户外露出| 国产精品综合一区二区| 午夜国产精品一区| 亚洲欧美一区二区三区极速播放| 一本一本大道香蕉久在线精品| 国产69精品久久99不卡| 韩日av一区二区| 男女激情视频一区| 视频在线观看一区| 一区二区免费在线播放| 亚洲色图欧美在线| 国产精品你懂的在线| 精品成人私密视频| 日韩欧美一二三区| 欧美高清性hdvideosex| 欧美在线观看视频在线| 91国偷自产一区二区开放时间| 成人网在线免费视频| 国产成人亚洲综合a∨婷婷| 久久精品国产秦先生| 日本视频在线一区| 视频一区中文字幕国产| 亚洲大片免费看| 亚洲一区二区三区自拍| 亚洲精品视频免费看| 亚洲视频免费观看| 亚洲欧洲制服丝袜| 亚洲精品免费看| 亚洲精品国产a| 亚洲一区二区偷拍精品| 亚洲线精品一区二区三区八戒| 亚洲一区中文在线| 亚洲已满18点击进入久久| 亚洲自拍偷拍欧美| 亚洲国产视频一区二区| 亚洲18女电影在线观看| 五月激情综合色| 日韩不卡一区二区| 麻豆免费看一区二区三区| 精品无码三级在线观看视频| 狠狠色综合日日| av成人动漫在线观看| 欧美日本韩国一区二区三区视频| 99久久er热在这里只有精品66| 91浏览器在线视频| 日本精品免费观看高清观看| 欧美亚洲综合网| 91精品在线观看入口| 日韩欧美国产综合一区| 欧美mv日韩mv国产网站app| 久久这里只有精品6| 国产无人区一区二区三区| 国产精品的网站| 亚洲一区二区三区四区的| 日韩电影在线看| 精品一区二区三区在线播放 | 亚洲地区一二三色| 秋霞午夜av一区二区三区| 狠狠久久亚洲欧美| av不卡在线观看| 欧美丝袜丝交足nylons图片| 91麻豆精品久久久久蜜臀 | 91免费看`日韩一区二区| 欧美日韩小视频| 精品少妇一区二区三区日产乱码| 久久精品亚洲一区二区三区浴池| 国产精品美女久久久久久2018| 亚洲综合一二三区| 理论电影国产精品| 粉嫩av一区二区三区在线播放| 91麻豆精东视频| 日韩一区二区免费在线观看| 国产日韩视频一区二区三区| 亚洲免费成人av| 欧美aⅴ一区二区三区视频| 国产福利91精品一区| 色av一区二区| 日韩女优av电影| 综合色中文字幕| 人人超碰91尤物精品国产| 成人免费高清在线|