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

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

?? ixgbe_common.c

?? linux 內核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*******************************************************************************  Intel 10 Gigabit PCI Express Linux driver  Copyright(c) 1999 - 2007 Intel Corporation.  This program is free software; you can redistribute it and/or modify it  under the terms and conditions of the GNU General Public License,  version 2, as published by the Free Software Foundation.  This program is distributed in the hope it will be useful, but WITHOUT  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for  more details.  You should have received a copy of the GNU General Public License along with  this program; if not, write to the Free Software Foundation, Inc.,  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.  The full GNU General Public License is included in this distribution in  the file called "COPYING".  Contact Information:  Linux NICS <linux.nics@intel.com>  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497*******************************************************************************/#include <linux/pci.h>#include <linux/delay.h>#include <linux/sched.h>#include "ixgbe_common.h"#include "ixgbe_phy.h"static s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw);static s32 ixgbe_poll_eeprom_eerd_done(struct ixgbe_hw *hw);static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw);static void ixgbe_release_eeprom_semaphore(struct ixgbe_hw *hw);static u16 ixgbe_calc_eeprom_checksum(struct ixgbe_hw *hw);static s32 ixgbe_clear_vfta(struct ixgbe_hw *hw);static s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw);static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr);static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr);/** *  ixgbe_start_hw - Prepare hardware for TX/RX *  @hw: pointer to hardware structure * *  Starts the hardware by filling the bus info structure and media type, clears *  all on chip counters, initializes receive address registers, multicast *  table, VLAN filter table, calls routine to set up link and flow control *  settings, and leaves transmit and receive units disabled and uninitialized **/s32 ixgbe_start_hw(struct ixgbe_hw *hw){	u32 ctrl_ext;	/* Set the media type */	hw->phy.media_type = hw->mac.ops.get_media_type(hw);	/* Identify the PHY */	ixgbe_identify_phy(hw);	/*	 * Store MAC address from RAR0, clear receive address registers, and	 * clear the multicast table	 */	ixgbe_init_rx_addrs(hw);	/* Clear the VLAN filter table */	ixgbe_clear_vfta(hw);	/* Set up link */	hw->phy.ops.setup(hw);	/* Clear statistics registers */	ixgbe_clear_hw_cntrs(hw);	/* Set No Snoop Disable */	ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);	ctrl_ext |= IXGBE_CTRL_EXT_NS_DIS;	IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext);	/* Clear adapter stopped flag */	hw->adapter_stopped = false;	return 0;}/** *  ixgbe_init_hw - Generic hardware initialization *  @hw: pointer to hardware structure * *  Initialize the hardware by reseting the hardware, filling the bus info *  structure and media type, clears all on chip counters, initializes receive *  address registers, multicast table, VLAN filter table, calls routine to set *  up link and flow control settings, and leaves transmit and receive units *  disabled and uninitialized **/s32 ixgbe_init_hw(struct ixgbe_hw *hw){	/* Reset the hardware */	hw->mac.ops.reset(hw);	/* Start the HW */	ixgbe_start_hw(hw);	return 0;}/** *  ixgbe_clear_hw_cntrs - Generic clear hardware counters *  @hw: pointer to hardware structure * *  Clears all hardware statistics counters by reading them from the hardware *  Statistics counters are clear on read. **/static s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw){	u16 i = 0;	IXGBE_READ_REG(hw, IXGBE_CRCERRS);	IXGBE_READ_REG(hw, IXGBE_ILLERRC);	IXGBE_READ_REG(hw, IXGBE_ERRBC);	IXGBE_READ_REG(hw, IXGBE_MSPDC);	for (i = 0; i < 8; i++)		IXGBE_READ_REG(hw, IXGBE_MPC(i));	IXGBE_READ_REG(hw, IXGBE_MLFC);	IXGBE_READ_REG(hw, IXGBE_MRFC);	IXGBE_READ_REG(hw, IXGBE_RLEC);	IXGBE_READ_REG(hw, IXGBE_LXONTXC);	IXGBE_READ_REG(hw, IXGBE_LXONRXC);	IXGBE_READ_REG(hw, IXGBE_LXOFFTXC);	IXGBE_READ_REG(hw, IXGBE_LXOFFRXC);	for (i = 0; i < 8; i++) {		IXGBE_READ_REG(hw, IXGBE_PXONTXC(i));		IXGBE_READ_REG(hw, IXGBE_PXONRXC(i));		IXGBE_READ_REG(hw, IXGBE_PXOFFTXC(i));		IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i));	}	IXGBE_READ_REG(hw, IXGBE_PRC64);	IXGBE_READ_REG(hw, IXGBE_PRC127);	IXGBE_READ_REG(hw, IXGBE_PRC255);	IXGBE_READ_REG(hw, IXGBE_PRC511);	IXGBE_READ_REG(hw, IXGBE_PRC1023);	IXGBE_READ_REG(hw, IXGBE_PRC1522);	IXGBE_READ_REG(hw, IXGBE_GPRC);	IXGBE_READ_REG(hw, IXGBE_BPRC);	IXGBE_READ_REG(hw, IXGBE_MPRC);	IXGBE_READ_REG(hw, IXGBE_GPTC);	IXGBE_READ_REG(hw, IXGBE_GORCL);	IXGBE_READ_REG(hw, IXGBE_GORCH);	IXGBE_READ_REG(hw, IXGBE_GOTCL);	IXGBE_READ_REG(hw, IXGBE_GOTCH);	for (i = 0; i < 8; i++)		IXGBE_READ_REG(hw, IXGBE_RNBC(i));	IXGBE_READ_REG(hw, IXGBE_RUC);	IXGBE_READ_REG(hw, IXGBE_RFC);	IXGBE_READ_REG(hw, IXGBE_ROC);	IXGBE_READ_REG(hw, IXGBE_RJC);	IXGBE_READ_REG(hw, IXGBE_MNGPRC);	IXGBE_READ_REG(hw, IXGBE_MNGPDC);	IXGBE_READ_REG(hw, IXGBE_MNGPTC);	IXGBE_READ_REG(hw, IXGBE_TORL);	IXGBE_READ_REG(hw, IXGBE_TORH);	IXGBE_READ_REG(hw, IXGBE_TPR);	IXGBE_READ_REG(hw, IXGBE_TPT);	IXGBE_READ_REG(hw, IXGBE_PTC64);	IXGBE_READ_REG(hw, IXGBE_PTC127);	IXGBE_READ_REG(hw, IXGBE_PTC255);	IXGBE_READ_REG(hw, IXGBE_PTC511);	IXGBE_READ_REG(hw, IXGBE_PTC1023);	IXGBE_READ_REG(hw, IXGBE_PTC1522);	IXGBE_READ_REG(hw, IXGBE_MPTC);	IXGBE_READ_REG(hw, IXGBE_BPTC);	for (i = 0; i < 16; i++) {		IXGBE_READ_REG(hw, IXGBE_QPRC(i));		IXGBE_READ_REG(hw, IXGBE_QBRC(i));		IXGBE_READ_REG(hw, IXGBE_QPTC(i));		IXGBE_READ_REG(hw, IXGBE_QBTC(i));	}	return 0;}/** *  ixgbe_get_mac_addr - Generic get MAC address *  @hw: pointer to hardware structure *  @mac_addr: Adapter MAC address * *  Reads the adapter's MAC address from first Receive Address Register (RAR0) *  A reset of the adapter must be performed prior to calling this function *  in order for the MAC address to have been loaded from the EEPROM into RAR0 **/s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr){	u32 rar_high;	u32 rar_low;	u16 i;	rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(0));	rar_low = IXGBE_READ_REG(hw, IXGBE_RAL(0));	for (i = 0; i < 4; i++)		mac_addr[i] = (u8)(rar_low >> (i*8));	for (i = 0; i < 2; i++)		mac_addr[i+4] = (u8)(rar_high >> (i*8));	return 0;}s32 ixgbe_read_part_num(struct ixgbe_hw *hw, u32 *part_num){	s32 ret_val;	u16 data;	ret_val = ixgbe_read_eeprom(hw, IXGBE_PBANUM0_PTR, &data);	if (ret_val) {		hw_dbg(hw, "NVM Read Error\n");		return ret_val;	}	*part_num = (u32)(data << 16);	ret_val = ixgbe_read_eeprom(hw, IXGBE_PBANUM1_PTR, &data);	if (ret_val) {		hw_dbg(hw, "NVM Read Error\n");		return ret_val;	}	*part_num |= data;	return 0;}/** *  ixgbe_stop_adapter - Generic stop TX/RX units *  @hw: pointer to hardware structure * *  Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts, *  disables transmit and receive units. The adapter_stopped flag is used by *  the shared code and drivers to determine if the adapter is in a stopped *  state and should not touch the hardware. **/s32 ixgbe_stop_adapter(struct ixgbe_hw *hw){	u32 number_of_queues;	u32 reg_val;	u16 i;	/*	 * Set the adapter_stopped flag so other driver functions stop touching	 * the hardware	 */	hw->adapter_stopped = true;	/* Disable the receive unit */	reg_val = IXGBE_READ_REG(hw, IXGBE_RXCTRL);	reg_val &= ~(IXGBE_RXCTRL_RXEN);	IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, reg_val);	msleep(2);	/* Clear interrupt mask to stop from interrupts being generated */	IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK);	/* Clear any pending interrupts */	IXGBE_READ_REG(hw, IXGBE_EICR);	/* Disable the transmit unit.  Each queue must be disabled. */	number_of_queues = hw->mac.num_tx_queues;	for (i = 0; i < number_of_queues; i++) {		reg_val = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i));		if (reg_val & IXGBE_TXDCTL_ENABLE) {			reg_val &= ~IXGBE_TXDCTL_ENABLE;			IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), reg_val);		}	}	return 0;}/** *  ixgbe_led_on - Turns on the software controllable LEDs. *  @hw: pointer to hardware structure *  @index: led number to turn on **/s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index){	u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);	/* To turn on the LED, set mode to ON. */	led_reg &= ~IXGBE_LED_MODE_MASK(index);	led_reg |= IXGBE_LED_ON << IXGBE_LED_MODE_SHIFT(index);	IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);	return 0;}/** *  ixgbe_led_off - Turns off the software controllable LEDs. *  @hw: pointer to hardware structure *  @index: led number to turn off **/s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index){	u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);	/* To turn off the LED, set mode to OFF. */	led_reg &= ~IXGBE_LED_MODE_MASK(index);	led_reg |= IXGBE_LED_OFF << IXGBE_LED_MODE_SHIFT(index);	IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);	return 0;}/** *  ixgbe_init_eeprom - Initialize EEPROM params *  @hw: pointer to hardware structure * *  Initializes the EEPROM parameters ixgbe_eeprom_info within the *  ixgbe_hw struct in order to set up EEPROM access. **/s32 ixgbe_init_eeprom(struct ixgbe_hw *hw){	struct ixgbe_eeprom_info *eeprom = &hw->eeprom;	u32 eec;	u16 eeprom_size;	if (eeprom->type == ixgbe_eeprom_uninitialized) {		eeprom->type = ixgbe_eeprom_none;		/*		 * Check for EEPROM present first.		 * If not present leave as none		 */		eec = IXGBE_READ_REG(hw, IXGBE_EEC);		if (eec & IXGBE_EEC_PRES) {			eeprom->type = ixgbe_eeprom_spi;			/*			 * SPI EEPROM is assumed here.  This code would need to			 * change if a future EEPROM is not SPI.			 */			eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >>					    IXGBE_EEC_SIZE_SHIFT);			eeprom->word_size = 1 << (eeprom_size +						  IXGBE_EEPROM_WORD_SIZE_SHIFT);		}		if (eec & IXGBE_EEC_ADDR_SIZE)			eeprom->address_bits = 16;		else			eeprom->address_bits = 8;		hw_dbg(hw, "Eeprom params: type = %d, size = %d, address bits: "			  "%d\n", eeprom->type, eeprom->word_size,			  eeprom->address_bits);	}	return 0;}/** *  ixgbe_read_eeprom - Read EEPROM word using EERD *  @hw: pointer to hardware structure *  @offset: offset of  word in the EEPROM to read *  @data: word read from the EEPROM * *  Reads a 16 bit word from the EEPROM using the EERD register. **/s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data){	u32 eerd;	s32 status;	eerd = (offset << IXGBE_EEPROM_READ_ADDR_SHIFT) +	       IXGBE_EEPROM_READ_REG_START;	IXGBE_WRITE_REG(hw, IXGBE_EERD, eerd);	status = ixgbe_poll_eeprom_eerd_done(hw);	if (status == 0)		*data = (IXGBE_READ_REG(hw, IXGBE_EERD) >>			IXGBE_EEPROM_READ_REG_DATA);	else		hw_dbg(hw, "Eeprom read timed out\n");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区不卡| 午夜a成v人精品| 成人久久久精品乱码一区二区三区| 日韩一区二区视频| 国内成人自拍视频| 中文一区二区完整视频在线观看| 不卡的av网站| 亚洲国产成人tv| 亚洲精品在线网站| 播五月开心婷婷综合| 亚洲精品国产无天堂网2021| 欧美人与性动xxxx| 久久99精品国产.久久久久久| 精品少妇一区二区三区在线播放| 国产麻豆一精品一av一免费| 国产精品久久久久久久久晋中| 色综合天天综合色综合av| 丝袜脚交一区二区| 久久久久国产一区二区三区四区 | 99久久久无码国产精品| 亚洲欧美一区二区久久| 91精品国产欧美一区二区| 国产美女精品一区二区三区| 亚洲资源中文字幕| 精品国产一区二区精华| aaa国产一区| 日本成人超碰在线观看| 亚洲欧洲一区二区在线播放| 欧美三级蜜桃2在线观看| 国产一区二区福利视频| 亚洲精品免费视频| 欧美v国产在线一区二区三区| av中文字幕不卡| 蜜乳av一区二区| 中文字幕中文在线不卡住| 欧美一区二区在线视频| 91视频免费看| 久久99热狠狠色一区二区| 亚洲色图制服诱惑 | 日韩欧美精品在线| 96av麻豆蜜桃一区二区| 久久国产精品色| 一区二区三区四区不卡在线| 久久精品亚洲国产奇米99| 欧美日精品一区视频| 成人污视频在线观看| 日韩国产欧美视频| 亚洲欧洲日韩av| 久久亚洲精精品中文字幕早川悠里 | 欧美videossexotv100| 色94色欧美sute亚洲线路一久 | 性欧美大战久久久久久久久| 国产精品伦一区| 久久综合九色综合97婷婷女人| 欧美专区日韩专区| 色欲综合视频天天天| 国产999精品久久久久久| 蜜臀久久99精品久久久画质超高清| 亚洲精品视频自拍| 综合欧美亚洲日本| 国产农村妇女毛片精品久久麻豆| 日韩一区二区三区视频在线| 欧美日韩不卡视频| 欧洲一区二区av| 91麻豆自制传媒国产之光| 丰满少妇在线播放bd日韩电影| 狠狠色综合色综合网络| 免费日韩伦理电影| 欧美aⅴ一区二区三区视频| 一区二区日韩电影| 伊人色综合久久天天人手人婷| 1000精品久久久久久久久| 国产精品午夜电影| 国产欧美日韩三级| 久久综合色婷婷| 精品粉嫩aⅴ一区二区三区四区| 日韩亚洲欧美一区| 日韩欧美亚洲国产精品字幕久久久| 91精品国产欧美日韩| 4438成人网| 日韩欧美国产高清| 精品电影一区二区| 国产亚洲欧洲997久久综合| 久久亚洲一级片| 亚洲国产成人自拍| 成人欧美一区二区三区视频网页 | 欧美日韩中文另类| 欧美剧情片在线观看| 91精品国产全国免费观看| 日韩亚洲欧美成人一区| 欧美成人伊人久久综合网| 久久综合狠狠综合久久综合88| 久久久久久久久蜜桃| 欧美国产日产图区| 亚洲裸体xxx| 亚洲成国产人片在线观看| 三级一区在线视频先锋| 精品午夜久久福利影院 | 91视频xxxx| 欧美在线三级电影| 欧美一区二区性放荡片| 久久久久久久久99精品| ●精品国产综合乱码久久久久 | 欧美mv日韩mv亚洲| 国产精品网站在线| 亚洲一区二区三区四区在线观看| 三级在线观看一区二区| 国产一区999| 91久久精品网| 欧美不卡一二三| 国产精品美女一区二区三区 | 亚洲国产成人午夜在线一区| 亚洲图片欧美激情| 日韩成人免费电影| 丁香天五香天堂综合| 欧美日韩国产高清一区| 久久网这里都是精品| 亚洲精品欧美专区| 激情综合色综合久久| 91国偷自产一区二区开放时间 | 欧美精品精品一区| 久久午夜国产精品| 天堂蜜桃91精品| 成人av片在线观看| 欧美一级视频精品观看| 国产精品久久久久四虎| 男人的天堂亚洲一区| 日本高清不卡aⅴ免费网站| 久久久久高清精品| 人人爽香蕉精品| 一本大道久久a久久综合婷婷 | 国产日韩欧美激情| 男人操女人的视频在线观看欧美| 不卡高清视频专区| 久久蜜臀精品av| 蜜臀久久99精品久久久久久9| 在线免费观看视频一区| 国产视频一区在线播放| 青青草91视频| 欧洲一区二区av| 中文字幕日本不卡| 国产高清久久久久| 久久先锋影音av| 麻豆精品视频在线观看| 欧美日韩aaaaaa| 一区二区三区在线免费| 成人久久视频在线观看| 国产视频在线观看一区二区三区| 伦理电影国产精品| 9191久久久久久久久久久| 亚洲综合999| 色综合久久久网| 亚洲激情六月丁香| 成人av电影观看| 亚洲国产高清不卡| 成人亚洲一区二区一| 国产日韩欧美高清| 国产精品一区不卡| 亚洲国产成人一区二区三区| 国产精品2024| 国产欧美日韩视频在线观看| 国产精品一区2区| 欧美—级在线免费片| 韩国v欧美v亚洲v日本v| 26uuu色噜噜精品一区二区| 免费在线观看一区| 欧美mv日韩mv国产| 国产一区二区按摩在线观看| 久久精品一区二区三区四区| 国产乱码字幕精品高清av| 久久综合99re88久久爱| 国产精品一区免费视频| 欧美国产亚洲另类动漫| 99久久99久久综合| 亚洲风情在线资源站| 91精品国产免费| 国内精品在线播放| 国产精品久久网站| 91免费观看在线| 亚洲成人精品在线观看| 91精品国产高清一区二区三区蜜臀 | 国产激情精品久久久第一区二区| 国产丝袜欧美中文另类| caoporen国产精品视频| 一区二区三区在线观看视频| 欧美日韩精品三区| 精品一区二区三区香蕉蜜桃| 久久精品视频在线免费观看| va亚洲va日韩不卡在线观看| 亚洲蜜臀av乱码久久精品| 欧美浪妇xxxx高跟鞋交| 国产麻豆精品在线观看| 亚洲欧洲精品一区二区三区不卡 | 日本人妖一区二区| 久久久久国产精品厨房| 97精品国产露脸对白| 天堂午夜影视日韩欧美一区二区| 欧美精品一区二区三区蜜臀| 成人aa视频在线观看| 香蕉加勒比综合久久|