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

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

?? amd7930_fn.c

?? 該文件是rt_linux
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* gerdes_amd7930.c,v 0.99 2001/10/02 * * gerdes_amd7930.c     Amd 79C30A and 79C32A specific routines *                      (based on HiSax driver by Karsten Keil) * * Author               Christoph Ersfeld <info@formula-n.de> *                      Formula-n Europe AG (www.formula-n.com) *                      previously Gerdes AG * * *                      This file is (c) under GNU PUBLIC LICENSE * * * Notes: * Version 0.99 is the first release of this driver and there are * certainly a few bugs. * * Please don't report any malfunction to me without sending * (compressed) debug-logs. * It would be nearly impossible to retrace it. * * Log D-channel-processing as follows: * * 1. Load hisax with card-specific parameters, this example ist for *    Formula-n enter:now ISDN PCI and compatible *    (f.e. Gerdes Power ISDN PCI) * *    modprobe hisax type=41 protocol=2 id=gerdes * *    if you chose an other value for id, you need to modify the *    code below, too. * * 2. set debug-level * *    hisaxctrl gerdes 1 0x3ff *    hisaxctrl gerdes 11 0x4f *    cat /dev/isdnctrl >> ~/log & * * Please take also a look into /var/log/messages if there is * anything importand concerning HISAX. * * * Credits: * Programming the driver for Formula-n enter:now ISDN PCI and * neccessary this driver for the used Amd 7930 D-channel-controller * was spnsored by Formula-n Europe AG. * Thanks to Karsten Keil and Petr Novak, who gave me support in * Hisax-specific questions. * I want so say special thanks to Carl-Friedrich Braun, who had to * answer a lot of questions about generally ISDN and about handling * of the Amd-Chip. * */#define __NO_VERSION__#include "hisax.h"#include "isdnl1.h"#include "isac.h"#include "amd7930_fn.h"#include <linux/interrupt.h>#include <linux/init.h>static void Amd7930_new_ph(struct IsdnCardState *cs);void /* macro wWordAMD */WriteWordAmd7930(struct IsdnCardState *cs, BYTE reg, WORD val){        wByteAMD(cs, 0x00, reg);        wByteAMD(cs, 0x01, LOBYTE(val));        wByteAMD(cs, 0x01, HIBYTE(val));}WORD /* macro rWordAMD */ReadWordAmd7930(struct IsdnCardState *cs, BYTE reg){        WORD res;        /* direct access register */        if(reg < 8) {        	res = rByteAMD(cs, reg);                res += 256*rByteAMD(cs, reg);        }        /* indirect access register */        else {                wByteAMD(cs, 0x00, reg);	        res = rByteAMD(cs, 0x01);                res += 256*rByteAMD(cs, 0x01);        }	return (res);}static voidAmd7930_ph_command(struct IsdnCardState *cs, u_char command, char *s){	if (cs->debug & L1_DEB_ISAC)		debugl1(cs, "AMD7930: %s: ph_command 0x%02X", s, command);        cs->dc.amd7930.lmr1 = command;        wByteAMD(cs, 0xA3, command);}static BYTE i430States[] = {// to   reset  F3    F4    F5    F6    F7    F8    AR     from        0x01, 0x02, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00,   // init        0x01, 0x02, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00,   // reset        0x01, 0x02, 0x00, 0x00, 0x00, 0x09, 0x05, 0x04,   // F3        0x01, 0x02, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00,   // F4        0x01, 0x02, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00,   // F5        0x01, 0x03, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00,   // F6        0x11, 0x13, 0x00, 0x00, 0x1B, 0x00, 0x15, 0x00,   // F7        0x01, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,   // F8        0x01, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, 0x0A};  // AR/*                    Row     init    -   reset  F3    F4    F5    F6    F7    F8    AR */static BYTE stateHelper[] = { 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };static voidAmd7930_get_state(struct IsdnCardState *cs) {        BYTE lsr = rByteAMD(cs, 0xA1);        cs->dc.amd7930.ph_state = (lsr & 0x7) + 2;        Amd7930_new_ph(cs);}static voidAmd7930_new_ph(struct IsdnCardState *cs){        u_char index = stateHelper[cs->dc.amd7930.old_state]*8 + stateHelper[cs->dc.amd7930.ph_state]-1;        u_char message = i430States[index];        if (cs->debug & L1_DEB_ISAC)		debugl1(cs, "AMD7930: new_ph %d, old_ph %d, message %d, index %d",                        cs->dc.amd7930.ph_state, cs->dc.amd7930.old_state, message & 0x0f, index);        cs->dc.amd7930.old_state = cs->dc.amd7930.ph_state;        /* abort transmit if nessesary */        if ((message & 0xf0) && (cs->tx_skb)) {                wByteAMD(cs, 0x21, 0xC2);                wByteAMD(cs, 0x21, 0x02);        }	switch (message & 0x0f) {                case (1):                        l1_msg(cs, HW_RESET | INDICATION, NULL);                        Amd7930_get_state(cs);                        break;                case (2): /* init, Card starts in F3 */                        l1_msg(cs, HW_DEACTIVATE | CONFIRM, NULL);                        break;                case (3):                        l1_msg(cs, HW_DEACTIVATE | INDICATION, NULL);                        break;                case (4):                        l1_msg(cs, HW_POWERUP | CONFIRM, NULL);                        Amd7930_ph_command(cs, 0x50, "HW_ENABLE REQUEST");                        break;                case (5):			l1_msg(cs, HW_RSYNC | INDICATION, NULL);                        break;                case (6):			l1_msg(cs, HW_INFO4_P8 | INDICATION, NULL);                        break;                case (7): /* init, Card starts in F7 */			l1_msg(cs, HW_RSYNC | INDICATION, NULL);			l1_msg(cs, HW_INFO4_P8 | INDICATION, NULL);                        break;                case (8):                        l1_msg(cs, HW_POWERUP | CONFIRM, NULL);                        /* fall through */                case (9):                        Amd7930_ph_command(cs, 0x40, "HW_ENABLE REQ cleared if set");			l1_msg(cs, HW_RSYNC | INDICATION, NULL);			l1_msg(cs, HW_INFO2 | INDICATION, NULL);			l1_msg(cs, HW_INFO4_P8 | INDICATION, NULL);                        break;                case (10):                        Amd7930_ph_command(cs, 0x40, "T3 expired, HW_ENABLE REQ cleared");                        cs->dc.amd7930.old_state = 3;                        break;                case (11):			l1_msg(cs, HW_INFO2 | INDICATION, NULL);                        break;		default:			break;	}}static voidAmd7930_bh(struct IsdnCardState *cs){        struct PStack *stptr;	if (!cs)		return;	if (test_and_clear_bit(D_CLEARBUSY, &cs->event)) {                if (cs->debug)			debugl1(cs, "Amd7930: bh, D-Channel Busy cleared");		stptr = cs->stlist;		while (stptr != NULL) {			stptr->l1.l1l2(stptr, PH_PAUSE | CONFIRM, NULL);			stptr = stptr->next;		}	}	if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) {	        if (cs->debug & L1_DEB_ISAC)		        debugl1(cs, "AMD7930: bh, D_L1STATECHANGE");                Amd7930_new_ph(cs);        }        if (test_and_clear_bit(D_RCVBUFREADY, &cs->event)) {	        if (cs->debug & L1_DEB_ISAC)		        debugl1(cs, "AMD7930: bh, D_RCVBUFREADY");                DChannel_proc_rcv(cs);        }        if (test_and_clear_bit(D_XMTBUFREADY, &cs->event)) {	        if (cs->debug & L1_DEB_ISAC)		        debugl1(cs, "AMD7930: bh, D_XMTBUFREADY");                DChannel_proc_xmt(cs);        }}voidAmd7930_sched_event(struct IsdnCardState *cs, int event) // ok{	if (cs->debug & L1_DEB_ISAC) {		debugl1(cs, "AMD7930: sched_event 0x%X", event);        }        test_and_set_bit(event, &cs->event);	queue_task(&cs->tqueue, &tq_immediate);	mark_bh(IMMEDIATE_BH);}static voidAmd7930_empty_Dfifo(struct IsdnCardState *cs, int flag){        BYTE stat, der;	BYTE *ptr;	struct sk_buff *skb;	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))		debugl1(cs, "Amd7930: empty_Dfifo");	ptr = cs->rcvbuf + cs->rcvidx;	/* AMD interrupts off */	AmdIrqOff(cs);	/* read D-Channel-Fifo*/	stat = rByteAMD(cs, 0x07); // DSR2		/* while Data in Fifo ... */		while ( (stat & 2) && ((ptr-cs->rcvbuf) < MAX_DFRAME_LEN_L1) ) {			*ptr = rByteAMD(cs, 0x04); // DCRB			ptr++;	                stat = rByteAMD(cs, 0x07); // DSR2			cs->rcvidx = ptr - cs->rcvbuf;                        /* Paket ready? */			if (stat & 1) {                                der = rWordAMD(cs, 0x03);                                /* no errors, packet ok */                                if(!der && !flag) {					rWordAMD(cs, 0x89); // clear DRCR                                        if ((cs->rcvidx) > 0) {                                                if (!(skb = alloc_skb(cs->rcvidx, GFP_ATOMIC)))							printk(KERN_WARNING "HiSax: Amd7930: empty_Dfifo, D receive out of memory!\n");						else {                                                        /* Debugging */                                                        if (cs->debug & L1_DEB_ISAC_FIFO) {								char *t = cs->dlog;								t += sprintf(t, "Amd7930: empty_Dfifo cnt: %d |", cs->rcvidx);								QuickHex(t, cs->rcvbuf, cs->rcvidx);								debugl1(cs, cs->dlog);							}                                                        /* moves recieved data in sk-buffer */							memcpy(skb_put(skb, cs->rcvidx), cs->rcvbuf, cs->rcvidx);							skb_queue_tail(&cs->rq, skb);						}					}				}                                /* throw damaged packets away, reset recieve-buffer, indicate RX */				ptr = cs->rcvbuf;				cs->rcvidx = 0;				Amd7930_sched_event(cs, D_RCVBUFREADY);			}                }		/* Packet to long, overflow */		if(cs->rcvidx >= MAX_DFRAME_LEN_L1) {			if (cs->debug & L1_DEB_WARN)			        debugl1(cs, "AMD7930: empty_Dfifo L2-Framelength overrun");			cs->rcvidx = 0;			return;		}	/* AMD interrupts on */	AmdIrqOn(cs);}static voidAmd7930_fill_Dfifo(struct IsdnCardState *cs){        WORD dtcrr, dtcrw, len, count;        BYTE txstat, dmr3;        BYTE *ptr, *deb_ptr;	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))		debugl1(cs, "Amd7930: fill_Dfifo");	if ((!cs->tx_skb) || (cs->tx_skb->len <= 0))		return;        dtcrw = 0;        if(!cs->dc.amd7930.tx_xmtlen)                /* new Frame */                len = dtcrw = cs->tx_skb->len;        /* continue frame */        else len = cs->dc.amd7930.tx_xmtlen;	/* AMD interrupts off */	AmdIrqOff(cs);        deb_ptr = ptr = cs->tx_skb->data;        /* while free place in tx-fifo available and data in sk-buffer */        txstat = 0x10;        while((txstat & 0x10) && (cs->tx_cnt < len)) {                wByteAMD(cs, 0x04, *ptr);                ptr++;                cs->tx_cnt++;                txstat= rByteAMD(cs, 0x07);        }        count = ptr - cs->tx_skb->data;	skb_pull(cs->tx_skb, count);        dtcrr = rWordAMD(cs, 0x85); // DTCR        dmr3  = rByteAMD(cs, 0x8E);	if (cs->debug & L1_DEB_ISAC) {		debugl1(cs, "Amd7930: fill_Dfifo, DMR3: 0x%02X, DTCR read: 0x%04X write: 0x%02X 0x%02X", dmr3, dtcrr, LOBYTE(dtcrw), HIBYTE(dtcrw));        }        /* writeing of dtcrw starts transmit */        if(!cs->dc.amd7930.tx_xmtlen) {                wWordAMD(cs, 0x85, dtcrw);                cs->dc.amd7930.tx_xmtlen = dtcrw;        }	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {		debugl1(cs, "Amd7930: fill_Dfifo dbusytimer running");		del_timer(&cs->dbusytimer);	}	init_timer(&cs->dbusytimer);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产入口在线| 日韩一区在线播放| 国产精品色在线| 日韩av一区二区在线影视| 国产91丝袜在线播放| 欧美一区二区视频在线观看2022| 国产精品灌醉下药二区| 久久草av在线| 欧美区在线观看| 亚洲日本在线观看| 国产成人午夜视频| 欧美va亚洲va香蕉在线| 日欧美一区二区| 欧美三级在线视频| 亚洲免费观看视频| 成人av片在线观看| 日本一区免费视频| 国产一区二区在线观看免费| 欧美高清视频一二三区| 亚洲3atv精品一区二区三区| 色综合久久99| 亚洲激情自拍视频| 在线一区二区三区做爰视频网站| 国产精品―色哟哟| 成人网男人的天堂| 久久色.com| 国产成人精品免费视频网站| 国产香蕉久久精品综合网| 精品无码三级在线观看视频| 欧美一级精品在线| 老司机精品视频一区二区三区| 69成人精品免费视频| 亚洲成a人v欧美综合天堂| 欧美日韩中文字幕一区二区| 亚洲综合偷拍欧美一区色| 在线视频欧美精品| 亚洲午夜免费视频| 欧美精品日韩一区| 麻豆91在线观看| 日韩欧美一二区| 精品一区二区三区在线播放视频| 久久亚洲精品国产精品紫薇| 国产在线不卡一卡二卡三卡四卡| 久久蜜桃av一区精品变态类天堂| 国产精品888| 亚洲日本中文字幕区| 欧美日韩mp4| 免费看日韩精品| 久久精品免视看| 色综合一个色综合亚洲| 亚洲成av人综合在线观看| 日韩欧美资源站| 成人性生交大片免费| 综合久久久久久久| 在线播放欧美女士性生活| 国产在线不卡视频| 亚洲精品成a人| 欧美电影免费观看高清完整版| 国产精品一品二品| 亚洲一区二区五区| 欧美变态tickling挠脚心| 成人深夜福利app| 丝瓜av网站精品一区二区| 久久久久久久网| 91国产精品成人| 国产一区二区美女| 亚洲亚洲人成综合网络| 久久久高清一区二区三区| 日本韩国欧美一区| 国产精品乡下勾搭老头1| 亚洲一区中文日韩| 国产女人18毛片水真多成人如厕| 欧美制服丝袜第一页| 国产乱理伦片在线观看夜一区| 亚洲欧美日韩国产中文在线| 日韩精品一区二区在线| 色视频欧美一区二区三区| 国产一区二区美女诱惑| 亚洲成人动漫一区| 中文字幕亚洲精品在线观看| 精品久久久三级丝袜| 色婷婷激情久久| 国产不卡在线视频| 老色鬼精品视频在线观看播放| 亚洲免费在线视频| 国产网站一区二区| 欧美成人午夜电影| 91精品国产综合久久香蕉的特点| 99久久精品情趣| 国产成人aaa| 青青草97国产精品免费观看无弹窗版| 国产精品乱码人人做人人爱 | 在线综合亚洲欧美在线视频| 成人三级伦理片| 国产麻豆视频一区| 日本aⅴ免费视频一区二区三区| 亚洲精选视频免费看| 国产亚洲精久久久久久| 精品电影一区二区三区| 欧美福利电影网| 欧美日本在线视频| 在线视频国产一区| 91在线无精精品入口| 成人三级伦理片| 国产伦精品一区二区三区视频青涩| 全部av―极品视觉盛宴亚洲| 亚洲风情在线资源站| 亚洲综合一区二区精品导航| 亚洲欧美国产三级| 中文字幕亚洲不卡| 亚洲人精品午夜| 亚洲欧美日本韩国| 日韩一区在线看| 亚洲精品第1页| 亚洲在线免费播放| 天堂午夜影视日韩欧美一区二区| 亚洲一区二区精品久久av| 一区二区三区波多野结衣在线观看| 亚洲色图制服诱惑| 亚洲制服欧美中文字幕中文字幕| 亚洲自拍偷拍av| 婷婷久久综合九色综合绿巨人| 亚洲h精品动漫在线观看| 日本不卡一区二区三区| 久久爱另类一区二区小说| 六月婷婷色综合| 国内精品在线播放| 成人午夜大片免费观看| 91天堂素人约啪| 欧美日韩mp4| 久久久久久亚洲综合| 国产精品久久久久久亚洲毛片 | 日本免费新一区视频| 九九九久久久精品| 国产99久久久国产精品潘金| 一本一道波多野结衣一区二区| 欧美日韩精品一区视频| 日韩精品一区二区三区三区免费 | 亚洲成人精品影院| 日韩激情av在线| 国产精品123| 色综合天天视频在线观看| 91精品国产欧美一区二区18| www久久精品| 亚洲激情校园春色| 狠狠色丁香久久婷婷综合丁香| www.激情成人| 欧美日韩亚洲综合一区| 久久青草国产手机看片福利盒子 | 精品综合久久久久久8888| 福利电影一区二区| 欧美影院一区二区| 欧美国产日韩精品免费观看| 亚洲影视在线播放| 国产精品自拍三区| 欧美老人xxxx18| 国产精品色婷婷久久58| 日韩国产一区二| 91在线免费播放| 久久品道一品道久久精品| 亚洲高清在线精品| 不卡电影免费在线播放一区| 91精品国产高清一区二区三区蜜臀| 日本一区二区视频在线观看| 亚洲第一电影网| 成人一区在线看| 欧美精品一区二区三区蜜桃| 亚洲国产一区二区三区| av福利精品导航| 精品国产乱码久久久久久蜜臀| 亚洲一区二区三区三| caoporm超碰国产精品| 久久欧美中文字幕| 欧美aaaaa成人免费观看视频| 欧美一a一片一级一片| 国产精品嫩草影院av蜜臀| 久久成人久久爱| 日韩视频免费观看高清完整版在线观看 | 精品国产一区二区三区不卡 | 国内精品伊人久久久久av影院 | 蜜桃在线一区二区三区| 91国偷自产一区二区三区观看| 国产拍揄自揄精品视频麻豆| 久久国产剧场电影| 在线播放欧美女士性生活| 亚洲午夜激情网站| 91福利在线免费观看| 亚洲女同女同女同女同女同69| 国产成人精品影视| 久久蜜桃香蕉精品一区二区三区| 免费av网站大全久久| 在线不卡中文字幕播放| 丝袜亚洲精品中文字幕一区| 欧美日本一区二区在线观看| 亚洲中国最大av网站| 欧美人伦禁忌dvd放荡欲情| 天堂蜜桃一区二区三区 | 国产永久精品大片wwwapp| 日韩色在线观看| 久久成人免费网站|