Lines Matching +full:0 +full:x40f

86 /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
100 aliased registers at <base>+0x400.
102 #define CORKSCREW_TOTAL_SIZE 0x20
172 #define EL3_CMD 0x0e
173 #define EL3_STATUS 0x0e
182 TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
201 IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
202 TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
203 IntReq = 0x0040, StatsFull = 0x0080,
210 On the Corkscrew this window is always mapped at offsets 0x10-0x1f. */
212 TX_FIFO = 0x10, RX_FIFO = 0x10, RxErrors = 0x14,
213 RxStatus = 0x18, Timer = 0x1A, TxStatus = 0x1B,
214 TxFree = 0x1C, /* Remaining free bytes in Tx buffer. */
217 Wn0IRQ = 0x08,
219 Wn0EepromCmd = 0x200A, /* Corkscrew EEPROM command register. */
220 Wn0EepromData = 0x200C, /* Corkscrew EEPROM results register. */
222 Wn0EepromCmd = 10, /* Window 0: EEPROM command register. */
223 Wn0EepromData = 12, /* Window 0: EEPROM results register. */
227 EEPROM_Read = 0x80, EEPROM_WRITE = 0x40, EEPROM_ERASE = 0xC0,
228 EEPROM_EWENB = 0x30, /* Enable erasing/writing for 10 msec. */
229 EEPROM_EWDIS = 0x00, /* Disable EWENB before 10 msec timeout. */
234 PhysAddr01 = 0, PhysAddr23 = 1, PhysAddr45 = 2, ModelID = 3,
239 Wn3_Config = 0, Wn3_MAC_Ctrl = 6, Wn3_Options = 8,
244 Ram_speed = 0x30,
245 Rom_size = 0xc0,
250 Autoselect = 0x1000000,
257 Media_SQE = 0x0008, /* Enable SQE error counting for AUI. */
258 Media_10TP = 0x00C0, /* Enable link beat and jabber for 10baseT. */
259 Media_Lnk = 0x0080, /* Enable just link beat for 100TX/100FX. */
260 Media_LnkBeat = 0x0800,
263 Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12,
268 PktStatus = 0x400, DownListPtr = 0x404, FragAddr = 0x408, FragLen =
269 0x40c,
270 TxFreeThreshold = 0x40f, UpPktStatus = 0x410, UpListPtr = 0x418,
285 RxDComplete = 0x00008000, RxDError = 0x4000,
327 XCVR_10baseT = 0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
338 { "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 },
339 { "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10},
340 { "undefined", 0, 0x80, XCVR_10baseT, 10000},
341 { "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10},
342 { "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10},
343 { "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10},
344 { "MII", 0, 0x40, XCVR_10baseT, 3 * HZ},
345 { "undefined", 0, 0x01, XCVR_10baseT, 10000},
346 { "Default", 0, 0xFF, XCVR_10baseT, 10000},
352 ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
399 module_param(debug, int, 0);
400 module_param_array(options, int, NULL, 0);
401 module_param(rx_copybreak, int, 0);
402 module_param(max_interrupt_work, int, 0);
403 MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
404 MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
414 int found = 0; in corkscrew_init_module()
415 if (debug >= 0) in corkscrew_init_module()
419 return found ? 0 : -ENODEV; in corkscrew_init_module()
440 return 0; in check_device()
442 if ((inw(ioaddr + 0x2002) & 0x1f0) != (ioaddr & 0x1f0)) { in check_device()
444 return 0; in check_device()
449 for (timer = 4; timer >= 0; timer--) { in check_device()
451 if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0) in check_device()
454 if (inw(ioaddr + Wn0EepromData) != 0x6d50) { in check_device()
456 return 0; in check_device()
476 static int cards_found = 0; in corkscrew_scan()
488 if (unit >= 0) { in corkscrew_scan()
496 for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) { in corkscrew_scan()
504 if (pnp_device_attach(idev) < 0) in corkscrew_scan()
506 if (pnp_activate_dev(idev) < 0) { in corkscrew_scan()
511 if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) { in corkscrew_scan()
515 ioaddr = pnp_port_start(idev, 0); in corkscrew_scan()
516 irq = pnp_irq(idev, 0); in corkscrew_scan()
522 pr_debug("ISAPNP reports %s at i/o 0x%x, irq %d\n", in corkscrew_scan()
525 inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); in corkscrew_scan()
526 /* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */ in corkscrew_scan()
539 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) { in corkscrew_scan()
544 inl(ioaddr + 0x2002), inw(ioaddr + 0x2000)); in corkscrew_scan()
571 unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */ in corkscrew_setup()
578 irq = pnp_irq(idev, 0); in corkscrew_setup()
581 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
584 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
589 dev->dma = inw(ioaddr + 0x2000) & 7; in corkscrew_setup()
601 if (vp->options >= 0) { in corkscrew_setup()
604 vp->media_override = 0; in corkscrew_setup()
605 vp->full_duplex = (vp->options & 8) ? 1 : 0; in corkscrew_setup()
606 vp->bus_master = (vp->options & 16) ? 1 : 0; in corkscrew_setup()
609 vp->full_duplex = 0; in corkscrew_setup()
610 vp->bus_master = 0; in corkscrew_setup()
620 timer_setup(&vp->timer, corkscrew_timer, 0); in corkscrew_setup()
623 EL3WINDOW(0); in corkscrew_setup()
624 for (i = 0; i < 0x18; i++) { in corkscrew_setup()
628 for (timer = 4; timer >= 0; timer--) { in corkscrew_setup()
630 if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0) in corkscrew_setup()
639 checksum = (checksum ^ (checksum >> 8)) & 0xff; in corkscrew_setup()
640 if (checksum != 0x00) in corkscrew_setup()
643 if (eeprom[16] == 0x11c7) { /* Corkscrew */ in corkscrew_setup()
646 dev->dma = 0; in corkscrew_setup()
652 if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15)) in corkscrew_setup()
673 vp->autoselect = config & Autoselect ? 1 : 0; in corkscrew_setup()
684 vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
686 /* vp->full_bus_master_rx = 0; */ in corkscrew_setup()
687 vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
709 outb(0x20, ioaddr + Wn3_MAC_Ctrl); /* Set the full-duplex bit. */ in corkscrew_open()
740 for (i = 20; i >= 0; i--) in corkscrew_open()
746 for (i = 20; i >= 0; i--) in corkscrew_open()
750 outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD); in corkscrew_open()
753 if (vp->capabilities == 0x11c7) { in corkscrew_open()
755 if (dev->irq == 0 || in corkscrew_open()
756 dev->dma == 0 || in corkscrew_open()
757 request_irq(dev->irq, corkscrew_interrupt, 0, in corkscrew_open()
778 for (i = 0; i < 6; i++) in corkscrew_open()
781 outw(0, ioaddr + i); in corkscrew_open()
793 for (i = 0; i < 10; i++) in corkscrew_open()
801 outw(0x0040, ioaddr + Wn4_NetDiag); in corkscrew_open()
807 vp->cur_rx = vp->dirty_rx = 0; in corkscrew_open()
810 for (i = 0; i < RX_RING_SIZE; i++) { in corkscrew_open()
816 vp->rx_ring[i].next = 0; in corkscrew_open()
817 vp->rx_ring[i].status = 0; /* Clear complete bit. */ in corkscrew_open()
818 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; in corkscrew_open()
826 if (i != 0) in corkscrew_open()
828 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ in corkscrew_open()
829 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); in corkscrew_open()
832 vp->cur_tx = vp->dirty_tx = 0; in corkscrew_open()
835 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_open()
837 outl(0, ioaddr + DownListPtr); in corkscrew_open()
851 (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD); in corkscrew_open()
856 | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete, in corkscrew_open()
859 return 0; in corkscrew_open()
869 int ok = 0; in corkscrew_timer()
883 case 0: in corkscrew_timer()
964 if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) in corkscrew_timeout()
972 &vp->tx_ring[0]); in corkscrew_timeout()
973 for (i = 0; i < TX_RING_SIZE; i++) { in corkscrew_timeout()
981 for (i = 20; i >= 0; i--) in corkscrew_timeout()
1010 if (vp->cur_tx != 0) in corkscrew_start_xmit()
1019 vp->tx_ring[entry].next = 0; in corkscrew_start_xmit()
1021 vp->tx_ring[entry].length = skb->len | 0x80000000; in corkscrew_start_xmit()
1022 vp->tx_ring[entry].status = skb->len | 0x80000000; in corkscrew_start_xmit()
1027 for (i = 20; i >= 0; i--) in corkscrew_start_xmit()
1028 if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0) in corkscrew_start_xmit()
1032 if (inl(ioaddr + DownListPtr) == 0) { in corkscrew_start_xmit()
1045 prev_entry->status &= ~0x80000000; in corkscrew_start_xmit()
1089 while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) { in corkscrew_start_xmit()
1090 if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ in corkscrew_start_xmit()
1094 if (tx_status & 0x04) in corkscrew_start_xmit()
1096 if (tx_status & 0x38) in corkscrew_start_xmit()
1098 if (tx_status & 0x30) { in corkscrew_start_xmit()
1101 for (j = 20; j >= 0; j--) in corkscrew_start_xmit()
1107 outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ in corkscrew_start_xmit()
1135 if ((status & 0xE000) != 0xE000) { in corkscrew_interrupt()
1165 while (lp->cur_tx - dirty_tx > 0) { in corkscrew_interrupt()
1178 lp->tx_full = 0; in corkscrew_interrupt()
1184 outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */ in corkscrew_interrupt()
1206 if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) { in corkscrew_interrupt()
1210 for (win = 0; win < 8; win++) { in corkscrew_interrupt()
1213 for (reg = 0; reg < 16; reg++) in corkscrew_interrupt()
1236 if (--i < 0) { in corkscrew_interrupt()
1238 dev->name, status, SetStatusEnb | ((~status) & 0x7FE)); in corkscrew_interrupt()
1240 outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD); in corkscrew_interrupt()
1241 outw(AckIntr | 0x7FF, ioaddr + EL3_CMD); in corkscrew_interrupt()
1265 while ((rx_status = inw(ioaddr + RxStatus)) > 0) { in corkscrew_rx()
1266 if (rx_status & 0x4000) { /* Error, update stats. */ in corkscrew_rx()
1272 if (rx_error & 0x01) in corkscrew_rx()
1274 if (rx_error & 0x02) in corkscrew_rx()
1276 if (rx_error & 0x04) in corkscrew_rx()
1278 if (rx_error & 0x08) in corkscrew_rx()
1280 if (rx_error & 0x10) in corkscrew_rx()
1284 short pkt_len = rx_status & 0x1fff; in corkscrew_rx()
1303 for (i = 200; i >= 0; i--) in corkscrew_rx()
1313 for (i = 200; i >= 0; i--) in corkscrew_rx()
1317 return 0; in corkscrew_rx()
1337 if (rx_error & 0x01) in boomerang_rx()
1339 if (rx_error & 0x02) in boomerang_rx()
1341 if (rx_error & 0x04) in boomerang_rx()
1343 if (rx_error & 0x08) in boomerang_rx()
1345 if (rx_error & 0x10) in boomerang_rx()
1349 short pkt_len = rx_status & 0x1fff; in boomerang_rx()
1388 for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) { in boomerang_rx()
1399 vp->rx_ring[entry].status = 0; /* Clear complete bit. */ in boomerang_rx()
1401 return 0; in boomerang_rx()
1435 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in corkscrew_close()
1439 outl(0, ioaddr + UpListPtr); in corkscrew_close()
1440 for (i = 0; i < RX_RING_SIZE; i++) in corkscrew_close()
1447 outl(0, ioaddr + DownListPtr); in corkscrew_close()
1448 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_close()
1455 return 0; in corkscrew_close()
1483 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
1490 dev->stats.tx_packets += (inb(ioaddr + 9) & 0x30) << 4; in update_stats()
1533 snprintf(info->bus_info, sizeof(info->bus_info), "ISA 0x%lx", in netdev_get_drvinfo()