2 #include "../port/lib.h"
8 #include "../port/error.h"
12 * By default, this will set it up with the port and irq of
13 * COM2 unless a serialx=type=com line is found in plan9.ini.
14 * The assumption is that a laptop with a pcmcia will have only
22 static char* modems[] = {
23 "IBM 33.6 Data/Fax/Voice Modem",
24 "CM-56G", /* Xircom CreditCard Modem 56 - GlobalACCESS */
27 "MONTANA V.34 FAX/MODEM", /* Motorola */
31 "Gold Card Global", /* Psion V90 Gold card */
32 "Merlin UMTS Modem", /* Novatel card */
40 int i, j, slot, com2used, usingcom2;
44 for(j = 0; modems[j]; j++){
45 memset(&isa, 0, sizeof(isa));
47 /* look for a configuration line */
48 for(; i < Maxcard; i++){
49 if(isaconfig("serial", i, &isa))
50 if(cistrcmp(isa.type, "com") == 0)
52 memset(&isa, 0, sizeof(isa));
56 if (isa.irq == 0 && isa.port == 0) {
65 slot = pcmspecial(modems[j], &isa);
69 if(ioalloc(isa.port, 8, 0, modems[j]) < 0)
70 print("%s port %lux already in use\n",
72 print("%s in pcmcia slot %d port 0x%lux irq %d\n",
73 modems[j], slot, isa.port, isa.irq);