Lines Matching +full:0 +full:x83000000
67 static unsigned int lance_portlist[] __initdata = { 0x300, 0x320, 0x340, 0x360, 0};
77 .id_offset14 = 0x57,
78 .id_offset15 = 0x57,
81 .id_offset14 = 0x52,
82 .id_offset15 = 0x44,
85 .id_offset14 = 0x52,
86 .id_offset15 = 0x49,
118 {0x300, 0x320, 0x340, 0x360}.
205 #define LANCE_DATA 0x10
206 #define LANCE_ADDR 0x12
207 #define LANCE_RESET 0x14
208 #define LANCE_BUS_IF 0x16
209 #define LANCE_TOTAL_SIZE 0x18
256 #define LANCE_MUST_PAD 0x00000001
257 #define LANCE_ENABLE_AUTOSELECT 0x00000002
258 #define LANCE_MUST_REINIT_RING 0x00000004
259 #define LANCE_MUST_UNRESET 0x00000008
260 #define LANCE_HAS_MISSED_FRAME 0x00000010
270 {0x0000, "LANCE 7990", /* Ancient lance chip. */
272 {0x0003, "PCnet/ISA 79C960", /* 79C960 PCnet/ISA. */
275 {0x2260, "PCnet/ISA+ 79C961", /* 79C961 PCnet/ISA+, Plug-n-Play. */
278 {0x2420, "PCnet/PCI 79C970", /* 79C970 or 79C974 PCnet-SCSI, PCI. */
283 {0x2430, "PCnet32", /* 79C965 PCnet for VL bus. */
286 {0x2621, "PCnet/PCI-II 79C970A", /* 79C970A PCInetPCI II. */
289 {0x0, "PCnet (unknown)",
294 enum {OLD_LANCE = 0, PCNET_ISA=1, PCNET_ISAP=2, PCNET_PCI=3, PCNET_VLB=4, PCNET_PCI_II=5, LANCE_UNK…
322 module_param_hw_array(io, int, ioport, NULL, 0);
323 module_param_hw_array(dma, int, dma, NULL, 0);
324 module_param_hw_array(irq, int, irq, NULL, 0);
325 module_param(lance_debug, int, 0);
329 MODULE_PARM_DESC(lance_debug, "LANCE/PCnet debug level (0-7)");
334 int this_dev, found = 0; in lance_init_module()
336 for (this_dev = 0; this_dev < MAX_CARDS; this_dev++) { in lance_init_module()
337 if (io[this_dev] == 0) { in lance_init_module()
338 if (this_dev != 0) /* only complain once */ in lance_init_module()
340 printk(KERN_NOTICE "lance.c: Module autoprobing not allowed. Append \"io=0xNNN\" value(s).\n"); in lance_init_module()
343 dev = alloc_etherdev(0); in lance_init_module()
349 if (do_lance_probe(dev) == 0) { in lance_init_module()
356 if (found != 0) in lance_init_module()
357 return 0; in lance_init_module()
377 for (this_dev = 0; this_dev < MAX_CARDS; this_dev++) { in lance_cleanup_module()
402 lance_need_isa_bounce_buffers = 0; in do_lance_probe()
413 for (card = 0; card < NUM_CARDS; ++card) in do_lance_probe()
418 for (card = 0; card < NUM_CARDS; ++card) in do_lance_probe()
424 result = lance_probe1(dev, ioaddr, 0, 0); in do_lance_probe()
430 return 0; in do_lance_probe()
442 struct net_device *dev = alloc_etherdev(0); in lance_probe()
479 unsigned char hpJ2405A = 0; /* HP ISA adaptor */ in lance_probe1()
480 int hp_builtin = 0; /* HP on-board ethernet. */ in lance_probe1()
492 bios = ioremap(0xf00f0, 0x14); in lance_probe1()
495 if (readw(bios + 0x12) == 0x5048) { in lance_probe1()
496 static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; in lance_probe1()
497 int hp_port = (readl(bios + 1) & 1) ? 0x499 : 0x99; in lance_probe1()
499 if ((inb(hp_port) & 0xc0) == 0x80 && in lance_probe1()
505 hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00 && in lance_probe1()
506 inb(ioaddr+2) == 0x09); in lance_probe1()
516 outw(0x0000, ioaddr+LANCE_ADDR); /* Switch to window 0 */ in lance_probe1()
517 if (inw(ioaddr+LANCE_DATA) != 0x0004) in lance_probe1()
523 lance_version = 0; in lance_probe1()
530 if ((chip_version & 0xfff) != 0x003) in lance_probe1()
532 chip_version = (chip_version >> 12) & 0xffff; in lance_probe1()
546 for (i = 0; i < 6; i++) in lance_probe1()
557 if (lance_debug > 6) printk(" (#0x%05lx)", (unsigned long)lp); in lance_probe1()
575 lp->init_block.mode = 0x0003; /* Disable Rx and Tx. */ in lance_probe1()
576 for (i = 0; i < 6; i++) in lance_probe1()
578 lp->init_block.filter[0] = 0x00000000; in lance_probe1()
579 lp->init_block.filter[1] = 0x00000000; in lance_probe1()
580 lp->init_block.rx_ring = ((u32)isa_virt_to_bus(lp->rx_ring) & 0xffffff) | RX_RING_LEN_BITS; in lance_probe1()
581 lp->init_block.tx_ring = ((u32)isa_virt_to_bus(lp->tx_ring) & 0xffffff) | TX_RING_LEN_BITS; in lance_probe1()
583 outw(0x0001, ioaddr+LANCE_ADDR); in lance_probe1()
586 outw(0x0002, ioaddr+LANCE_ADDR); in lance_probe1()
589 outw(0x0000, ioaddr+LANCE_ADDR); in lance_probe1()
596 static const char dma_tbl[4] = {3, 5, 6, 0}; in lance_probe1()
613 dev->dma = bus_info & 0x07; in lance_probe1()
614 dev->irq = (bus_info >> 4) & 0x0F; in lance_probe1()
617 if (dev->mem_start & 0x07) in lance_probe1()
618 dev->dma = dev->mem_start & 0x07; in lance_probe1()
621 if (dev->dma == 0) { in lance_probe1()
624 dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0x0f) | in lance_probe1()
625 (inb(DMA2_STAT_REG) & 0xf0); in lance_probe1()
630 else if (lance_version != 0) { /* 7990 boards need DMA detection first. */ in lance_probe1()
639 outw(0x0041, ioaddr+LANCE_DATA); in lance_probe1()
650 /* Check for the initialization done bit, 0x0100, which means in lance_probe1()
652 if (inw(ioaddr+LANCE_DATA) & 0x0100) in lance_probe1()
665 for (i = 0; i < 4; i++) { in lance_probe1()
674 outw(0x7f04, ioaddr+LANCE_DATA); /* Clear the memory error bits. */ in lance_probe1()
684 outw(0x0001, ioaddr+LANCE_DATA); in lance_probe1()
685 for (boguscnt = 100; boguscnt > 0; --boguscnt) in lance_probe1()
686 if (inw(ioaddr+LANCE_DATA) & 0x0900) in lance_probe1()
688 if (inw(ioaddr+LANCE_DATA) & 0x0100) { in lance_probe1()
705 if (lance_version == 0 && dev->irq == 0) { in lance_probe1()
711 outw(0x0041, ioaddr+LANCE_DATA); in lance_probe1()
715 if (dev->irq == 0) { in lance_probe1()
725 outw(0x0002, ioaddr+LANCE_ADDR); in lance_probe1()
727 outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); in lance_probe1()
730 if (lance_debug > 0 && did_version++ == 0) in lance_probe1()
740 return 0; in lance_probe1()
761 if (dev->irq == 0 || in lance_open()
762 request_irq(dev->irq, lance_interrupt, 0, dev->name, dev)) { in lance_open()
782 outw(0, ioaddr+LANCE_RESET); in lance_open()
786 outw(0x0002, ioaddr+LANCE_ADDR); in lance_open()
788 outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); in lance_open()
800 outw(0x0001, ioaddr+LANCE_ADDR); in lance_open()
802 outw(0x0002, ioaddr+LANCE_ADDR); in lance_open()
805 outw(0x0004, ioaddr+LANCE_ADDR); in lance_open()
806 outw(0x0915, ioaddr+LANCE_DATA); in lance_open()
808 outw(0x0000, ioaddr+LANCE_ADDR); in lance_open()
809 outw(0x0001, ioaddr+LANCE_DATA); in lance_open()
813 i = 0; in lance_open()
815 if (inw(ioaddr+LANCE_DATA) & 0x0100) in lance_open()
818 * We used to clear the InitDone bit, 0x0100, here but Mark Stockton in lance_open()
821 outw(0x0042, ioaddr+LANCE_DATA); in lance_open()
827 return 0; /* Always succeed */ in lance_open()
849 for (i = 0; i < RX_RING_SIZE; i++) { in lance_purge_ring()
852 lp->rx_ring[i].base = 0; /* Not owned by LANCE chip. */ in lance_purge_ring()
856 for (i = 0; i < TX_RING_SIZE; i++) { in lance_purge_ring()
872 lp->cur_rx = lp->cur_tx = 0; in lance_init_ring()
873 lp->dirty_rx = lp->dirty_tx = 0; in lance_init_ring()
875 for (i = 0; i < RX_RING_SIZE; i++) { in lance_init_ring()
886 lp->rx_ring[i].base = 0; in lance_init_ring()
888 lp->rx_ring[i].base = (u32)isa_virt_to_bus(rx_buff) | 0x80000000; in lance_init_ring()
893 for (i = 0; i < TX_RING_SIZE; i++) { in lance_init_ring()
895 lp->tx_ring[i].base = 0; in lance_init_ring()
898 lp->init_block.mode = 0x0000; in lance_init_ring()
899 for (i = 0; i < 6; i++) in lance_init_ring()
901 lp->init_block.filter[0] = 0x00000000; in lance_init_ring()
902 lp->init_block.filter[1] = 0x00000000; in lance_init_ring()
903 lp->init_block.rx_ring = ((u32)isa_virt_to_bus(lp->rx_ring) & 0xffffff) | RX_RING_LEN_BITS; in lance_init_ring()
904 lp->init_block.tx_ring = ((u32)isa_virt_to_bus(lp->tx_ring) & 0xffffff) | TX_RING_LEN_BITS; in lance_init_ring()
917 outw(0x0000, dev->base_addr + LANCE_ADDR); in lance_restart()
927 outw (0, ioaddr + LANCE_ADDR); in lance_tx_timeout()
930 outw (0x0004, ioaddr + LANCE_DATA); in lance_tx_timeout()
938 for (i = 0; i < RX_RING_SIZE; i++) in lance_tx_timeout()
939 printk ("%s %08x %04x %04x", i & 0x3 ? "" : "\n ", in lance_tx_timeout()
942 for (i = 0; i < TX_RING_SIZE; i++) in lance_tx_timeout()
943 printk ("%s %08x %04x %04x", i & 0x3 ? "" : "\n ", in lance_tx_timeout()
949 lance_restart (dev, 0x0043, 1); in lance_tx_timeout()
967 outw(0x0000, ioaddr+LANCE_ADDR); in lance_start_xmit()
970 outw(0x0000, ioaddr+LANCE_DATA); in lance_start_xmit()
993 lp->tx_ring[entry].misc = 0x0000; in lance_start_xmit()
999 if ((u32)isa_virt_to_bus(skb->data) + skb->len > 0x01000000) { in lance_start_xmit()
1005 ((u32)isa_virt_to_bus((lp->tx_bounce_buffs + entry)) & 0xffffff) | 0x83000000; in lance_start_xmit()
1009 lp->tx_ring[entry].base = ((u32)isa_virt_to_bus(skb->data) & 0xffffff) | 0x83000000; in lance_start_xmit()
1014 outw(0x0000, ioaddr+LANCE_ADDR); in lance_start_xmit()
1015 outw(0x0048, ioaddr+LANCE_DATA); in lance_start_xmit()
1038 outw(0x00, dev->base_addr + LANCE_ADDR); in lance_interrupt()
1039 while ((csr0 = inw(dev->base_addr + LANCE_DATA)) & 0x8600 && in lance_interrupt()
1040 --boguscnt >= 0) { in lance_interrupt()
1042 outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); in lance_interrupt()
1044 must_restart = 0; in lance_interrupt()
1050 if (csr0 & 0x0400) /* Rx interrupt */ in lance_interrupt()
1053 if (csr0 & 0x0200) { /* Tx-done interrupt */ in lance_interrupt()
1060 if (status < 0) in lance_interrupt()
1063 lp->tx_ring[entry].base = 0; in lance_interrupt()
1065 if (status & 0x40000000) { in lance_interrupt()
1069 if (err_status & 0x0400) in lance_interrupt()
1071 if (err_status & 0x0800) in lance_interrupt()
1073 if (err_status & 0x1000) in lance_interrupt()
1075 if (err_status & 0x4000) { in lance_interrupt()
1085 if (status & 0x18000000) in lance_interrupt()
1117 if (csr0 & 0x4000) in lance_interrupt()
1119 if (csr0 & 0x1000) in lance_interrupt()
1121 if (csr0 & 0x0800) { in lance_interrupt()
1130 outw(0x0000, dev->base_addr + LANCE_ADDR); in lance_interrupt()
1131 outw(0x0004, dev->base_addr + LANCE_DATA); in lance_interrupt()
1132 lance_restart(dev, 0x0002, 0); in lance_interrupt()
1137 outw(0x0000, dev->base_addr + LANCE_ADDR); in lance_interrupt()
1138 outw(0x7940, dev->base_addr + LANCE_DATA); in lance_interrupt()
1157 while (lp->rx_ring[entry].base >= 0) { in lance_rx()
1160 if (status != 0x03) { /* There was an error. */ in lance_rx()
1165 if (status & 0x01) /* Only count a general error at the */ in lance_rx()
1167 if (status & 0x20) in lance_rx()
1169 if (status & 0x10) in lance_rx()
1171 if (status & 0x08) in lance_rx()
1173 if (status & 0x04) in lance_rx()
1175 lp->rx_ring[entry].base &= 0x03ffffff; in lance_rx()
1180 short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4; in lance_rx()
1194 for (i=0; i < RX_RING_SIZE; i++) in lance_rx()
1195 if (lp->rx_ring[(entry+i) & RX_RING_MOD_MASK].base < 0) in lance_rx()
1201 lp->rx_ring[entry].base |= 0x80000000; in lance_rx()
1209 (unsigned char *)isa_bus_to_virt((lp->rx_ring[entry].base & 0x00ffffff)), in lance_rx()
1220 lp->rx_ring[entry].base |= 0x80000000; in lance_rx()
1227 return 0; in lance_rx()
1242 outw(0, ioaddr+LANCE_ADDR); in lance_close()
1250 outw(0x0004, ioaddr+LANCE_DATA); in lance_close()
1262 return 0; in lance_close()
1292 outw(0, ioaddr+LANCE_ADDR); in set_multicast_list()
1293 outw(0x0004, ioaddr+LANCE_DATA); /* Temporarily stop the lance. */ in set_multicast_list()
1297 outw(0x8000, ioaddr+LANCE_DATA); /* Set promiscuous mode */ in set_multicast_list()
1305 memset(multicast_table, (num_addrs == 0) ? 0 : -1, sizeof(multicast_table)); in set_multicast_list()
1306 for (i = 0; i < 4; i++) { in set_multicast_list()
1311 outw(0x0000, ioaddr+LANCE_DATA); /* Unset promiscuous mode */ in set_multicast_list()
1314 lance_restart(dev, 0x0142, 0); /* Resume normal operation */ in set_multicast_list()