|
|
1.1 root 1: #include "u.h"
2: #include "../port/lib.h"
3: #include "mem.h"
4: #include "dat.h"
5: #include "fns.h"
6: #include "../port/error.h"
7: #include "io.h"
8: #include "devtab.h"
9:
10: /*
11: * AT&T Keep In Touch modem
12: *
13: * By default, this will set it up with the port and irq of
14: * COM2 unless a serialx=type=com line is found in plan9.ini.
15: * The assumption is that a laptop with a pcmcia will have only
16: * one com port.
17: */
18:
19: enum {
20: Maxcard= 8,
21: };
22:
23: void
24: pcmkitlink(void)
25: {
26: ISAConf isa;
27: int i, slot;
28:
29: i = 0;
30: for(;;){
31: memset(&isa, 0, sizeof(isa));
32:
33: /* look for a configuration line */
34: for(; i < Maxcard; i++){
35: if(isaconfig("serial", i, &isa))
36: if(cistrcmp(isa.type, "com") == 0)
37: break;
38: memset(&isa, 0, sizeof(isa));
39: }
40:
41: /* default is COM1 */
42: if(isa.irq == 0)
43: isa.irq = 3;
44: if(isa.port == 0)
45: isa.port = 0x2F8;
46:
47: slot = pcmspecial("KeepInTouch", &isa);
48: if(slot < 0)
49: break;
50: print("pcmcia slot %d Keep in touch modem\n", slot);
51: }
52: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.