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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? skvpd.c

?? giga網(wǎng)卡完整的驅(qū)動代碼,系統(tǒng)是linux,可以了解整個網(wǎng)卡驅(qū)動在linux系統(tǒng)的結(jié)構(gòu),并且包含了giga模式的特有接口的實(shí)現(xiàn).
?? C
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************************** * * Name:	skvpd.c * Project:	GEnesis, PCI Gigabit Ethernet Adapter * Version:	$Revision: 1.37 $ * Date:	$Date: 2003/01/13 10:42:45 $ * Purpose:	Shared software to read and write VPD data * ******************************************************************************//****************************************************************************** * *	(C)Copyright 1998-2003 SysKonnect GmbH. * *	This program is free software; you can redistribute it and/or modify *	it under the terms of the GNU General Public License as published by *	the Free Software Foundation; either version 2 of the License, or *	(at your option) any later version. * *	The information in this file is provided "AS IS" without warranty. * ******************************************************************************//****************************************************************************** * * History: * *	$Log: skvpd.c,v $ *	Revision 1.37  2003/01/13 10:42:45  rschmidt *	Replaced check for PCI device Id from YUKON with GENESIS *	to set the VPD size in VpdInit() *	Editorial changes *	 *	Revision 1.36  2002/11/14 15:16:56  gheinig *	Added const specifier to key and buf parameters for VpdPara, VpdRead *	and VpdWrite for Diag 7 GUI *	 *	Revision 1.35  2002/10/21 14:31:59  gheinig *	Took out CVS web garbage at head of file *	 *	Revision 1.34  2002/10/21 11:47:24  gheinig *	Reverted to version 1.32 due to unwanted commit *	 *	Revision 1.32  2002/10/14 16:04:29  rschmidt *	Added saving of VPD ROM Size from PCI_OUR_REG_2 *	Avoid reading of PCI_OUR_REG_2 in VpdTransferBlock() *	Editorial changes *	 *	Revision 1.31  2002/09/10 09:21:32  mkarl *	Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis *	 *	Revision 1.30  2002/09/09 14:43:03  mkarl *	changes for diagnostics in order to read VPD data before the adapter *	has been initialized *	editorial changes *	 *	Revision 1.29  2002/07/26 13:20:43  mkarl *	added Yukon support *	save size of VPD in pAC->vpd.vpd_size *	 *	Revision 1.28  2002/04/02 15:31:47  afischer *	Bug fix in VpdWait() *	 *	Revision 1.27  2000/08/10 11:29:06  rassmann *	Editorial changes. *	Preserving 32-bit alignment in structs for the adapter context. *	Removed unused function VpdWriteDword() (#if 0). *	Made VpdReadKeyword() available for SKDIAG only. *	 *	Revision 1.26  2000/06/13 08:00:01  mkarl *	additional cast to avoid compile problems in 64 bit environment *	 *	Revision 1.25  1999/11/22 13:39:32  cgoos *	Changed license header to GPL. *	 *	Revision 1.24  1999/03/11 14:25:49  malthoff *	Replace __STDC__ with SK_KR_PROTO. *	 *	Revision 1.23  1999/01/11 15:13:11  gklug *	fix: syntax error *	 *	Revision 1.22  1998/10/30 06:41:15  gklug *	rmv: WARNING *	 *	Revision 1.21  1998/10/29 07:15:14  gklug *	fix: Write Stream function needs verify. *	 *	Revision 1.20  1998/10/28 18:05:08  gklug *	chg: no DEBUG in VpdMayWrite *	 *	Revision 1.19  1998/10/28 15:56:11  gklug *	fix: Return len at end of ReadStream *	fix: Write even less than 4 bytes correctly *	 *	Revision 1.18  1998/10/28 09:00:47  gklug *	fix: unreferenced local vars *	 *	Revision 1.17  1998/10/28 08:25:45  gklug *	fix: WARNING *	 *	Revision 1.16  1998/10/28 08:17:30  gklug *	fix: typo *	 *	Revision 1.15  1998/10/28 07:50:32  gklug *	fix: typo *	 *	Revision 1.14  1998/10/28 07:20:38  gklug *	chg: Interface functions to use IoC as parameter as well *	fix: VpdRead/WriteDWord now returns SK_U32 *	chg: VPD_IN/OUT names conform to SK_IN/OUT *	add: usage of VPD_IN/OUT8 macros *	add: VpdRead/Write Stream functions to r/w a stream of data *	fix: VpdTransferBlock swapped illegal *	add: VpdMayWrite *	 *	Revision 1.13  1998/10/22 10:02:37  gklug *	fix: SysKonnectFileId typo *	 *	Revision 1.12  1998/10/20 10:01:01  gklug *	fix: parameter to SkOsGetTime *	 *	Revision 1.11  1998/10/15 12:51:48  malthoff *	Remove unrequired parameter p in vpd_setup_para(). *	 *	Revision 1.10  1998/10/08 14:52:43  malthoff *	Remove CvsId by SysKonnectFileId. *	 *	Revision 1.9  1998/09/16 07:33:52  malthoff *	replace memcmp() by SK_MEMCMP and *	memcpy() by SK_MEMCPY() to be *	independent from the 'C' Standard Library. *	 *	Revision 1.8  1998/08/19 12:52:35  malthoff *	compiler fix: use SK_VPD_KEY instead of S_VPD. *	 *	Revision 1.7  1998/08/19 08:14:01  gklug *	fix: remove struct keyword as much as possible from the C-code (see CCC) *	 *	Revision 1.6  1998/08/18 13:03:58  gklug *	SkOsGetTime now returns SK_U64 *	 *	Revision 1.5  1998/08/18 08:17:29  malthoff *	Ensure we issue a VPD read in vpd_read_dword(). *	Discard all VPD keywords other than Vx or Yx, where *	x is '0..9' or 'A..Z'. *	 *	Revision 1.4  1998/07/03 14:52:19  malthoff *	Add category SK_DBGCAT_FATAL to some debug macros. *	bug fix: correct the keyword name check in vpd_write(). *	 *	Revision 1.3  1998/06/26 11:16:53  malthoff *	Correct the modified File Identifier. *	 *	Revision 1.2  1998/06/26 11:13:43  malthoff *	Modify the File Identifier. *	 *	Revision 1.1  1998/06/19 14:11:08  malthoff *	Created, Tests with AIX were performed successfully *	 * ******************************************************************************//*	Please refer skvpd.txt for infomation how to include this module */static const char SysKonnectFileId[] =	"@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK";#include "h/skdrv1st.h"#include "h/sktypes.h"#include "h/skdebug.h"#include "h/skdrv2nd.h"/* * Static functions */#ifndef SK_KR_PROTOstatic SK_VPD_PARA	*vpd_find_para(	SK_AC	*pAC,	const char	*key,	SK_VPD_PARA *p);#else	/* SK_KR_PROTO */static SK_VPD_PARA	*vpd_find_para();#endif	/* SK_KR_PROTO *//* * waits for a completion of a VPD transfer * The VPD transfer must complete within SK_TICKS_PER_SEC/16 * * returns	0:	success, transfer completes *		error	exit(9) with a error message */static int VpdWait(SK_AC	*pAC,	/* Adapters context */SK_IOC	IoC,	/* IO Context */int		event)	/* event to wait for (VPD_READ / VPD_write) completion*/{	SK_U64	start_time;	SK_U16	state;	SK_DBG_MSG(pAC,SK_DBGMOD_VPD, SK_DBGCAT_CTRL,		("VPD wait for %s\n", event?"Write":"Read"));	start_time = SkOsGetTime(pAC);	do {		if (SkOsGetTime(pAC) - start_time > SK_TICKS_PER_SEC) {			/* Bug fix AF: Thu Mar 28 2002			 * Do not call: VPD_STOP(pAC, IoC);			 * A pending VPD read cycle can not be aborted by writing			 * VPD_WRITE to the PCI_VPD_ADR_REG (VPD address register).			 * Although the write threshold in the OUR-register protects			 * VPD read only space from being overwritten this does not			 * protect a VPD read from being `converted` into a VPD write			 * operation (on the fly). As a consequence the VPD_STOP would			 * delete VPD read only data. In case of any problems with the			 * I2C bus we exit the loop here. The I2C read operation can			 * not be aborted except by a reset (->LR).			 */			SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_FATAL | SK_DBGCAT_ERR,				("ERROR:VPD wait timeout\n"));			return(1);		}				VPD_IN16(pAC, IoC, PCI_VPD_ADR_REG, &state);				SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,			("state = %x, event %x\n",state,event));	} while((int)(state & PCI_VPD_FLAG) == event);	return(0);}#ifdef SKDIAG/* * Read the dword at address 'addr' from the VPD EEPROM. * * Needed Time:	MIN 1,3 ms	MAX 2,6 ms * * Note: The DWord is returned in the endianess of the machine the routine *       is running on. * * Returns the data read. */SK_U32 VpdReadDWord(SK_AC	*pAC,	/* Adapters context */SK_IOC	IoC,	/* IO Context */int		addr)	/* VPD address */{	SK_U32	Rtv;	/* start VPD read */	SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,		("VPD read dword at 0x%x\n",addr));	addr &= ~VPD_WRITE;		/* ensure the R/W bit is set to read */	VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, (SK_U16)addr);	/* ignore return code here */	(void)VpdWait(pAC, IoC, VPD_READ);	/* Don't swap here, it's a data stream of bytes */	Rtv = 0;	VPD_IN32(pAC, IoC, PCI_VPD_DAT_REG, &Rtv);		SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,		("VPD read dword data = 0x%x\n",Rtv));	return(Rtv);}#endif	/* SKDIAG */#if 0/*	Write the dword 'data' at address 'addr' into the VPD EEPROM, and	verify that the data is written. Needed Time:.				MIN		MAX. -------------------------------------------------------------------. write				1.8 ms		3.6 ms. internal write cyles		0.7 ms		7.0 ms. -------------------------------------------------------------------. over all program time	 	2.5 ms		10.6 ms. read				1.3 ms		2.6 ms. -------------------------------------------------------------------. over all 			3.8 ms		13.2 ms. Returns	0:	success			1:	error,	I2C transfer does not terminate			2:	error,	data verify error */static int VpdWriteDWord(SK_AC	*pAC,	/* pAC pointer */SK_IOC	IoC,	/* IO Context */int		addr,	/* VPD address */SK_U32	data)	/* VPD data to write */{	/* start VPD write */	/* Don't swap here, it's a data stream of bytes */	SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,		("VPD write dword at addr 0x%x, data = 0x%x\n",addr,data));	VPD_OUT32(pAC, IoC, PCI_VPD_DAT_REG, (SK_U32)data);	/* But do it here */	addr |= VPD_WRITE;	VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, (SK_U16)(addr | VPD_WRITE));	/* this may take up to 10,6 ms */	if (VpdWait(pAC, IoC, VPD_WRITE)) {		SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,			("Write Timed Out\n"));		return(1);	};	/* verify data */	if (VpdReadDWord(pAC, IoC, addr) != data) {		SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,			("Data Verify Error\n"));		return(2);	}	return(0);}	/* VpdWriteDWord */#endif	/* 0 *//* *	Read one Stream of 'len' bytes of VPD data, starting at 'addr' from *	or to the I2C EEPROM. * * Returns number of bytes read / written. */static int VpdWriteStream(SK_AC	*pAC,	/* Adapters context */SK_IOC	IoC,	/* IO Context */char	*buf,	/* data buffer */int		Addr,	/* VPD start address */int		Len)	/* number of bytes to read / to write */{	int		i;	int		j;	SK_U16	AdrReg;	int		Rtv;	SK_U8	* pComp;	/* Compare pointer */	SK_U8	Data;		/* Input Data for Compare */	/* Init Compare Pointer */	pComp = (SK_U8 *) buf;	for (i = 0; i < Len; i++, buf++) {		if ((i%sizeof(SK_U32)) == 0) {			/*			 * At the begin of each cycle read the Data Reg			 * So it is initialized even if only a few bytes			 * are written.			 */			AdrReg = (SK_U16) Addr;			AdrReg &= ~VPD_WRITE;	/* READ operation */			VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);			/* Wait for termination */			Rtv = VpdWait(pAC, IoC, VPD_READ);			if (Rtv != 0) {				return(i);			}		}		/* Write current Byte */		VPD_OUT8(pAC, IoC, PCI_VPD_DAT_REG + (i%sizeof(SK_U32)),				*(SK_U8*)buf);		if (((i%sizeof(SK_U32)) == 3) || (i == (Len - 1))) {			/* New Address needs to be written to VPD_ADDR reg */			AdrReg = (SK_U16) Addr;			Addr += sizeof(SK_U32);			AdrReg |= VPD_WRITE;	/* WRITE operation */			VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);			/* Wait for termination */			Rtv = VpdWait(pAC, IoC, VPD_WRITE);			if (Rtv != 0) {				SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,					("Write Timed Out\n"));				return(i - (i%sizeof(SK_U32)));			}			/*			 * Now re-read to verify			 */			AdrReg &= ~VPD_WRITE;	/* READ operation */			VPD_OUT16(pAC, IoC, PCI_VPD_ADR_REG, AdrReg);			/* Wait for termination */			Rtv = VpdWait(pAC, IoC, VPD_READ);			if (Rtv != 0) {				SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,					("Verify Timed Out\n"));				return(i - (i%sizeof(SK_U32)));			}			for (j = 0; j <= (int)(i%sizeof(SK_U32)); j++, pComp++) {								VPD_IN8(pAC, IoC, PCI_VPD_DAT_REG + j, &Data);								if (Data != *pComp) {					/* Verify Error */					SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,						("WriteStream Verify Error\n"));					return(i - (i%sizeof(SK_U32)) + j);				}			}		}	}	return(Len);}	/* *	Read one Stream of 'len' bytes of VPD data, starting at 'addr' from *	or to the I2C EEPROM. * * Returns number of bytes read / written. */static int VpdReadStream(SK_AC	*pAC,	/* Adapters context */SK_IOC	IoC,	/* IO Context */char	*buf,	/* data buffer */int		Addr,	/* VPD start address */int		Len)	/* number of bytes to read / to write */{	int		i;	SK_U16	AdrReg;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕一区| 国产亚洲欧美色| 亚洲精品一二三| 99热这里都是精品| 国产精品久久久久aaaa樱花| 成人免费毛片a| 国产精品你懂的| 99精品热视频| 亚洲尤物视频在线| 欧美一区二区女人| 国产在线一区观看| 国产精品丝袜一区| 欧美主播一区二区三区美女| 午夜视频久久久久久| 欧美大白屁股肥臀xxxxxx| 国产精品77777| 专区另类欧美日韩| 欧美日韩在线不卡| 蜜臀va亚洲va欧美va天堂| 国产无人区一区二区三区| 成人免费视频播放| 亚洲六月丁香色婷婷综合久久| 在线亚洲高清视频| 麻豆精品一区二区综合av| 国产欧美日韩另类一区| 成人av免费在线观看| 一区二区三区在线视频观看| 日韩精品中文字幕一区二区三区| av欧美精品.com| 五月天网站亚洲| 日本一区二区在线不卡| 欧美日韩在线播放三区四区| 国产精品一二三在| 午夜精品一区二区三区免费视频| 久久久久久毛片| 欧美日韩午夜影院| 成人午夜私人影院| 日韩高清中文字幕一区| 国产精品高潮呻吟| 日韩美女天天操| 欧美性猛交xxxx黑人交| 国产一区二三区好的| 亚洲成a人片综合在线| 国产精品丝袜91| 日韩欧美国产精品| 99精品黄色片免费大全| 免费欧美高清视频| 亚洲色图欧洲色图| www日韩大片| 欧美最新大片在线看| 国产在线一区观看| 国产精品久久久久久福利一牛影视| 91色porny蝌蚪| 精品亚洲aⅴ乱码一区二区三区| 一区二区在线观看免费| 欧美大胆一级视频| 色呦呦一区二区三区| 国产精品中文字幕日韩精品| 亚洲r级在线视频| 亚洲图片另类小说| 欧美一卡二卡在线| 成人动漫一区二区在线| 久久99精品国产麻豆不卡| 亚洲私人黄色宅男| 欧美精品一区二区在线观看| 日本精品一区二区三区高清| 岛国精品一区二区| 狠狠久久亚洲欧美| 亚洲午夜日本在线观看| 国产精品妹子av| 国产人妖乱国产精品人妖| 精品国产亚洲一区二区三区在线观看| 欧美日韩高清影院| 欧美视频中文字幕| a级高清视频欧美日韩| 成人18精品视频| 成人av免费在线观看| 成人一区二区三区视频| 三级久久三级久久久| 亚洲嫩草精品久久| 亚洲精品国产成人久久av盗摄 | 日韩不卡一区二区| 亚洲欧美激情一区二区| 亚洲免费av高清| 亚洲精品国产高清久久伦理二区| 久久久久亚洲蜜桃| 精品三级在线观看| 日韩一区二区三区在线| 日韩亚洲国产中文字幕欧美| 欧美精三区欧美精三区| 在线免费观看不卡av| 欧美视频在线播放| 日韩精品最新网址| 久久久午夜精品理论片中文字幕| 国产午夜精品福利| 中文字幕在线免费不卡| 亚洲综合精品自拍| 肉丝袜脚交视频一区二区| 日韩av中文字幕一区二区三区| 日韩国产欧美三级| 日产欧产美韩系列久久99| 日韩中文欧美在线| 精品一区二区三区蜜桃| 久久精品国产一区二区三| 久久国产剧场电影| 成人一道本在线| 欧美在线制服丝袜| 欧美日韩久久不卡| 久久中文娱乐网| 一区在线中文字幕| 香蕉加勒比综合久久| 精品一区二区三区免费播放| 99热99精品| 欧美亚一区二区| 在线视频你懂得一区二区三区| 在线观看亚洲成人| 久久婷婷国产综合精品青草| 一个色妞综合视频在线观看| 久久99精品久久久久久| 91色porny在线视频| 欧美一级欧美三级在线观看 | 成人免费毛片a| 欧美三级电影一区| 国产日韩欧美在线一区| 亚洲成人在线网站| 国产传媒欧美日韩成人| 7777精品伊人久久久大香线蕉超级流畅| 欧美成人福利视频| 亚洲综合视频在线观看| 国产成人在线色| 欧美一区二区视频在线观看 | 亚洲一二三区不卡| 日韩av高清在线观看| 99久久99久久综合| 精品伦理精品一区| 亚洲欧洲三级电影| 男女男精品视频网| 欧美三片在线视频观看| 国产欧美日韩视频在线观看| 午夜激情久久久| av网站一区二区三区| 欧美变态tickle挠乳网站| 午夜伦理一区二区| 色综合久久久久综合| 中文字幕第一区综合| 激情五月婷婷综合网| 欧美日本一区二区三区四区| 亚洲精品成人a在线观看| 成人免费毛片a| 国产欧美一区视频| 国产剧情av麻豆香蕉精品| 日韩一区和二区| 天天av天天翘天天综合网色鬼国产| 一本大道久久a久久精品综合| 国产欧美综合色| 国产成人免费视频一区| 久久精品亚洲精品国产欧美| 美女视频网站久久| 欧美一区二区在线播放| 调教+趴+乳夹+国产+精品| 欧美三级电影一区| 午夜久久久久久| 精品视频一区二区不卡| 亚洲成人777| 欧美在线免费观看亚洲| 日韩美女久久久| av福利精品导航| 国产精品乱码妇女bbbb| 国产一区二区三区不卡在线观看| 日韩三级视频在线看| 日韩电影在线免费观看| 欧美日韩一区二区电影| 亚洲成人精品影院| 制服丝袜av成人在线看| 日韩精品乱码av一区二区| 日韩一区二区在线观看| 国产美女精品一区二区三区| 久久久美女艺术照精彩视频福利播放| 美女网站色91| 久久亚洲精品小早川怜子| 国产ts人妖一区二区| 国产日韩欧美综合一区| 成人av片在线观看| 一区二区三区四区国产精品| 色婷婷激情一区二区三区| 国产精品白丝在线| 91国产成人在线| 人人精品人人爱| 国产亚洲精品aa| 91美女福利视频| 日本不卡一二三区黄网| 久久久精品免费网站| 色综合天天综合在线视频| 亚洲777理论| 久久伊人蜜桃av一区二区| 99在线精品一区二区三区| 亚洲成人av电影| 久久久777精品电影网影网 | 欧美吞精做爰啪啪高潮| 麻豆精品视频在线观看免费|