Lines Matching +full:0 +full:x2002
83 /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
97 aliased registers at <base>+0x400.
99 #define CORKSCREW_TOTAL_SIZE 0x20
169 #define EL3_CMD 0x0e
170 #define EL3_STATUS 0x0e
179 TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
198 IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
199 TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
200 IntReq = 0x0040, StatsFull = 0x0080,
207 On the Corkscrew this window is always mapped at offsets 0x10-0x1f. */
209 TX_FIFO = 0x10, RX_FIFO = 0x10, RxErrors = 0x14,
210 RxStatus = 0x18, Timer = 0x1A, TxStatus = 0x1B,
211 TxFree = 0x1C, /* Remaining free bytes in Tx buffer. */
214 Wn0IRQ = 0x08,
216 Wn0EepromCmd = 0x200A, /* Corkscrew EEPROM command register. */
217 Wn0EepromData = 0x200C, /* Corkscrew EEPROM results register. */
219 Wn0EepromCmd = 10, /* Window 0: EEPROM command register. */
220 Wn0EepromData = 12, /* Window 0: EEPROM results register. */
224 EEPROM_Read = 0x80, EEPROM_WRITE = 0x40, EEPROM_ERASE = 0xC0,
225 EEPROM_EWENB = 0x30, /* Enable erasing/writing for 10 msec. */
226 EEPROM_EWDIS = 0x00, /* Disable EWENB before 10 msec timeout. */
231 PhysAddr01 = 0, PhysAddr23 = 1, PhysAddr45 = 2, ModelID = 3,
236 Wn3_Config = 0, Wn3_MAC_Ctrl = 6, Wn3_Options = 8,
241 Ram_speed = 0x30,
242 Rom_size = 0xc0,
247 Autoselect = 0x1000000,
254 Media_SQE = 0x0008, /* Enable SQE error counting for AUI. */
255 Media_10TP = 0x00C0, /* Enable link beat and jabber for 10baseT. */
256 Media_Lnk = 0x0080, /* Enable just link beat for 100TX/100FX. */
257 Media_LnkBeat = 0x0800,
260 Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12,
265 PktStatus = 0x400, DownListPtr = 0x404, FragAddr = 0x408, FragLen =
266 0x40c,
267 TxFreeThreshold = 0x40f, UpPktStatus = 0x410, UpListPtr = 0x418,
282 RxDComplete = 0x00008000, RxDError = 0x4000,
324 XCVR_10baseT = 0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
335 { "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 },
336 { "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10},
337 { "undefined", 0, 0x80, XCVR_10baseT, 10000},
338 { "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10},
339 { "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10},
340 { "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10},
341 { "MII", 0, 0x40, XCVR_10baseT, 3 * HZ},
342 { "undefined", 0, 0x01, XCVR_10baseT, 10000},
343 { "Default", 0, 0xFF, XCVR_10baseT, 10000},
349 ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
396 module_param(debug, int, 0);
397 module_param_array(options, int, NULL, 0);
398 module_param(rx_copybreak, int, 0);
399 module_param(max_interrupt_work, int, 0);
400 MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
401 MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
411 int found = 0; in corkscrew_init_module()
412 if (debug >= 0) in corkscrew_init_module()
416 return found ? 0 : -ENODEV; in corkscrew_init_module()
437 return 0; in check_device()
439 if ((inw(ioaddr + 0x2002) & 0x1f0) != (ioaddr & 0x1f0)) { in check_device()
441 return 0; in check_device()
446 for (timer = 4; timer >= 0; timer--) { in check_device()
448 if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0) in check_device()
451 if (inw(ioaddr + Wn0EepromData) != 0x6d50) { in check_device()
453 return 0; in check_device()
473 static int cards_found = 0; in corkscrew_scan()
485 if (unit >= 0) { in corkscrew_scan()
493 for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) { in corkscrew_scan()
501 if (pnp_device_attach(idev) < 0) in corkscrew_scan()
503 if (pnp_activate_dev(idev) < 0) { in corkscrew_scan()
508 if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) { in corkscrew_scan()
512 ioaddr = pnp_port_start(idev, 0); in corkscrew_scan()
513 irq = pnp_irq(idev, 0); in corkscrew_scan()
519 pr_debug("ISAPNP reports %s at i/o 0x%x, irq %d\n", in corkscrew_scan()
522 inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); in corkscrew_scan()
523 /* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */ in corkscrew_scan()
536 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) { in corkscrew_scan()
541 inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); in corkscrew_scan()
568 unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */ in corkscrew_setup()
575 irq = pnp_irq(idev, 0); in corkscrew_setup()
578 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
581 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
586 dev->dma = inw(ioaddr + 0x2000) & 7; in corkscrew_setup()
598 if (vp->options >= 0) { in corkscrew_setup()
601 vp->media_override = 0; in corkscrew_setup()
602 vp->full_duplex = (vp->options & 8) ? 1 : 0; in corkscrew_setup()
603 vp->bus_master = (vp->options & 16) ? 1 : 0; in corkscrew_setup()
606 vp->full_duplex = 0; in corkscrew_setup()
607 vp->bus_master = 0; in corkscrew_setup()
617 timer_setup(&vp->timer, corkscrew_timer, 0); in corkscrew_setup()
620 EL3WINDOW(0); in corkscrew_setup()
621 for (i = 0; i < 0x18; i++) { in corkscrew_setup()
625 for (timer = 4; timer >= 0; timer--) { in corkscrew_setup()
627 if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0) in corkscrew_setup()
636 checksum = (checksum ^ (checksum >> 8)) & 0xff; in corkscrew_setup()
637 if (checksum != 0x00) in corkscrew_setup()
640 if (eeprom[16] == 0x11c7) { /* Corkscrew */ in corkscrew_setup()
643 dev->dma = 0; in corkscrew_setup()
649 if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15)) in corkscrew_setup()
670 vp->autoselect = config & Autoselect ? 1 : 0; in corkscrew_setup()
681 vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
683 /* vp->full_bus_master_rx = 0; */ in corkscrew_setup()
684 vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
706 outb(0x20, ioaddr + Wn3_MAC_Ctrl); /* Set the full-duplex bit. */ in corkscrew_open()
737 for (i = 20; i >= 0; i--) in corkscrew_open()
743 for (i = 20; i >= 0; i--) in corkscrew_open()
747 outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD); in corkscrew_open()
750 if (vp->capabilities == 0x11c7) { in corkscrew_open()
752 if (dev->irq == 0 || in corkscrew_open()
753 dev->dma == 0 || in corkscrew_open()
754 request_irq(dev->irq, corkscrew_interrupt, 0, in corkscrew_open()
775 for (i = 0; i < 6; i++) in corkscrew_open()
778 outw(0, ioaddr + i); in corkscrew_open()
790 for (i = 0; i < 10; i++) in corkscrew_open()
798 outw(0x0040, ioaddr + Wn4_NetDiag); in corkscrew_open()
804 vp->cur_rx = vp->dirty_rx = 0; in corkscrew_open()
807 for (i = 0; i < RX_RING_SIZE; i++) { in corkscrew_open()
813 vp->rx_ring[i].next = 0; in corkscrew_open()
814 vp->rx_ring[i].status = 0; /* Clear complete bit. */ in corkscrew_open()
815 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; in corkscrew_open()
823 if (i != 0) in corkscrew_open()
825 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ in corkscrew_open()
826 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); in corkscrew_open()
829 vp->cur_tx = vp->dirty_tx = 0; in corkscrew_open()
832 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_open()
834 outl(0, ioaddr + DownListPtr); in corkscrew_open()
848 (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD); in corkscrew_open()
853 | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete, in corkscrew_open()
856 return 0; in corkscrew_open()
866 int ok = 0; in corkscrew_timer()
880 case 0: in corkscrew_timer()
961 if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) in corkscrew_timeout()
969 &vp->tx_ring[0]); in corkscrew_timeout()
970 for (i = 0; i < TX_RING_SIZE; i++) { in corkscrew_timeout()
978 for (i = 20; i >= 0; i--) in corkscrew_timeout()
1007 if (vp->cur_tx != 0) in corkscrew_start_xmit()
1016 vp->tx_ring[entry].next = 0; in corkscrew_start_xmit()
1018 vp->tx_ring[entry].length = skb->len | 0x80000000; in corkscrew_start_xmit()
1019 vp->tx_ring[entry].status = skb->len | 0x80000000; in corkscrew_start_xmit()
1024 for (i = 20; i >= 0; i--) in corkscrew_start_xmit()
1025 if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0) in corkscrew_start_xmit()
1029 if (inl(ioaddr + DownListPtr) == 0) { in corkscrew_start_xmit()
1042 prev_entry->status &= ~0x80000000; in corkscrew_start_xmit()
1086 while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) { in corkscrew_start_xmit()
1087 if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ in corkscrew_start_xmit()
1091 if (tx_status & 0x04) in corkscrew_start_xmit()
1093 if (tx_status & 0x38) in corkscrew_start_xmit()
1095 if (tx_status & 0x30) { in corkscrew_start_xmit()
1098 for (j = 20; j >= 0; j--) in corkscrew_start_xmit()
1104 outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ in corkscrew_start_xmit()
1132 if ((status & 0xE000) != 0xE000) { in corkscrew_interrupt()
1162 while (lp->cur_tx - dirty_tx > 0) { in corkscrew_interrupt()
1175 lp->tx_full = 0; in corkscrew_interrupt()
1181 outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */ in corkscrew_interrupt()
1203 if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) { in corkscrew_interrupt()
1207 for (win = 0; win < 8; win++) { in corkscrew_interrupt()
1210 for (reg = 0; reg < 16; reg++) in corkscrew_interrupt()
1233 if (--i < 0) { in corkscrew_interrupt()
1235 dev->name, status, SetStatusEnb | ((~status) & 0x7FE)); in corkscrew_interrupt()
1237 outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD); in corkscrew_interrupt()
1238 outw(AckIntr | 0x7FF, ioaddr + EL3_CMD); in corkscrew_interrupt()
1262 while ((rx_status = inw(ioaddr + RxStatus)) > 0) { in corkscrew_rx()
1263 if (rx_status & 0x4000) { /* Error, update stats. */ in corkscrew_rx()
1269 if (rx_error & 0x01) in corkscrew_rx()
1271 if (rx_error & 0x02) in corkscrew_rx()
1273 if (rx_error & 0x04) in corkscrew_rx()
1275 if (rx_error & 0x08) in corkscrew_rx()
1277 if (rx_error & 0x10) in corkscrew_rx()
1281 short pkt_len = rx_status & 0x1fff; in corkscrew_rx()
1300 for (i = 200; i >= 0; i--) in corkscrew_rx()
1310 for (i = 200; i >= 0; i--) in corkscrew_rx()
1314 return 0; in corkscrew_rx()
1334 if (rx_error & 0x01) in boomerang_rx()
1336 if (rx_error & 0x02) in boomerang_rx()
1338 if (rx_error & 0x04) in boomerang_rx()
1340 if (rx_error & 0x08) in boomerang_rx()
1342 if (rx_error & 0x10) in boomerang_rx()
1346 short pkt_len = rx_status & 0x1fff; in boomerang_rx()
1385 for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) { in boomerang_rx()
1396 vp->rx_ring[entry].status = 0; /* Clear complete bit. */ in boomerang_rx()
1398 return 0; in boomerang_rx()
1432 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in corkscrew_close()
1436 outl(0, ioaddr + UpListPtr); in corkscrew_close()
1437 for (i = 0; i < RX_RING_SIZE; i++) in corkscrew_close()
1444 outl(0, ioaddr + DownListPtr); in corkscrew_close()
1445 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_close()
1452 return 0; in corkscrew_close()
1480 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
1487 dev->stats.tx_packets += (inb(ioaddr + 9) & 0x30) << 4; in update_stats()
1530 snprintf(info->bus_info, sizeof(info->bus_info), "ISA 0x%lx", in netdev_get_drvinfo()