亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲国产精品久久久久婷婷884| 欧美日韩一区二区三区四区五区 | 欧美精品乱码久久久久久按摩| 欧美日韩免费观看一区三区| 欧美xxxxx牲另类人与| 久久免费偷拍视频| 亚洲欧美一区二区三区孕妇| 亚洲1区2区3区4区| 国产精品综合av一区二区国产馆| 成人精品国产福利| 欧美在线观看视频一区二区| 精品国产一区a| 亚洲区小说区图片区qvod| 日本不卡在线视频| 成人手机在线视频| 欧美麻豆精品久久久久久| 国产网红主播福利一区二区| 一区二区三区四区精品在线视频| 久久99精品国产.久久久久久| 不卡一卡二卡三乱码免费网站| 777欧美精品| 国产精品妹子av| 奇米影视一区二区三区| av成人老司机| 精品美女一区二区| 一区二区欧美国产| 国产成人精品在线看| 91精品国产欧美一区二区18 | 91麻豆国产精品久久| 日韩欧美亚洲一区二区| 亚洲丝袜另类动漫二区| 国模大尺度一区二区三区| 欧洲国产伦久久久久久久| 国产欧美精品一区| 免费成人在线影院| 欧美在线免费观看视频| 欧美国产精品v| 免费美女久久99| 色婷婷av久久久久久久| 国产亚洲一区二区三区四区 | 日韩免费电影网站| 亚洲综合久久av| 成人免费的视频| 精品99久久久久久| 日韩精品欧美精品| 欧美亚洲高清一区| 亚洲欧美日韩在线| 福利一区二区在线观看| 欧美成人一区二区三区| 亚洲成人一区在线| 色婷婷精品久久二区二区蜜臀av | 色综合久久综合中文综合网| 精品99999| 秋霞国产午夜精品免费视频| 欧美性受xxxx黑人xyx| 亚洲尤物视频在线| 99久久精品免费看| 免费看精品久久片| 久久只精品国产| 国产一区日韩二区欧美三区| 国产精品成人一区二区三区夜夜夜| 欧美午夜精品久久久久久孕妇| 天天做天天摸天天爽国产一区 | 视频在线观看国产精品| 99国产精品99久久久久久| 精品国产电影一区二区| 青青草国产成人av片免费| 欧美日韩国产欧美日美国产精品| 亚洲欧美综合另类在线卡通| 成人国产免费视频| 国产精品2024| 最新不卡av在线| 亚洲乱码一区二区三区在线观看| 不卡欧美aaaaa| 国产精品家庭影院| 不卡电影一区二区三区| 国产精品久久久久久久久久久免费看| 国产91精品久久久久久久网曝门| 国产午夜一区二区三区| 国产精品系列在线播放| 国产亚洲一本大道中文在线| 国产精品 日产精品 欧美精品| 日本一区二区久久| a级精品国产片在线观看| 亚洲色图欧美激情| 色婷婷香蕉在线一区二区| 亚洲男女一区二区三区| 在线亚洲精品福利网址导航| 亚洲国产美女搞黄色| 欧美人与性动xxxx| 免费成人av在线播放| 久久久精品国产99久久精品芒果| 国产91丝袜在线播放九色| 中文字幕制服丝袜成人av| 色www精品视频在线观看| 亚洲成人综合在线| 精品蜜桃在线看| 国产精品一品二品| 亚洲人成电影网站色mp4| 欧美日韩在线三级| 麻豆国产精品777777在线| 久久久久久一二三区| 99精品欧美一区二区三区小说 | 欧洲av一区二区嗯嗯嗯啊| 日本欧美久久久久免费播放网| 精品对白一区国产伦| 风间由美一区二区av101| 尤物视频一区二区| 欧美一区二区免费| 丁香六月综合激情| 亚洲一二三四在线| 精品国产亚洲一区二区三区在线观看 | 成人性视频免费网站| 亚洲人成小说网站色在线| 欧美日本国产视频| 成人一区二区在线观看| 亚洲午夜一区二区三区| 精品久久久久久最新网址| 99久久精品国产一区| 天天亚洲美女在线视频| 国产午夜久久久久| 欧美视频一区二| 国产在线播精品第三| 尤物视频一区二区| 精品久久久久久久久久久久久久久 | 欧美一区永久视频免费观看| 国产精品69毛片高清亚洲| 一区二区三区四区亚洲| 日韩免费一区二区| 91麻豆自制传媒国产之光| 美女视频网站久久| 亚洲欧美日韩国产成人精品影院| 日韩欧美精品三级| 色哟哟国产精品| 国产成人啪免费观看软件| 日韩精品久久理论片| 国产精品久久久久影院亚瑟| 日韩一级高清毛片| 91视频com| 国产一区视频在线看| 亚洲国产va精品久久久不卡综合| 久久久久9999亚洲精品| 欧美一区二区视频在线观看2020| 成人激情文学综合网| 乱一区二区av| 亚洲高清久久久| 亚洲色图色小说| 久久精品亚洲乱码伦伦中文| 欧美精品色综合| 一本色道久久综合亚洲精品按摩| 国产一区欧美日韩| 日本亚洲欧美天堂免费| 一区二区在线观看视频| 欧美国产综合一区二区| 欧美成人性战久久| 欧美日本一道本| 色婷婷精品久久二区二区蜜臂av | 国产精品热久久久久夜色精品三区| 欧美一级欧美一级在线播放| 在线观看日韩电影| 成人av先锋影音| 国产福利一区二区三区视频在线 | 欧美猛男gaygay网站| 99精品国产99久久久久久白柏| 国产在线播放一区三区四| 日韩精品五月天| 三级欧美在线一区| 亚洲午夜免费电影| 亚洲精品国产无天堂网2021| 国产精品久久久久久亚洲伦| 国产午夜精品一区二区三区嫩草 | 成人中文字幕电影| 精品一区二区三区在线视频| 视频一区二区国产| 水蜜桃久久夜色精品一区的特点| 亚洲一区二区三区四区五区黄| 成人欧美一区二区三区| 国产精品拍天天在线| 中文字幕乱码一区二区免费| 国产三级三级三级精品8ⅰ区| 久久精品一区二区三区不卡| 久久久五月婷婷| 久久先锋影音av鲁色资源网| 精品福利在线导航| 久久综合久久鬼色中文字| www久久精品| 国产日韩高清在线| 亚洲国产成人在线| 中文字幕一区二区三区乱码在线 | 日本精品一区二区三区四区的功能| 不卡av在线网| 99精品欧美一区二区三区小说| 91一区二区三区在线观看| 91亚洲国产成人精品一区二三| 99久久99久久精品免费看蜜桃| 高清国产一区二区三区| 成人精品免费看| 99久久久国产精品| 欧美色精品在线视频| 91麻豆精品91久久久久同性|