• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x40f

84 /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
98 aliased registers at <base>+0x400.
100 #define CORKSCREW_TOTAL_SIZE 0x20
170 #define EL3_CMD 0x0e
171 #define EL3_STATUS 0x0e
180 TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
199 IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
200 TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
201 IntReq = 0x0040, StatsFull = 0x0080,
208 On the Corkscrew this window is always mapped at offsets 0x10-0x1f. */
210 TX_FIFO = 0x10, RX_FIFO = 0x10, RxErrors = 0x14,
211 RxStatus = 0x18, Timer = 0x1A, TxStatus = 0x1B,
212 TxFree = 0x1C, /* Remaining free bytes in Tx buffer. */
215 Wn0IRQ = 0x08,
217 Wn0EepromCmd = 0x200A, /* Corkscrew EEPROM command register. */
218 Wn0EepromData = 0x200C, /* Corkscrew EEPROM results register. */
220 Wn0EepromCmd = 10, /* Window 0: EEPROM command register. */
221 Wn0EepromData = 12, /* Window 0: EEPROM results register. */
225 EEPROM_Read = 0x80, EEPROM_WRITE = 0x40, EEPROM_ERASE = 0xC0,
226 EEPROM_EWENB = 0x30, /* Enable erasing/writing for 10 msec. */
227 EEPROM_EWDIS = 0x00, /* Disable EWENB before 10 msec timeout. */
232 PhysAddr01 = 0, PhysAddr23 = 1, PhysAddr45 = 2, ModelID = 3,
237 Wn3_Config = 0, Wn3_MAC_Ctrl = 6, Wn3_Options = 8,
242 Ram_speed = 0x30,
243 Rom_size = 0xc0,
248 Autoselect = 0x1000000,
255 Media_SQE = 0x0008, /* Enable SQE error counting for AUI. */
256 Media_10TP = 0x00C0, /* Enable link beat and jabber for 10baseT. */
257 Media_Lnk = 0x0080, /* Enable just link beat for 100TX/100FX. */
258 Media_LnkBeat = 0x0800,
261 Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12,
266 PktStatus = 0x400, DownListPtr = 0x404, FragAddr = 0x408, FragLen =
267 0x40c,
268 TxFreeThreshold = 0x40f, UpPktStatus = 0x410, UpListPtr = 0x418,
283 RxDComplete = 0x00008000, RxDError = 0x4000,
325 XCVR_10baseT = 0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
336 { "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 },
337 { "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10},
338 { "undefined", 0, 0x80, XCVR_10baseT, 10000},
339 { "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10},
340 { "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10},
341 { "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10},
342 { "MII", 0, 0x40, XCVR_10baseT, 3 * HZ},
343 { "undefined", 0, 0x01, XCVR_10baseT, 10000},
344 { "Default", 0, 0xFF, XCVR_10baseT, 10000},
350 ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
397 module_param(debug, int, 0);
398 module_param_array(options, int, NULL, 0);
399 module_param(rx_copybreak, int, 0);
400 module_param(max_interrupt_work, int, 0);
401 MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
402 MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
412 int found = 0; in init_module()
413 if (debug >= 0) in init_module()
417 return found ? 0 : -ENODEV; in 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()
574 irq = pnp_irq(idev, 0); in corkscrew_setup()
577 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
580 irq = inw(ioaddr + 0x2002) & 15; in corkscrew_setup()
585 dev->dma = inw(ioaddr + 0x2000) & 7; in corkscrew_setup()
597 if (vp->options >= 0) { in corkscrew_setup()
600 vp->media_override = 0; in corkscrew_setup()
601 vp->full_duplex = (vp->options & 8) ? 1 : 0; in corkscrew_setup()
602 vp->bus_master = (vp->options & 16) ? 1 : 0; in corkscrew_setup()
605 vp->full_duplex = 0; in corkscrew_setup()
606 vp->bus_master = 0; in corkscrew_setup()
616 timer_setup(&vp->timer, corkscrew_timer, 0); in corkscrew_setup()
619 EL3WINDOW(0); in corkscrew_setup()
620 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()
635 checksum = (checksum ^ (checksum >> 8)) & 0xff; in corkscrew_setup()
636 if (checksum != 0x00) in corkscrew_setup()
639 if (eeprom[16] == 0x11c7) { /* Corkscrew */ in corkscrew_setup()
642 dev->dma = 0; in corkscrew_setup()
648 if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15)) in corkscrew_setup()
669 vp->autoselect = config & Autoselect ? 1 : 0; in corkscrew_setup()
680 vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
682 /* vp->full_bus_master_rx = 0; */ in corkscrew_setup()
683 vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; in corkscrew_setup()
705 outb(0x20, ioaddr + Wn3_MAC_Ctrl); /* Set the full-duplex bit. */ in corkscrew_open()
736 for (i = 20; i >= 0; i--) in corkscrew_open()
742 for (i = 20; i >= 0; i--) in corkscrew_open()
746 outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD); in corkscrew_open()
749 if (vp->capabilities == 0x11c7) { in corkscrew_open()
751 if (dev->irq == 0 || in corkscrew_open()
752 dev->dma == 0 || in corkscrew_open()
753 request_irq(dev->irq, corkscrew_interrupt, 0, in corkscrew_open()
774 for (i = 0; i < 6; i++) in corkscrew_open()
777 outw(0, ioaddr + i); in corkscrew_open()
789 for (i = 0; i < 10; i++) in corkscrew_open()
797 outw(0x0040, ioaddr + Wn4_NetDiag); in corkscrew_open()
803 vp->cur_rx = vp->dirty_rx = 0; in corkscrew_open()
806 for (i = 0; i < RX_RING_SIZE; i++) { in corkscrew_open()
812 vp->rx_ring[i].next = 0; in corkscrew_open()
813 vp->rx_ring[i].status = 0; /* Clear complete bit. */ in corkscrew_open()
814 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; in corkscrew_open()
822 if (i != 0) in corkscrew_open()
824 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ in corkscrew_open()
825 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); in corkscrew_open()
828 vp->cur_tx = vp->dirty_tx = 0; in corkscrew_open()
831 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_open()
833 outl(0, ioaddr + DownListPtr); in corkscrew_open()
847 (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD); in corkscrew_open()
852 | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete, in corkscrew_open()
855 return 0; in corkscrew_open()
865 int ok = 0; in corkscrew_timer()
879 case 0: in corkscrew_timer()
960 if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) in corkscrew_timeout()
968 &vp->tx_ring[0]); in corkscrew_timeout()
969 for (i = 0; i < TX_RING_SIZE; i++) { in corkscrew_timeout()
977 for (i = 20; i >= 0; i--) in corkscrew_timeout()
1006 if (vp->cur_tx != 0) in corkscrew_start_xmit()
1015 vp->tx_ring[entry].next = 0; in corkscrew_start_xmit()
1017 vp->tx_ring[entry].length = skb->len | 0x80000000; in corkscrew_start_xmit()
1018 vp->tx_ring[entry].status = skb->len | 0x80000000; in corkscrew_start_xmit()
1023 for (i = 20; i >= 0; i--) in corkscrew_start_xmit()
1024 if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0) in corkscrew_start_xmit()
1028 if (inl(ioaddr + DownListPtr) == 0) { in corkscrew_start_xmit()
1041 prev_entry->status &= ~0x80000000; in corkscrew_start_xmit()
1085 while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) { in corkscrew_start_xmit()
1086 if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ in corkscrew_start_xmit()
1090 if (tx_status & 0x04) in corkscrew_start_xmit()
1092 if (tx_status & 0x38) in corkscrew_start_xmit()
1094 if (tx_status & 0x30) { in corkscrew_start_xmit()
1097 for (j = 20; j >= 0; j--) in corkscrew_start_xmit()
1103 outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ in corkscrew_start_xmit()
1131 if ((status & 0xE000) != 0xE000) { in corkscrew_interrupt()
1161 while (lp->cur_tx - dirty_tx > 0) { in corkscrew_interrupt()
1174 lp->tx_full = 0; in corkscrew_interrupt()
1180 outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */ in corkscrew_interrupt()
1202 if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) { in corkscrew_interrupt()
1206 for (win = 0; win < 8; win++) { in corkscrew_interrupt()
1209 for (reg = 0; reg < 16; reg++) in corkscrew_interrupt()
1232 if (--i < 0) { in corkscrew_interrupt()
1234 dev->name, status, SetStatusEnb | ((~status) & 0x7FE)); in corkscrew_interrupt()
1236 outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD); in corkscrew_interrupt()
1237 outw(AckIntr | 0x7FF, ioaddr + EL3_CMD); in corkscrew_interrupt()
1261 while ((rx_status = inw(ioaddr + RxStatus)) > 0) { in corkscrew_rx()
1262 if (rx_status & 0x4000) { /* Error, update stats. */ in corkscrew_rx()
1268 if (rx_error & 0x01) in corkscrew_rx()
1270 if (rx_error & 0x02) in corkscrew_rx()
1272 if (rx_error & 0x04) in corkscrew_rx()
1274 if (rx_error & 0x08) in corkscrew_rx()
1276 if (rx_error & 0x10) in corkscrew_rx()
1280 short pkt_len = rx_status & 0x1fff; in corkscrew_rx()
1299 for (i = 200; i >= 0; i--) in corkscrew_rx()
1309 for (i = 200; i >= 0; i--) in corkscrew_rx()
1313 return 0; in corkscrew_rx()
1333 if (rx_error & 0x01) in boomerang_rx()
1335 if (rx_error & 0x02) in boomerang_rx()
1337 if (rx_error & 0x04) in boomerang_rx()
1339 if (rx_error & 0x08) in boomerang_rx()
1341 if (rx_error & 0x10) in boomerang_rx()
1345 short pkt_len = rx_status & 0x1fff; in boomerang_rx()
1384 for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) { in boomerang_rx()
1395 vp->rx_ring[entry].status = 0; /* Clear complete bit. */ in boomerang_rx()
1397 return 0; in boomerang_rx()
1431 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in corkscrew_close()
1435 outl(0, ioaddr + UpListPtr); in corkscrew_close()
1436 for (i = 0; i < RX_RING_SIZE; i++) in corkscrew_close()
1443 outl(0, ioaddr + DownListPtr); in corkscrew_close()
1444 for (i = 0; i < TX_RING_SIZE; i++) in corkscrew_close()
1451 return 0; in corkscrew_close()
1479 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
1486 dev->stats.tx_packets += (inb(ioaddr + 9) & 0x30) << 4; in update_stats()
1529 snprintf(info->bus_info, sizeof(info->bus_info), "ISA 0x%lx", in netdev_get_drvinfo()