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

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

?? smc91x.c

?? lubbock是Intel官方為pxa255提供的bios
?? C
?? 第 1 頁 / 共 3 頁
字號:
	do {		status = SMC_inb( INT_REG );		if ( status & IM_ALLOC_INT ) {			/* acknowledge the interrupt */			SMC_outb( IM_ALLOC_INT, INT_REG );  			break;		}   	} while ( -- time_out );   	if ( !time_out ) {			PRINTK2("%s: memory allocation, try %d failed, Reset MMU ...\n",				SMC_DEV_NAME, try);						/* Reset the MMU */			SMC_SELECT_BANK( 2 );			SMC_outw( MC_RESET, MMU_CMD_REG );			while ( SMC_inw( MMU_CMD_REG ) & MC_BUSY )				msleep(1); // Wait until not busy			if (try < SMC_ALLOC_MAX_TRY)				goto again;			else				return 0;			}	PRINTK2("%s: memory allocation, try %d succeeded ...\n",		SMC_DEV_NAME,		try);	/* I can send the packet now.. */	ioaddr = SMC_BASE_ADDRESS;	buf = (byte *)packet;	/* If I get here, I _know_ there is a packet slot waiting for me */	packet_no = SMC_inb( AR_REG );	if ( packet_no & AR_FAILED ) {		/* or isn't there?  BAD CHIP! */		printf("%s: Memory allocation failed. \n",			SMC_DEV_NAME);		return 0;	}	/* we have a packet address, so tell the card to use it */	SMC_outb( packet_no, PN_REG );	/* point to the beginning of the packet */	SMC_outw( PTR_AUTOINC , PTR_REG );   	PRINTK3("%s: Trying to xmit packet of length %x\n",		SMC_DEV_NAME, length);#if SMC_DEBUG > 2	printf("Transmitting Packet\n");	print_packet( buf, length );#endif	/* send the packet length ( +6 for status, length and ctl byte ) 	   and the status word ( set to zeros ) */#ifdef USE_32_BIT	SMC_outl(  (length +6 ) << 16 , DATA_REG );#else	SMC_outw( 0, DATA_REG );	/* send the packet length ( +6 for status words, length, and ctl*/	SMC_outw( (length+6), DATA_REG );#endif	/* send the actual data	 . I _think_ it's faster to send the longs first, and then	 . mop up by sending the last word.  It depends heavily 	 . on alignment, at least on the 486.  Maybe it would be 	 . a good idea to check which is optimal?  But that could take	 . almost as much time as is saved?	*/#ifdef USE_32_BIT	SMC_outsl(DATA_REG, buf,  length >> 2 );	if ( length & 0x2  )		SMC_outw(*((word *)(buf + (length & 0xFFFFFFFC))), DATA_REG);#else	SMC_outsw(DATA_REG , buf, (length ) >> 1);#endif // USE_32_BIT	/* Send the last byte, if there is one.   */	if ( (length & 1) == 0 ) {		SMC_outw( 0, DATA_REG );	} else {		SMC_outw( buf[length -1 ] | 0x2000, DATA_REG );	}	/* and let the chipset deal with it */	SMC_outw( MC_ENQUEUE , MMU_CMD_REG );	while ( !(status = SMC_inb(INT_REG)) & IM_TX_EMPTY_INT)  ;	if ( status & IM_TX_EMPTY_INT) {		// Ack TX_EMPTY		SMC_outb( IM_TX_EMPTY_INT, INT_REG);	}	if ( status & IM_TX_INT ) {		PRINTK("TX error occurs\n");		// ACK TX_INT, something goes wrong		SMC_outb( IM_TX_INT, INT_REG);		SMC_outw( SMC_inw(TCR_REG) | TCR_ENABLE, TCR_REG );	}		return length;}/*------------------------------------------------------------------------- | | smc_destructor( struct net_device * dev ) |   Input parameters: |	dev, pointer to the device structure | |   Output: |	None. | ---------------------------------------------------------------------------*/void smc_destructor(){	PRINTK2(CARDNAME ":smc_destructor\n");}/* * Open and Initialize the board * * Set up everything, reset the card, etc .. * */static int smc_open(){	int	i;	/* used to set hw ethernet address */	u8 	ver;	testpoint[11] = 1;	PRINTK2("%s:smc_open\n", SMC_DEV_NAME);	/* reset the hardware */	smc_reset();	smc_enable();	SMC_outw(3, BANK_SELECT);	ver = SMC_inw(REV_REG) & 0xff;	if ( ver >= 0x70 ) { //#ifndef CONFIG_SMC91111_EXT_PHY		/* Configure the PHY */		smc_phy_configure();//#endif	}	/* conservative setting (10Mbps, HalfDuplex, no AutoNeg.) *///	SMC_SELECT_BANK(0);//	SMC_outw(0, RPC_REG);	/*  		According to Becker, I have to set the hardware address		at this point, because the (l)user can set it with an		ioctl.  Easily done...	*/	SMC_SELECT_BANK( 1 );#ifdef USE_32_BIT	for ( i = 0; i < 6; i += 2 ) {		word address;		address = eth_mac_addr[ i + 1 ] << 8 ;		address  |= eth_mac_addr[ i ];		SMC_outw( address, ADDR0_REG + i );	}#else   for ( i = 0; i < 6; i ++ )		SMC_outb( eth_mac_addr[i], ADDR0_REG + i );#endif	testpoint[12] = 1;	return 0;}#ifdef USE_32_BITvoidinsl32(r,b,l) 	{	   int __i ;     dword *__b2;  	__b2 = (dword *) b;  	for (__i = 0; __i < l; __i++)    {  		  *(__b2 + __i) = *(dword *)(r+0x10000300);  	}  }#endif/*------------------------------------------------------------- . . smc_rcv -  receive a packet from the card . . There is ( at least ) a packet waiting to be read from . chip-memory. . . o Read the status . o If an error, record it . o otherwise, read in the packet --------------------------------------------------------------*/static int smc_rcv(){	int 	packet_number;	word	status;	word	packet_length;	int     is_error = 0;	struct  mybuf *packet;#ifdef USE_32_BIT   dword stat_len;#endif	SMC_SELECT_BANK(2);	packet_number = SMC_inw( RXFIFO_REG );	if ( packet_number & RXFIFO_REMPTY ) {		return 0;	}	packet = bget(0);	PRINTK3("%s:smc_rcv\n", SMC_DEV_NAME);	/*  start reading from the start of the packet */	SMC_outw( PTR_READ | PTR_RCV | PTR_AUTOINC, PTR_REG );	/* First two words are status and packet_length */#ifdef USE_32_BIT   stat_len = SMC_inl(DATA_REG);   status = stat_len & 0xffff;   packet_length = stat_len >> 16;#else	status 		= SMC_inw( DATA_REG );	packet_length 	= SMC_inw( DATA_REG );#endif	packet_length &= 0x07ff;  /* mask off top bits */	packet->len = packet_length;	PRINTK2("RCV: STATUS %4x LENGTH %4x\n", status, packet_length );	if ( !(status & RS_ERRORS ) ){		/* Adjust for having already read the first two words */		packet_length -= 4; //4;		// set odd length for bug in LAN91C111,		// which never sets RS_ODDFRAME		/* TODO ? */#ifdef USE_32_BIT		PRINTK3(" Reading %d dwords (and %d bytes) \n",			packet_length >> 2, packet_length & 3 );		/* QUESTION:  Like in the TX routine, do I want		   to send the DWORDs or the bytes first, or some		   mixture.  A mixture might improve already slow PIO		   performance  */		SMC_insl( DATA_REG , packet->buf, packet_length >> 2 );		/* read the left over bytes */	   if (packet_length & 3)       {         int i;		   byte *tail = packet->buf + (packet_length & ~3);		   dword leftover = SMC_inl(DATA_REG);		   for (i=0; i<(packet_length & 3); i++) 			   *tail++ = (byte) (leftover >> (8*i)) & 0xff;	   }	       #else		PRINTK3(" Reading %d words and %d byte(s) \n",			(packet_length >> 1 ), packet_length & 1 );		SMC_insw(DATA_REG , packet->buf, packet_length >> 1);#endif // USE_32_BIT#if	SMC_DEBUG > 2		printf("Receiving Packet\n");		print_packet( packet->buf, packet_length );#endif	} else {		/* error ... */		/* TODO ? */		is_error = 1;	}	while ( SMC_inw( MMU_CMD_REG ) & MC_BUSY )		msleep(1); // Wait until not busy	/*  error or good, tell the card to get rid of this packet */	SMC_outw( MC_RELEASE, MMU_CMD_REG );	while ( SMC_inw( MMU_CMD_REG ) & MC_BUSY )		msleep(1); // Wait until not busy	if (!is_error) {		/* Pass the packet up to the protocol layers. */		net_rx();		return packet_length;	} else {		return 0;	}}/*---------------------------------------------------- . smc_close . . this makes the board clean up everything that it can . and not talk to the outside world.   Caused by . an 'ifconfig ethX down' . -----------------------------------------------------*/static int smc_close(){	PRINTK2("%s:smc_close\n", SMC_DEV_NAME);	/* clear everything */	smc_shutdown();	return 0;}#if 0/*------------------------------------------------------------ . Modify a bit in the LAN91C111 register set .-------------------------------------------------------------*/static word smc_modify_regbit(int bank, int ioaddr, int reg,	unsigned int bit, int val){	word regval;	SMC_SELECT_BANK( bank );	regval = SMC_inw( reg );	if (val)		regval |= bit;	else		regval &= ~bit;	SMC_outw( regval, 0 );	return(regval);}/*------------------------------------------------------------ . Retrieve a bit in the LAN91C111 register set .-------------------------------------------------------------*/static int smc_get_regbit(int bank, int ioaddr, int reg, unsigned int bit){	SMC_SELECT_BANK( bank );	if ( SMC_inw( reg ) & bit)		return(1);	else		return(0);}/*------------------------------------------------------------ . Modify a LAN91C111 register (word access only) .-------------------------------------------------------------*/static void smc_modify_reg(int bank, int ioaddr, int reg, word val){	SMC_SELECT_BANK( bank );	SMC_outw( val, reg );}/*------------------------------------------------------------ . Retrieve a LAN91C111 register (word access only) .-------------------------------------------------------------*/static int smc_get_reg(int bank, int ioaddr, int reg){	SMC_SELECT_BANK( bank );	return(SMC_inw( reg ));}#endif /* 0 *///---PHY CONTROL AND CONFIGURATION-----------------------------------------#if (SMC_DEBUG > 2 )/*------------------------------------------------------------ . Debugging function for viewing MII Management serial bitstream .-------------------------------------------------------------*/static void smc_dump_mii_stream(byte* bits, int size){	int i;	printf("BIT#:");	for (i = 0; i < size; ++i)		{		printf("%d", i%10);		}	printf("\nMDOE:");	for (i = 0; i < size; ++i)		{		if (bits[i] & MII_MDOE)			printf("1");		else			printf("0");		}	printf("\nMDO :");	for (i = 0; i < size; ++i)		{		if (bits[i] & MII_MDO)			printf("1");		else			printf("0");		}	printf("\nMDI :");	for (i = 0; i < size; ++i)		{		if (bits[i] & MII_MDI)			printf("1");		else			printf("0");		}	printf("\n");}#endif/*------------------------------------------------------------ . Reads a register from the MII Management serial interface .-------------------------------------------------------------*/static word smc_read_phy_register(byte phyreg){	int oldBank;	int i;	byte mask;	word mii_reg;	byte bits[64];	int clk_idx = 0;	int input_idx;	word phydata;	byte phyaddr = SMC_PHY_ADDR;	// 32 consecutive ones on MDO to establish sync	for (i = 0; i < 32; ++i)		bits[clk_idx++] = MII_MDOE | MII_MDO;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲电影激情视频网站| 亚洲女同一区二区| 国产经典欧美精品| 欧美国产精品中文字幕| jlzzjlzz亚洲日本少妇| 中文字幕中文字幕在线一区| 91视频91自| 亚洲超丰满肉感bbw| 日韩一级欧美一级| 国产自产视频一区二区三区| 国产精品热久久久久夜色精品三区| a美女胸又www黄视频久久| 亚洲自拍与偷拍| 精品三级av在线| 成人免费毛片片v| 亚洲一区在线播放| 337p日本欧洲亚洲大胆精品| 成人丝袜18视频在线观看| 一区二区三区四区不卡在线| 欧美一二三区在线| 99re亚洲国产精品| 日本美女一区二区三区| 国产亚洲欧美日韩在线一区| 欧美在线观看一二区| 狠狠色综合日日| 亚洲综合一区二区三区| 久久综合色鬼综合色| 色哟哟国产精品| 黑人精品欧美一区二区蜜桃| 亚洲免费av在线| 欧美精品一区二区三区高清aⅴ | 亚洲日本丝袜连裤袜办公室| 欧美熟乱第一页| 国产麻豆精品在线观看| 依依成人综合视频| 久久久综合精品| 欧美日韩成人一区| 97久久久精品综合88久久| 久久国产三级精品| 亚洲444eee在线观看| 国产欧美va欧美不卡在线| 欧美一三区三区四区免费在线看| youjizz久久| 国产在线国偷精品免费看| 亚洲国产日产av| 亚洲三级电影全部在线观看高清| 2020国产精品久久精品美国| 欧美日韩高清一区| 日本韩国一区二区三区| 高清视频一区二区| 精品制服美女丁香| 性做久久久久久| 亚洲曰韩产成在线| 综合久久久久久| 国产精品萝li| 国产欧美精品一区二区色综合| 欧美一区二区三区播放老司机| 在线免费观看日本欧美| 成人免费高清在线| 国产成人高清在线| 国产成人综合网站| 国内精品写真在线观看| 奇米在线7777在线精品| 亚洲成人av电影在线| 亚洲综合视频网| 一区二区三区丝袜| 亚洲一区在线观看网站| 亚洲精品乱码久久久久久| 成人免费在线视频| 一区在线观看视频| 中文字幕一区二区三区不卡| 国产欧美一区二区在线| 久久亚洲私人国产精品va媚药| 日韩一级完整毛片| 精品国产露脸精彩对白| 欧美大度的电影原声| 91精品国产色综合久久不卡电影 | 最好看的中文字幕久久| 最好看的中文字幕久久| 亚洲欧美一区二区三区极速播放| 中文幕一区二区三区久久蜜桃| 久久人人97超碰com| 国产午夜精品久久久久久久| 日本一区二区三区在线不卡| 欧美激情一区二区三区不卡| 国产精品女主播av| 亚洲视频在线一区二区| 一区二区三区欧美亚洲| 午夜国产不卡在线观看视频| 日日嗨av一区二区三区四区| 青青草97国产精品免费观看 | 五月天亚洲精品| 日韩 欧美一区二区三区| 蜜臀av一区二区在线观看| 久久成人免费网站| 成av人片一区二区| 在线免费不卡视频| 91精品综合久久久久久| 精品欧美一区二区久久| 国产精品久久精品日日| 亚洲综合色成人| 黄色小说综合网站| 91蜜桃视频在线| 欧美一区二区免费| 中文字幕欧美日韩一区| 亚洲成人手机在线| 国产真实乱子伦精品视频| 91丨九色丨蝌蚪丨老版| 欧美一区二区在线播放| 国产蜜臀av在线一区二区三区| 一区二区三区欧美亚洲| 国产在线视频精品一区| 91福利精品第一导航| 精品国产a毛片| 亚洲一区二区三区四区五区黄| 日韩影院精彩在线| 99久久99久久精品免费观看| 91精品国产综合久久精品性色| 国产欧美日韩在线观看| 亚洲国产精品人人做人人爽| 国产一区二区三区黄视频 | 亚洲国产精品av| 视频一区二区三区中文字幕| 成人小视频在线观看| 欧美一级高清大全免费观看| 亚洲视频 欧洲视频| 精品一区二区免费在线观看| 91免费版pro下载短视频| 26uuu色噜噜精品一区| 五月天国产精品| av亚洲精华国产精华| 日韩视频免费观看高清完整版 | jiyouzz国产精品久久| 欧美一区二区三区在线| 亚洲丝袜自拍清纯另类| 黄一区二区三区| 欧美一区二区三区公司| 亚洲日本成人在线观看| 国产精品 日产精品 欧美精品| 欧美男同性恋视频网站| 亚洲视频一区在线观看| 国产精品99久久久久久久vr | 国产成人精品午夜视频免费| 91精品国产综合久久国产大片| 一区二区不卡在线播放| 国产成人精品综合在线观看| 日韩三级视频在线看| 日韩国产欧美在线视频| 欧美专区日韩专区| 亚洲激情六月丁香| 不卡视频一二三四| 国产视频911| 国产伦精品一区二区三区在线观看| 欧美人xxxx| 丝袜美腿亚洲一区| 欧美日韩国产综合一区二区| 亚洲精品日产精品乱码不卡| 成人a级免费电影| 国产精品天干天干在线综合| 国产精品99久久久久久宅男| 2020日本不卡一区二区视频| 久久国产精品免费| 日韩欧美一区二区视频| 久久国产日韩欧美精品| 精品国产免费视频| 极品销魂美女一区二区三区| 精品国产免费久久| 中文字幕亚洲一区二区av在线| 丰满亚洲少妇av| 久久蜜桃一区二区| 国产成人免费在线观看| 国产午夜精品美女毛片视频| 东方aⅴ免费观看久久av| 国产精品色在线| 99re视频精品| 亚洲一区二区精品久久av| 欧美午夜宅男影院| 日产国产高清一区二区三区 | 欧美一区二区三区小说| 男人的j进女人的j一区| 2014亚洲片线观看视频免费| 精品亚洲成a人在线观看| 国产亚洲一区二区在线观看| www.欧美色图| 亚洲成人在线免费| 精品国内片67194| 成人污污视频在线观看| 亚洲自拍偷拍欧美| 欧美一区二区在线免费播放| 国精产品一区一区三区mba视频| 国产精品午夜免费| 色综合色狠狠综合色| 天堂va蜜桃一区二区三区漫画版| 日韩写真欧美这视频| 高清视频一区二区| 亚洲成人动漫在线免费观看| 欧美精品一区二区不卡| 久久99国产精品久久| 国模套图日韩精品一区二区| 中文字幕一区二区三区精华液|