lanai 302 drivers/atm/lanai.c static void vci_bitfield_iterate(struct lanai_dev *lanai, lanai 309 drivers/atm/lanai.c func(lanai, vci); lanai 468 drivers/atm/lanai.c static inline bus_addr_t reg_addr(const struct lanai_dev *lanai, lanai 471 drivers/atm/lanai.c return lanai->base + reg; lanai 474 drivers/atm/lanai.c static inline u32 reg_read(const struct lanai_dev *lanai, lanai 478 drivers/atm/lanai.c t = readl(reg_addr(lanai, reg)); lanai 479 drivers/atm/lanai.c RWDEBUG("R [0x%08X] 0x%02X = 0x%08X\n", (unsigned int) lanai->base, lanai 484 drivers/atm/lanai.c static inline void reg_write(const struct lanai_dev *lanai, u32 val, lanai 487 drivers/atm/lanai.c RWDEBUG("W [0x%08X] 0x%02X < 0x%08X\n", (unsigned int) lanai->base, lanai 489 drivers/atm/lanai.c writel(val, reg_addr(lanai, reg)); lanai 492 drivers/atm/lanai.c static inline void conf1_write(const struct lanai_dev *lanai) lanai 494 drivers/atm/lanai.c reg_write(lanai, lanai->conf1, Config1_Reg); lanai 497 drivers/atm/lanai.c static inline void conf2_write(const struct lanai_dev *lanai) lanai 499 drivers/atm/lanai.c reg_write(lanai, lanai->conf2, Config2_Reg); lanai 503 drivers/atm/lanai.c static inline void conf2_write_if_powerup(const struct lanai_dev *lanai) lanai 506 drivers/atm/lanai.c if (unlikely((lanai->conf1 & CONFIG1_POWERDOWN) != 0)) lanai 509 drivers/atm/lanai.c conf2_write(lanai); lanai 512 drivers/atm/lanai.c static inline void reset_board(const struct lanai_dev *lanai) lanai 515 drivers/atm/lanai.c reg_write(lanai, 0, Reset_Reg); lanai 535 drivers/atm/lanai.c static inline bus_addr_t sram_addr(const struct lanai_dev *lanai, int offset) lanai 537 drivers/atm/lanai.c return lanai->base + SRAM_START + offset; lanai 540 drivers/atm/lanai.c static inline u32 sram_read(const struct lanai_dev *lanai, int offset) lanai 542 drivers/atm/lanai.c return readl(sram_addr(lanai, offset)); lanai 545 drivers/atm/lanai.c static inline void sram_write(const struct lanai_dev *lanai, lanai 548 drivers/atm/lanai.c writel(val, sram_addr(lanai, offset)); lanai 551 drivers/atm/lanai.c static int sram_test_word(const struct lanai_dev *lanai, int offset, lanai 555 drivers/atm/lanai.c sram_write(lanai, pattern, offset); lanai 556 drivers/atm/lanai.c readback = sram_read(lanai, offset); lanai 561 drivers/atm/lanai.c lanai->number, offset, lanai 566 drivers/atm/lanai.c static int sram_test_pass(const struct lanai_dev *lanai, u32 pattern) lanai 570 drivers/atm/lanai.c result = sram_test_word(lanai, offset, pattern); lanai 574 drivers/atm/lanai.c static int sram_test_and_clear(const struct lanai_dev *lanai) lanai 579 drivers/atm/lanai.c if ((result = sram_test_pass(lanai, 0x5555)) != 0) lanai 581 drivers/atm/lanai.c if ((result = sram_test_pass(lanai, 0xAAAA)) != 0) lanai 585 drivers/atm/lanai.c return sram_test_pass(lanai, 0x0000); lanai 640 drivers/atm/lanai.c static inline bus_addr_t cardvcc_addr(const struct lanai_dev *lanai, lanai 643 drivers/atm/lanai.c return sram_addr(lanai, vci * CARDVCC_SIZE); lanai 762 drivers/atm/lanai.c static void lanai_shutdown_tx_vci(struct lanai_dev *lanai, lanai 776 drivers/atm/lanai.c __clear_bit(lvcc->vci, lanai->backlog_vccs); lanai 818 drivers/atm/lanai.c static inline int aal0_buffer_allocate(struct lanai_dev *lanai) lanai 821 drivers/atm/lanai.c lanai_buf_allocate(&lanai->aal0buf, AAL0_RX_BUFFER_SIZE, 80, lanai 822 drivers/atm/lanai.c lanai->pci); lanai 823 drivers/atm/lanai.c return (lanai->aal0buf.start == NULL) ? -ENOMEM : 0; lanai 826 drivers/atm/lanai.c static inline void aal0_buffer_free(struct lanai_dev *lanai) lanai 829 drivers/atm/lanai.c lanai_buf_deallocate(&lanai->aal0buf, lanai->pci); lanai 851 drivers/atm/lanai.c static int eeprom_read(struct lanai_dev *lanai) lanai 854 drivers/atm/lanai.c lanai->number); lanai 855 drivers/atm/lanai.c memset(&lanai->eeprom[EEPROM_MAC], 0, 6); lanai 859 drivers/atm/lanai.c static int eeprom_validate(struct lanai_dev *lanai) lanai 861 drivers/atm/lanai.c lanai->serialno = 0; lanai 862 drivers/atm/lanai.c lanai->magicno = EEPROM_MAGIC_VALUE; lanai 868 drivers/atm/lanai.c static int eeprom_read(struct lanai_dev *lanai) lanai 873 drivers/atm/lanai.c #define set_config1(x) do { lanai->conf1 = x; conf1_write(lanai); \ lanai 875 drivers/atm/lanai.c #define clock_h() set_config1(lanai->conf1 | CONFIG1_PROMCLK) lanai 876 drivers/atm/lanai.c #define clock_l() set_config1(lanai->conf1 &~ CONFIG1_PROMCLK) lanai 877 drivers/atm/lanai.c #define data_h() set_config1(lanai->conf1 | CONFIG1_PROMDATA) lanai 878 drivers/atm/lanai.c #define data_l() set_config1(lanai->conf1 &~ CONFIG1_PROMDATA) lanai 880 drivers/atm/lanai.c #define read_pin() (reg_read(lanai, Status_Reg) & STATUS_PROMDATA) lanai 891 drivers/atm/lanai.c tmp = (lanai->conf1 & ~CONFIG1_PROMDATA) | lanai 893 drivers/atm/lanai.c if (lanai->conf1 != tmp) { lanai 916 drivers/atm/lanai.c lanai->eeprom[address] = data; lanai 925 drivers/atm/lanai.c lanai->number, address); lanai 938 drivers/atm/lanai.c static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address) lanai 940 drivers/atm/lanai.c return be32_to_cpup((const u32 *) &lanai->eeprom[address]); lanai 944 drivers/atm/lanai.c static int eeprom_validate(struct lanai_dev *lanai) lanai 948 drivers/atm/lanai.c const u8 *e = lanai->eeprom; lanai 968 drivers/atm/lanai.c "(wanted 0x%02X, got 0x%02X)\n", lanai->number, lanai 975 drivers/atm/lanai.c "bad (wanted 0x%02X, got 0x%02X)\n", lanai->number, lanai 984 drivers/atm/lanai.c "(0x%02X, inverse 0x%02X)\n", lanai->number, lanai 991 drivers/atm/lanai.c lanai->serialno = eeprom_be4(lanai, EEPROM_SERIAL); lanai 992 drivers/atm/lanai.c v = eeprom_be4(lanai, EEPROM_SERIAL_REV); lanai 993 drivers/atm/lanai.c if ((lanai->serialno ^ v) != 0xFFFFFFFF) { lanai 995 drivers/atm/lanai.c "don't match (0x%08X, inverse 0x%08X)\n", lanai->number, lanai 996 drivers/atm/lanai.c (unsigned int) lanai->serialno, (unsigned int) v); lanai 999 drivers/atm/lanai.c DPRINTK("eeprom: Serial number = %d\n", (unsigned int) lanai->serialno); lanai 1001 drivers/atm/lanai.c lanai->magicno = eeprom_be4(lanai, EEPROM_MAGIC); lanai 1002 drivers/atm/lanai.c v = eeprom_be4(lanai, EEPROM_MAGIC_REV); lanai 1003 drivers/atm/lanai.c if ((lanai->magicno ^ v) != 0xFFFFFFFF) { lanai 1005 drivers/atm/lanai.c "don't match (0x%08X, inverse 0x%08X)\n", lanai->number, lanai 1006 drivers/atm/lanai.c lanai->magicno, v); lanai 1009 drivers/atm/lanai.c DPRINTK("eeprom: Magic number = 0x%08X\n", lanai->magicno); lanai 1010 drivers/atm/lanai.c if (lanai->magicno != EEPROM_MAGIC_VALUE) lanai 1013 drivers/atm/lanai.c lanai->number, (unsigned int) lanai->magicno, lanai 1020 drivers/atm/lanai.c static inline const u8 *eeprom_mac(const struct lanai_dev *lanai) lanai 1022 drivers/atm/lanai.c return &lanai->eeprom[EEPROM_MAC]; lanai 1052 drivers/atm/lanai.c static inline u32 intr_pending(const struct lanai_dev *lanai) lanai 1054 drivers/atm/lanai.c return reg_read(lanai, IntStatusMasked_Reg); lanai 1057 drivers/atm/lanai.c static inline void intr_enable(const struct lanai_dev *lanai, u32 i) lanai 1059 drivers/atm/lanai.c reg_write(lanai, i, IntControlEna_Reg); lanai 1062 drivers/atm/lanai.c static inline void intr_disable(const struct lanai_dev *lanai, u32 i) lanai 1064 drivers/atm/lanai.c reg_write(lanai, i, IntControlDis_Reg); lanai 1076 drivers/atm/lanai.c static void lanai_check_status(struct lanai_dev *lanai) lanai 1078 drivers/atm/lanai.c u32 new = reg_read(lanai, Status_Reg); lanai 1079 drivers/atm/lanai.c u32 changes = new ^ lanai->status; lanai 1080 drivers/atm/lanai.c lanai->status = new; lanai 1083 drivers/atm/lanai.c status_message(lanai->number, name, new & flag) lanai 1096 drivers/atm/lanai.c static void pcistatus_check(struct lanai_dev *lanai, int clearonly) lanai 1100 drivers/atm/lanai.c result = pci_read_config_word(lanai->pci, PCI_STATUS, &s); lanai 1103 drivers/atm/lanai.c "%d\n", lanai->number, result); lanai 1111 drivers/atm/lanai.c result = pci_write_config_word(lanai->pci, PCI_STATUS, s); lanai 1114 drivers/atm/lanai.c "%d\n", lanai->number, result); lanai 1119 drivers/atm/lanai.c pcistatus_got(lanai->number, name); \ lanai 1120 drivers/atm/lanai.c ++lanai->stats.pcierr_##stat; \ lanai 1233 drivers/atm/lanai.c static inline void lanai_endtx(struct lanai_dev *lanai, lanai 1249 drivers/atm/lanai.c spin_lock(&lanai->endtxlock); lanai 1256 drivers/atm/lanai.c for (i = 0; reg_read(lanai, Status_Reg) & STATUS_BUTTBUSY; i++) { lanai 1259 drivers/atm/lanai.c "always busy!\n", lanai->number); lanai 1270 drivers/atm/lanai.c reg_write(lanai, (ptr << 12) | lvcc->vci, Butt_Reg); lanai 1271 drivers/atm/lanai.c spin_unlock(&lanai->endtxlock); lanai 1278 drivers/atm/lanai.c static void lanai_send_one_aal5(struct lanai_dev *lanai, lanai 1292 drivers/atm/lanai.c lanai_endtx(lanai, lvcc); lanai 1298 drivers/atm/lanai.c static void vcc_tx_unqueue_aal5(struct lanai_dev *lanai, lanai 1317 drivers/atm/lanai.c lanai_send_one_aal5(lanai, lvcc, skb, n); lanai 1322 drivers/atm/lanai.c __clear_bit(lvcc->vci, lanai->backlog_vccs); lanai 1327 drivers/atm/lanai.c static void vcc_tx_aal5(struct lanai_dev *lanai, struct lanai_vcc *lvcc, lanai 1338 drivers/atm/lanai.c __set_bit(lvcc->vci, lanai->backlog_vccs); lanai 1343 drivers/atm/lanai.c lanai_send_one_aal5(lanai, lvcc, skb, n); lanai 1346 drivers/atm/lanai.c static void vcc_tx_unqueue_aal0(struct lanai_dev *lanai, lanai 1353 drivers/atm/lanai.c static void vcc_tx_aal0(struct lanai_dev *lanai, struct lanai_vcc *lvcc, lanai 1423 drivers/atm/lanai.c static void vcc_rx_aal0(struct lanai_dev *lanai) lanai 1439 drivers/atm/lanai.c static int vcc_table_allocate(struct lanai_dev *lanai) lanai 1442 drivers/atm/lanai.c APRINTK((lanai->num_vci) * sizeof(struct lanai_vcc *) <= PAGE_SIZE, lanai 1444 drivers/atm/lanai.c lanai->vccs = (struct lanai_vcc **) get_zeroed_page(GFP_KERNEL); lanai 1445 drivers/atm/lanai.c return (lanai->vccs == NULL) ? -ENOMEM : 0; lanai 1447 drivers/atm/lanai.c int bytes = (lanai->num_vci) * sizeof(struct lanai_vcc *); lanai 1448 drivers/atm/lanai.c lanai->vccs = vzalloc(bytes); lanai 1449 drivers/atm/lanai.c if (unlikely(lanai->vccs == NULL)) lanai 1455 drivers/atm/lanai.c static inline void vcc_table_deallocate(const struct lanai_dev *lanai) lanai 1458 drivers/atm/lanai.c free_page((unsigned long) lanai->vccs); lanai 1460 drivers/atm/lanai.c vfree(lanai->vccs); lanai 1478 drivers/atm/lanai.c static int lanai_get_sized_buffer(struct lanai_dev *lanai, lanai 1487 drivers/atm/lanai.c lanai_buf_allocate(buf, size, max_sdu + 32, lanai->pci); lanai 1492 drivers/atm/lanai.c "for %s buffer, got only %zu\n", lanai->number, size, lanai 1499 drivers/atm/lanai.c static inline int lanai_setup_rx_vci_aal5(struct lanai_dev *lanai, lanai 1502 drivers/atm/lanai.c return lanai_get_sized_buffer(lanai, &lvcc->rx.buf, lanai 1507 drivers/atm/lanai.c static int lanai_setup_tx_vci(struct lanai_dev *lanai, struct lanai_vcc *lvcc, lanai 1520 drivers/atm/lanai.c return lanai_get_sized_buffer(lanai, &lvcc->tx.buf, max_sdu, lanai 1524 drivers/atm/lanai.c static inline void host_vcc_bind(struct lanai_dev *lanai, lanai 1531 drivers/atm/lanai.c if (lanai->nbound++ == 0) { lanai 1533 drivers/atm/lanai.c lanai->conf1 &= ~CONFIG1_POWERDOWN; lanai 1534 drivers/atm/lanai.c conf1_write(lanai); lanai 1535 drivers/atm/lanai.c conf2_write(lanai); lanai 1538 drivers/atm/lanai.c lvcc->vbase = cardvcc_addr(lanai, vci); lanai 1539 drivers/atm/lanai.c lanai->vccs[lvcc->vci = vci] = lvcc; lanai 1542 drivers/atm/lanai.c static inline void host_vcc_unbind(struct lanai_dev *lanai, lanai 1549 drivers/atm/lanai.c lanai->vccs[lvcc->vci] = NULL; lanai 1551 drivers/atm/lanai.c if (--lanai->nbound == 0) { lanai 1553 drivers/atm/lanai.c lanai->conf1 |= CONFIG1_POWERDOWN; lanai 1554 drivers/atm/lanai.c conf1_write(lanai); lanai 1561 drivers/atm/lanai.c static void lanai_reset(struct lanai_dev *lanai) lanai 1564 drivers/atm/lanai.c "implemented\n", lanai->number); lanai 1570 drivers/atm/lanai.c reg_write(lanai, INT_ALL, IntAck_Reg); lanai 1571 drivers/atm/lanai.c lanai->stats.card_reset++; lanai 1579 drivers/atm/lanai.c static int service_buffer_allocate(struct lanai_dev *lanai) lanai 1581 drivers/atm/lanai.c lanai_buf_allocate(&lanai->service, SERVICE_ENTRIES * 4, 8, lanai 1582 drivers/atm/lanai.c lanai->pci); lanai 1583 drivers/atm/lanai.c if (unlikely(lanai->service.start == NULL)) lanai 1586 drivers/atm/lanai.c lanai->service.start, lanai 1587 drivers/atm/lanai.c lanai_buf_size(&lanai->service), lanai 1588 drivers/atm/lanai.c lanai_buf_size_cardorder(&lanai->service)); lanai 1590 drivers/atm/lanai.c reg_write(lanai, 0, ServWrite_Reg); lanai 1592 drivers/atm/lanai.c reg_write(lanai, lanai 1593 drivers/atm/lanai.c SSTUFF_SET_SIZE(lanai_buf_size_cardorder(&lanai->service)) | lanai 1594 drivers/atm/lanai.c SSTUFF_SET_ADDR(lanai->service.dmaaddr), lanai 1599 drivers/atm/lanai.c static inline void service_buffer_deallocate(struct lanai_dev *lanai) lanai 1601 drivers/atm/lanai.c lanai_buf_deallocate(&lanai->service, lanai->pci); lanai 1617 drivers/atm/lanai.c static int handle_service(struct lanai_dev *lanai, u32 s) lanai 1622 drivers/atm/lanai.c lvcc = lanai->vccs[vci]; lanai 1626 drivers/atm/lanai.c "vcc %d\n", lanai->number, (unsigned int) s, vci); lanai 1628 drivers/atm/lanai.c lanai->stats.service_notx++; lanai 1630 drivers/atm/lanai.c lanai->stats.service_norx++; lanai 1637 drivers/atm/lanai.c "vcc %d\n", lanai->number, (unsigned int) s, vci); lanai 1638 drivers/atm/lanai.c lanai->stats.service_notx++; lanai 1641 drivers/atm/lanai.c __set_bit(vci, lanai->transmit_ready); lanai 1649 drivers/atm/lanai.c "vcc %d\n", lanai->number, (unsigned int) s, vci); lanai 1650 drivers/atm/lanai.c lanai->stats.service_norx++; lanai 1656 drivers/atm/lanai.c "vcc %d\n", lanai->number, (unsigned int) s, vci); lanai 1657 drivers/atm/lanai.c lanai->stats.service_rxnotaal5++; lanai 1677 drivers/atm/lanai.c lanai->stats.ovfl_trash += (bytes / 48); lanai 1685 drivers/atm/lanai.c "PDU on VCI %d!\n", lanai->number, vci); lanai 1686 drivers/atm/lanai.c lanai_reset(lanai); lanai 1699 drivers/atm/lanai.c static void iter_transmit(struct lanai_dev *lanai, vci_t vci) lanai 1701 drivers/atm/lanai.c struct lanai_vcc *lvcc = lanai->vccs[vci]; lanai 1703 drivers/atm/lanai.c lvcc->tx.unqueue(lanai, lvcc, lvcc->tx.endptr); lanai 1710 drivers/atm/lanai.c static void run_service(struct lanai_dev *lanai) lanai 1713 drivers/atm/lanai.c u32 wreg = reg_read(lanai, ServWrite_Reg); lanai 1714 drivers/atm/lanai.c const u32 *end = lanai->service.start + wreg; lanai 1715 drivers/atm/lanai.c while (lanai->service.ptr != end) { lanai 1716 drivers/atm/lanai.c ntx += handle_service(lanai, lanai 1717 drivers/atm/lanai.c le32_to_cpup(lanai->service.ptr++)); lanai 1718 drivers/atm/lanai.c if (lanai->service.ptr >= lanai->service.end) lanai 1719 drivers/atm/lanai.c lanai->service.ptr = lanai->service.start; lanai 1721 drivers/atm/lanai.c reg_write(lanai, wreg, ServRead_Reg); lanai 1724 drivers/atm/lanai.c vci_bitfield_iterate(lanai, lanai->transmit_ready, lanai 1726 drivers/atm/lanai.c bitmap_zero(lanai->transmit_ready, NUM_VCI); lanai 1733 drivers/atm/lanai.c static void get_statistics(struct lanai_dev *lanai) lanai 1735 drivers/atm/lanai.c u32 statreg = reg_read(lanai, Statistics_Reg); lanai 1736 drivers/atm/lanai.c lanai->stats.atm_ovfl += STATS_GET_FIFO_OVFL(statreg); lanai 1737 drivers/atm/lanai.c lanai->stats.hec_err += STATS_GET_HEC_ERR(statreg); lanai 1738 drivers/atm/lanai.c lanai->stats.vci_trash += STATS_GET_BAD_VCI(statreg); lanai 1739 drivers/atm/lanai.c lanai->stats.ovfl_trash += STATS_GET_BUF_OVFL(statreg); lanai 1746 drivers/atm/lanai.c static void iter_dequeue(struct lanai_dev *lanai, vci_t vci) lanai 1748 drivers/atm/lanai.c struct lanai_vcc *lvcc = lanai->vccs[vci]; lanai 1752 drivers/atm/lanai.c __clear_bit(vci, lanai->backlog_vccs); lanai 1756 drivers/atm/lanai.c lvcc->tx.unqueue(lanai, lvcc, endptr); lanai 1762 drivers/atm/lanai.c struct lanai_dev *lanai = from_timer(lanai, t, timer); lanai 1766 drivers/atm/lanai.c if (lanai->conf1 & CONFIG1_POWERDOWN) lanai 1771 drivers/atm/lanai.c if (spin_trylock(&lanai->servicelock)) { lanai 1772 drivers/atm/lanai.c run_service(lanai); lanai 1773 drivers/atm/lanai.c spin_unlock(&lanai->servicelock); lanai 1778 drivers/atm/lanai.c vci_bitfield_iterate(lanai, lanai->backlog_vccs, iter_dequeue); lanai 1782 drivers/atm/lanai.c get_statistics(lanai); lanai 1784 drivers/atm/lanai.c mod_timer(&lanai->timer, jiffies + LANAI_POLL_PERIOD); lanai 1787 drivers/atm/lanai.c static inline void lanai_timed_poll_start(struct lanai_dev *lanai) lanai 1789 drivers/atm/lanai.c timer_setup(&lanai->timer, lanai_timed_poll, 0); lanai 1790 drivers/atm/lanai.c lanai->timer.expires = jiffies + LANAI_POLL_PERIOD; lanai 1791 drivers/atm/lanai.c add_timer(&lanai->timer); lanai 1794 drivers/atm/lanai.c static inline void lanai_timed_poll_stop(struct lanai_dev *lanai) lanai 1796 drivers/atm/lanai.c del_timer_sync(&lanai->timer); lanai 1801 drivers/atm/lanai.c static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason) lanai 1806 drivers/atm/lanai.c spin_lock(&lanai->servicelock); lanai 1807 drivers/atm/lanai.c run_service(lanai); lanai 1808 drivers/atm/lanai.c spin_unlock(&lanai->servicelock); lanai 1812 drivers/atm/lanai.c vcc_rx_aal0(lanai); lanai 1819 drivers/atm/lanai.c get_statistics(lanai); lanai 1823 drivers/atm/lanai.c lanai_check_status(lanai); lanai 1828 drivers/atm/lanai.c lanai->number, (unsigned int) (reason & INT_DMASHUT), lanai 1829 drivers/atm/lanai.c (unsigned int) reg_read(lanai, DMA_Addr_Reg)); lanai 1831 drivers/atm/lanai.c lanai_reset(lanai); lanai 1836 drivers/atm/lanai.c lanai->number); lanai 1837 drivers/atm/lanai.c conf1_write(lanai); lanai 1838 drivers/atm/lanai.c lanai->stats.dma_reenable++; lanai 1839 drivers/atm/lanai.c pcistatus_check(lanai, 0); lanai 1844 drivers/atm/lanai.c lanai->number); lanai 1845 drivers/atm/lanai.c pcistatus_check(lanai, 0); lanai 1849 drivers/atm/lanai.c "segmentation shutdown, reason=0x%08X\n", lanai->number, lanai 1851 drivers/atm/lanai.c lanai_reset(lanai); lanai 1857 drivers/atm/lanai.c lanai->number, lanai 1859 drivers/atm/lanai.c lanai_reset(lanai); lanai 1871 drivers/atm/lanai.c reg_write(lanai, ack, IntAck_Reg); lanai 1876 drivers/atm/lanai.c struct lanai_dev *lanai = devid; lanai 1885 drivers/atm/lanai.c if (unlikely(lanai->conf1 & CONFIG1_POWERDOWN)) lanai 1889 drivers/atm/lanai.c reason = intr_pending(lanai); lanai 1896 drivers/atm/lanai.c lanai_int_1(lanai, reason); lanai 1897 drivers/atm/lanai.c reason = intr_pending(lanai); lanai 1931 drivers/atm/lanai.c static int lanai_pci_start(struct lanai_dev *lanai) lanai 1933 drivers/atm/lanai.c struct pci_dev *pci = lanai->pci; lanai 1938 drivers/atm/lanai.c "PCI device", lanai->number); lanai 1944 drivers/atm/lanai.c "(itf %d): No suitable DMA available.\n", lanai->number); lanai 1954 drivers/atm/lanai.c "PCI_LATENCY_TIMER: %d\n", lanai->number, result); lanai 1957 drivers/atm/lanai.c pcistatus_check(lanai, 1); lanai 1958 drivers/atm/lanai.c pcistatus_check(lanai, 0); lanai 1970 drivers/atm/lanai.c static inline int vci0_is_ok(struct lanai_dev *lanai, lanai 1976 drivers/atm/lanai.c if (lanai->naal0 != 0) lanai 1978 drivers/atm/lanai.c lanai->conf2 |= CONFIG2_VCI0_NORMAL; lanai 1979 drivers/atm/lanai.c conf2_write_if_powerup(lanai); lanai 1987 drivers/atm/lanai.c static int vci_is_ok(struct lanai_dev *lanai, vci_t vci, lanai 1991 drivers/atm/lanai.c const struct lanai_vcc *lvcc = lanai->vccs[vci]; lanai 1992 drivers/atm/lanai.c if (vci == 0 && !vci0_is_ok(lanai, qos)) lanai 2002 drivers/atm/lanai.c lanai->cbrvcc != NULL && lanai->cbrvcc != atmvcc) lanai 2005 drivers/atm/lanai.c if (qos->aal == ATM_AAL0 && lanai->naal0 == 0 && lanai 2007 drivers/atm/lanai.c const struct lanai_vcc *vci0 = lanai->vccs[0]; lanai 2010 drivers/atm/lanai.c lanai->conf2 &= ~CONFIG2_VCI0_NORMAL; lanai 2011 drivers/atm/lanai.c conf2_write_if_powerup(lanai); lanai 2016 drivers/atm/lanai.c static int lanai_normalize_ci(struct lanai_dev *lanai, lanai 2030 drivers/atm/lanai.c for (*vcip = ATM_NOT_RSV_VCI; *vcip < lanai->num_vci; lanai 2032 drivers/atm/lanai.c if (vci_is_ok(lanai, *vcip, atmvcc)) lanai 2036 drivers/atm/lanai.c if (*vcip >= lanai->num_vci || *vcip < 0 || lanai 2037 drivers/atm/lanai.c !vci_is_ok(lanai, *vcip, atmvcc)) lanai 2090 drivers/atm/lanai.c static inline void lanai_cbr_setup(struct lanai_dev *lanai) lanai 2092 drivers/atm/lanai.c reg_write(lanai, pcr_to_cbricg(&lanai->cbrvcc->qos), CBR_ICG_Reg); lanai 2093 drivers/atm/lanai.c reg_write(lanai, lanai->cbrvcc->vci, CBR_PTR_Reg); lanai 2094 drivers/atm/lanai.c lanai->conf2 |= CONFIG2_CBR_ENABLE; lanai 2095 drivers/atm/lanai.c conf2_write(lanai); lanai 2098 drivers/atm/lanai.c static inline void lanai_cbr_shutdown(struct lanai_dev *lanai) lanai 2100 drivers/atm/lanai.c lanai->conf2 &= ~CONFIG2_CBR_ENABLE; lanai 2101 drivers/atm/lanai.c conf2_write(lanai); lanai 2109 drivers/atm/lanai.c struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; lanai 2115 drivers/atm/lanai.c lanai->number = atmdev->number; lanai 2116 drivers/atm/lanai.c lanai->num_vci = NUM_VCI; lanai 2117 drivers/atm/lanai.c bitmap_zero(lanai->backlog_vccs, NUM_VCI); lanai 2118 drivers/atm/lanai.c bitmap_zero(lanai->transmit_ready, NUM_VCI); lanai 2119 drivers/atm/lanai.c lanai->naal0 = 0; lanai 2121 drivers/atm/lanai.c lanai->nbound = 0; lanai 2123 drivers/atm/lanai.c lanai->cbrvcc = NULL; lanai 2124 drivers/atm/lanai.c memset(&lanai->stats, 0, sizeof lanai->stats); lanai 2125 drivers/atm/lanai.c spin_lock_init(&lanai->endtxlock); lanai 2126 drivers/atm/lanai.c spin_lock_init(&lanai->servicelock); lanai 2129 drivers/atm/lanai.c while (1 << atmdev->ci_range.vci_bits < lanai->num_vci) lanai 2134 drivers/atm/lanai.c if ((result = lanai_pci_start(lanai)) != 0) lanai 2136 drivers/atm/lanai.c raw_base = lanai->pci->resource[0].start; lanai 2137 drivers/atm/lanai.c lanai->base = (bus_addr_t) ioremap(raw_base, LANAI_MAPPING_SIZE); lanai 2138 drivers/atm/lanai.c if (lanai->base == NULL) { lanai 2144 drivers/atm/lanai.c reset_board(lanai); lanai 2145 drivers/atm/lanai.c lanai->conf1 = reg_read(lanai, Config1_Reg); lanai 2146 drivers/atm/lanai.c lanai->conf1 &= ~(CONFIG1_GPOUT1 | CONFIG1_POWERDOWN | lanai 2148 drivers/atm/lanai.c lanai->conf1 |= CONFIG1_SET_LEDMODE(LEDMODE_NOT_SOOL); lanai 2149 drivers/atm/lanai.c reg_write(lanai, lanai->conf1 | CONFIG1_GPOUT1, Config1_Reg); lanai 2151 drivers/atm/lanai.c conf1_write(lanai); lanai 2163 drivers/atm/lanai.c reg_read(lanai, Reset_Reg), &lanai->board_rev); lanai 2168 drivers/atm/lanai.c if ((result = eeprom_read(lanai)) != 0) lanai 2170 drivers/atm/lanai.c if ((result = eeprom_validate(lanai)) != 0) lanai 2174 drivers/atm/lanai.c reg_write(lanai, lanai->conf1 | CONFIG1_GPOUT1, Config1_Reg); lanai 2176 drivers/atm/lanai.c conf1_write(lanai); lanai 2178 drivers/atm/lanai.c lanai->conf1 |= (CONFIG1_GPOUT2 | CONFIG1_GPOUT3 | CONFIG1_DMA_ENABLE); lanai 2179 drivers/atm/lanai.c conf1_write(lanai); lanai 2182 drivers/atm/lanai.c if ((result = sram_test_and_clear(lanai)) != 0) lanai 2186 drivers/atm/lanai.c lanai->conf1 |= CONFIG1_DMA_ENABLE; lanai 2187 drivers/atm/lanai.c conf1_write(lanai); lanai 2188 drivers/atm/lanai.c if ((result = service_buffer_allocate(lanai)) != 0) lanai 2190 drivers/atm/lanai.c if ((result = vcc_table_allocate(lanai)) != 0) lanai 2192 drivers/atm/lanai.c lanai->conf2 = (lanai->num_vci >= 512 ? CONFIG2_HOWMANY : 0) | lanai 2194 drivers/atm/lanai.c conf2_write(lanai); lanai 2195 drivers/atm/lanai.c reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg); lanai 2196 drivers/atm/lanai.c reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */ lanai 2197 drivers/atm/lanai.c if ((result = request_irq(lanai->pci->irq, lanai_int, IRQF_SHARED, lanai 2198 drivers/atm/lanai.c DEV_LABEL, lanai)) != 0) { lanai 2203 drivers/atm/lanai.c intr_enable(lanai, INT_ALL & ~(INT_PING | INT_WAKE)); lanai 2205 drivers/atm/lanai.c lanai->conf1 = (lanai->conf1 & ~CONFIG1_MASK_LOOPMODE) | lanai 2208 drivers/atm/lanai.c conf1_write(lanai); lanai 2209 drivers/atm/lanai.c lanai->status = reg_read(lanai, Status_Reg); lanai 2212 drivers/atm/lanai.c lanai->conf1 |= CONFIG1_POWERDOWN; lanai 2213 drivers/atm/lanai.c conf1_write(lanai); lanai 2215 drivers/atm/lanai.c memcpy(atmdev->esi, eeprom_mac(lanai), ESI_LEN); lanai 2216 drivers/atm/lanai.c lanai_timed_poll_start(lanai); lanai 2218 drivers/atm/lanai.c "(%pMF)\n", lanai->number, (int) lanai->pci->revision, lanai 2219 drivers/atm/lanai.c lanai->base, lanai->pci->irq, atmdev->esi); lanai 2221 drivers/atm/lanai.c "board_rev=%d\n", lanai->number, lanai 2222 drivers/atm/lanai.c lanai->type==lanai2 ? "2" : "HB", (unsigned int) lanai->serialno, lanai 2223 drivers/atm/lanai.c (unsigned int) lanai->serialno, lanai->board_rev); lanai 2227 drivers/atm/lanai.c vcc_table_deallocate(lanai); lanai 2229 drivers/atm/lanai.c service_buffer_deallocate(lanai); lanai 2231 drivers/atm/lanai.c reset_board(lanai); lanai 2233 drivers/atm/lanai.c lanai->conf1 = reg_read(lanai, Config1_Reg) | CONFIG1_POWERDOWN; lanai 2234 drivers/atm/lanai.c conf1_write(lanai); lanai 2236 drivers/atm/lanai.c iounmap(lanai->base); lanai 2238 drivers/atm/lanai.c pci_disable_device(lanai->pci); lanai 2248 drivers/atm/lanai.c struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; lanai 2250 drivers/atm/lanai.c lanai->number); lanai 2251 drivers/atm/lanai.c lanai_timed_poll_stop(lanai); lanai 2253 drivers/atm/lanai.c lanai->conf1 = reg_read(lanai, Config1_Reg) & ~CONFIG1_POWERDOWN; lanai 2254 drivers/atm/lanai.c conf1_write(lanai); lanai 2256 drivers/atm/lanai.c intr_disable(lanai, INT_ALL); lanai 2257 drivers/atm/lanai.c free_irq(lanai->pci->irq, lanai); lanai 2258 drivers/atm/lanai.c reset_board(lanai); lanai 2260 drivers/atm/lanai.c lanai->conf1 |= CONFIG1_POWERDOWN; lanai 2261 drivers/atm/lanai.c conf1_write(lanai); lanai 2263 drivers/atm/lanai.c pci_disable_device(lanai->pci); lanai 2264 drivers/atm/lanai.c vcc_table_deallocate(lanai); lanai 2265 drivers/atm/lanai.c service_buffer_deallocate(lanai); lanai 2266 drivers/atm/lanai.c iounmap(lanai->base); lanai 2267 drivers/atm/lanai.c kfree(lanai); lanai 2274 drivers/atm/lanai.c struct lanai_dev *lanai = (struct lanai_dev *) atmvcc->dev->dev_data; lanai 2282 drivers/atm/lanai.c if (--lanai->naal0 <= 0) lanai 2283 drivers/atm/lanai.c aal0_buffer_free(lanai); lanai 2285 drivers/atm/lanai.c lanai_buf_deallocate(&lvcc->rx.buf, lanai->pci); lanai 2289 drivers/atm/lanai.c if (atmvcc == lanai->cbrvcc) { lanai 2291 drivers/atm/lanai.c lanai_cbr_shutdown(lanai); lanai 2292 drivers/atm/lanai.c lanai->cbrvcc = NULL; lanai 2294 drivers/atm/lanai.c lanai_shutdown_tx_vci(lanai, lvcc); lanai 2295 drivers/atm/lanai.c lanai_buf_deallocate(&lvcc->tx.buf, lanai->pci); lanai 2299 drivers/atm/lanai.c host_vcc_unbind(lanai, lvcc); lanai 2309 drivers/atm/lanai.c struct lanai_dev *lanai; lanai 2318 drivers/atm/lanai.c lanai = (struct lanai_dev *) atmvcc->dev->dev_data; lanai 2319 drivers/atm/lanai.c result = lanai_normalize_ci(lanai, atmvcc, &vpi, &vci); lanai 2325 drivers/atm/lanai.c DPRINTK(DEV_LABEL "(itf %d): open %d.%d\n", lanai->number, lanai 2327 drivers/atm/lanai.c lvcc = lanai->vccs[vci]; lanai 2339 drivers/atm/lanai.c if (lanai->naal0 == 0) lanai 2340 drivers/atm/lanai.c result = aal0_buffer_allocate(lanai); lanai 2343 drivers/atm/lanai.c lanai, lvcc, &atmvcc->qos); lanai 2353 drivers/atm/lanai.c lanai->naal0++; lanai 2358 drivers/atm/lanai.c result = lanai_setup_tx_vci(lanai, lvcc, &atmvcc->qos); lanai 2363 drivers/atm/lanai.c APRINTK(lanai->cbrvcc == NULL, lanai 2365 drivers/atm/lanai.c lanai->cbrvcc = atmvcc; lanai 2368 drivers/atm/lanai.c host_vcc_bind(lanai, lvcc, vci); lanai 2378 drivers/atm/lanai.c if (lanai->cbrvcc == atmvcc) lanai 2379 drivers/atm/lanai.c lanai_cbr_setup(lanai); lanai 2392 drivers/atm/lanai.c struct lanai_dev *lanai = (struct lanai_dev *) atmvcc->dev->dev_data; lanai 2402 drivers/atm/lanai.c if (unlikely(lanai == NULL)) { lanai 2411 drivers/atm/lanai.c vcc_tx_aal5(lanai, lvcc, skb); lanai 2420 drivers/atm/lanai.c vcc_tx_aal0(lanai, lvcc, skb); lanai 2442 drivers/atm/lanai.c struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; lanai 2448 drivers/atm/lanai.c atmdev->number, lanai->type==lanai2 ? "2" : "HB", lanai 2449 drivers/atm/lanai.c (unsigned int) lanai->serialno, lanai 2450 drivers/atm/lanai.c (unsigned int) lanai->magicno, lanai->num_vci); lanai 2453 drivers/atm/lanai.c lanai->board_rev, (int) lanai->pci->revision); lanai 2456 drivers/atm/lanai.c &lanai->eeprom[EEPROM_MAC]); lanai 2459 drivers/atm/lanai.c "GPIN=%d\n", (lanai->status & STATUS_SOOL) ? 1 : 0, lanai 2460 drivers/atm/lanai.c (lanai->status & STATUS_LOCD) ? 1 : 0, lanai 2461 drivers/atm/lanai.c (lanai->status & STATUS_LED) ? 1 : 0, lanai 2462 drivers/atm/lanai.c (lanai->status & STATUS_GPIN) ? 1 : 0); lanai 2465 drivers/atm/lanai.c "aal0_rx=%zu\n", lanai_buf_size(&lanai->service), lanai 2466 drivers/atm/lanai.c lanai->naal0 ? lanai_buf_size(&lanai->aal0buf) : 0); lanai 2468 drivers/atm/lanai.c get_statistics(lanai); lanai 2471 drivers/atm/lanai.c lanai->stats.ovfl_trash, lanai->stats.vci_trash, lanai 2472 drivers/atm/lanai.c lanai->stats.hec_err, lanai->stats.atm_ovfl); lanai 2477 drivers/atm/lanai.c lanai->stats.pcierr_parity_detect, lanai 2478 drivers/atm/lanai.c lanai->stats.pcierr_serr_set, lanai 2479 drivers/atm/lanai.c lanai->stats.pcierr_m_target_abort); lanai 2482 drivers/atm/lanai.c "master_parity=%u\n", lanai->stats.pcierr_s_target_abort, lanai 2483 drivers/atm/lanai.c lanai->stats.pcierr_master_parity); lanai 2486 drivers/atm/lanai.c "no_rx=%u, bad_rx_aal=%u\n", lanai->stats.service_norx, lanai 2487 drivers/atm/lanai.c lanai->stats.service_notx, lanai 2488 drivers/atm/lanai.c lanai->stats.service_rxnotaal5); lanai 2491 drivers/atm/lanai.c lanai->stats.dma_reenable, lanai->stats.card_reset); lanai 2499 drivers/atm/lanai.c if ((lvcc = lanai->vccs[left]) != NULL) lanai 2524 drivers/atm/lanai.c lvcc->tx.atmvcc == lanai->cbrvcc ? 'C' : 'U', lanai 2554 drivers/atm/lanai.c struct lanai_dev *lanai; lanai 2558 drivers/atm/lanai.c lanai = kmalloc(sizeof(*lanai), GFP_KERNEL); lanai 2559 drivers/atm/lanai.c if (lanai == NULL) { lanai 2569 drivers/atm/lanai.c kfree(lanai); lanai 2573 drivers/atm/lanai.c atmdev->dev_data = lanai; lanai 2574 drivers/atm/lanai.c lanai->pci = pci; lanai 2575 drivers/atm/lanai.c lanai->type = (enum lanai_type) ident->device; lanai 2581 drivers/atm/lanai.c kfree(lanai); lanai 125 drivers/net/ethernet/myricom/myri10ge/myri10ge.c struct mcp_kreq_ether_recv __iomem *lanai; /* lanai ptr for recv ring */ lanai 139 drivers/net/ethernet/myricom/myri10ge/myri10ge.c struct mcp_kreq_ether_send __iomem *lanai; /* lanai ptr for sendq */ lanai 1258 drivers/net/ethernet/myricom/myri10ge/myri10ge.c myri10ge_submit_8rx(&rx->lanai[idx - 7], lanai 2246 drivers/net/ethernet/myricom/myri10ge/myri10ge.c ss->tx.lanai = (struct mcp_kreq_ether_send __iomem *) lanai 2252 drivers/net/ethernet/myricom/myri10ge/myri10ge.c ss->rx_small.lanai = (struct mcp_kreq_ether_recv __iomem *) lanai 2257 drivers/net/ethernet/myricom/myri10ge/myri10ge.c ss->rx_big.lanai = (struct mcp_kreq_ether_recv __iomem *) lanai 2530 drivers/net/ethernet/myricom/myri10ge/myri10ge.c myri10ge_pio_copy(&tx->lanai[idx], &src[cnt], sizeof(*src)); lanai 2556 drivers/net/ethernet/myricom/myri10ge/myri10ge.c dst = dstp = &tx->lanai[idx];