Lines Matching +full:0 +full:x2000
49 {0x300, 0x280, 0x380, 0x240, 0};
65 #define WD_START_PG 0x00 /* First page of TX buffer */
66 #define WD03_STOP_PG 0x20 /* Last page +1 of RX ring */
67 #define WD13_STOP_PG 0x40 /* Last page +1 of RX ring */
69 #define WD_CMDREG 0 /* Offset to ASIC command register. */
70 #define WD_RESET 0x80 /* Board reset, in WD_CMDREG. */
71 #define WD_MEMENB 0x40 /* Enable the shared memory. */
73 #define ISA16 0x80 /* Enable 16 bit access from the ISA bus. */
74 #define NIC16 0x40 /* Enable 16 bit access from the 8390. */
96 if (base_addr > 0x1ff) { /* Check a user specified location. */ in do_wd_probe()
101 if (i != 0) in do_wd_probe()
107 else if (base_addr != 0) /* Don't probe at all. */ in do_wd_probe()
110 for (i = 0; wd_portlist[i]; i++) { in do_wd_probe()
115 if (wd_probe1(dev, ioaddr) == 0) { in do_wd_probe()
117 return 0; in do_wd_probe()
168 int checksum = 0; in wd_probe1()
169 int ancient = 0; /* An old card without config registers. */ in wd_probe1()
170 int word16 = 0; /* 0 = 8 bit, 1 = 16 bit */ in wd_probe1()
175 for (i = 0; i < 8; i++) in wd_probe1()
177 if (inb(ioaddr + 8) == 0xff /* Extra check to avoid soundcard. */ in wd_probe1()
178 || inb(ioaddr + 9) == 0xff in wd_probe1()
179 || (checksum & 0xff) != 0xFF) in wd_probe1()
183 if ((dev->mem_start % 0x2000) || (dev->mem_end % 0x2000)) { in wd_probe1()
186 dev->mem_start = 0; in wd_probe1()
187 dev->mem_end = 0; in wd_probe1()
190 if ((wd_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0)) in wd_probe1()
193 for (i = 0; i < 6; i++) in wd_probe1()
203 if (inb(ioaddr+0) == 'P' && inb(ioaddr+1) == 'D') { in wd_probe1()
207 case 0x03: word16 = 0; model_name = "PDI8023-8"; break; in wd_probe1()
208 case 0x05: word16 = 0; model_name = "PDUC8023"; break; in wd_probe1()
209 case 0x0a: word16 = 1; model_name = "PDI8023-16"; break; in wd_probe1()
210 /* Either 0x01 (dumb) or they've released a new version. */ in wd_probe1()
211 default: word16 = 0; model_name = "PDI8023"; break; in wd_probe1()
213 dev->mem_start = ((reg5 & 0x1c) + 0xc0) << 12; in wd_probe1()
214 dev->irq = (reg5 & 0xe0) == 0xe0 ? 10 : (reg5 >> 5) + 1; in wd_probe1()
217 we.c driver. A simpler method is just to look in ASIC reg. 0x03. in wd_probe1()
220 /* Check for the old 8 bit board - it has register 0/8 aliasing. in wd_probe1()
222 for (i = 0; i < 6; i++) in wd_probe1()
228 word16 = 0; in wd_probe1()
231 outb( tmp ^ 0x01, ioaddr+1 ); /* attempt to clear 16bit bit */ in wd_probe1()
232 if (((inb( ioaddr+1) & 0x01) == 0x01) /* A 16 bit card */ in wd_probe1()
233 && (tmp & 0x01) == 0x01 ) { /* In a 16 slot. */ in wd_probe1()
236 outb( NIC16 | (asic_reg5&0x1f), ioaddr+WD_CMDREG5); in wd_probe1()
242 word16 = 0; in wd_probe1()
247 if ( !ancient && (inb(ioaddr+1) & 0x01) != (word16 & 0x01)) in wd_probe1()
250 (inb(ioaddr+1) & 0x01) ? 16 : 8); in wd_probe1()
254 #if defined(WD_SHMEM) && WD_SHMEM > 0x80000 in wd_probe1()
258 if (dev->mem_start == 0) { in wd_probe1()
261 if (reg0 == 0xff || reg0 == 0) { in wd_probe1()
263 dev->mem_start = 0xd0000; in wd_probe1()
266 int high_addr_bits = inb(ioaddr+WD_CMDREG5) & 0x1f; in wd_probe1()
267 /* Some boards don't have the register 5 -- it returns 0xff. */ in wd_probe1()
268 if (high_addr_bits == 0x1f || word16 == 0) in wd_probe1()
269 high_addr_bits = 0x01; in wd_probe1()
270 dev->mem_start = ((reg0&0x3f) << 13) + (high_addr_bits << 19); in wd_probe1()
282 if (ancient || reg1 == 0xff) { /* Ack!! No way to read the IRQ! */ in wd_probe1()
290 outb(0x00, nic_addr+EN0_IMR); /* Disable all intrs. */ in wd_probe1()
293 outb_p(0xff, nic_addr + EN0_IMR); /* Enable all interrupts. */ in wd_probe1()
294 outb_p(0x00, nic_addr + EN0_RCNTLO); in wd_probe1()
295 outb_p(0x00, nic_addr + EN0_RCNTHI); in wd_probe1()
300 outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */ in wd_probe1()
307 dev->irq = irqmap[((reg4 >> 5) & 0x03) + (reg1 & 0x04)]; in wd_probe1()
313 i = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev); in wd_probe1()
328 if (dev->mem_end != 0) { in wd_probe1()
352 NS8390_init(dev, 0); in wd_probe1()
358 if (inb(ioaddr+14) & 0x20) in wd_probe1()
359 outb(inb(ioaddr+4)|0x80, ioaddr+4); in wd_probe1()
375 /* Map in the shared memory. Always set register 0 last to remain in wd_open()
377 ei_status.reg0 = ((dev->mem_start>>13) & 0x3f) | WD_MEMENB; in wd_open()
378 ei_status.reg5 = ((dev->mem_start>>19) & 0x1f) | NIC16; in wd_open()
396 ei_status.txing = 0; in wd_reset_8390()
399 outb((((dev->mem_start>>13) & 0x3f)|WD_MEMENB), wd_cmd_port); in wd_reset_8390()
401 outb(NIC16 | ((dev->mem_start>>19) & 0x1f), wd_cmd_port+WD_CMDREG5); in wd_reset_8390()
428 ((unsigned int*)hdr)[0] = readl(hdr_start); in wd_get_8390_hdr()
494 return 0; in wd_close()
506 module_param_hw_array(io, int, ioport, NULL, 0);
507 module_param_hw_array(irq, int, irq, NULL, 0);
508 module_param_hw_array(mem, int, iomem, NULL, 0);
509 module_param_hw_array(mem_end, int, iomem, NULL, 0);
525 int this_dev, found = 0; in init_module()
527 for (this_dev = 0; this_dev < MAX_WD_CARDS; this_dev++) { in init_module()
528 if (io[this_dev] == 0) { in init_module()
529 if (this_dev != 0) break; /* only autoprobe 1st one */ in init_module()
539 if (do_wd_probe(dev) == 0) { in init_module()
544 printk(KERN_WARNING "wd.c: No wd80x3 card found (i/o = 0x%x).\n", io[this_dev]); in init_module()
548 return 0; in init_module()
564 for (this_dev = 0; this_dev < MAX_WD_CARDS; this_dev++) { in cleanup_module()