Lines Matching refs:IoAdapter

24 extern void prepare_maestra_functions(PISDN_ADAPTER IoAdapter);
41 static int diva_bri_reset_adapter(PISDN_ADAPTER IoAdapter);
42 static int diva_bri_write_sdram_block(PISDN_ADAPTER IoAdapter,
45 static int diva_bri_start_adapter(PISDN_ADAPTER IoAdapter,
325 void diva_os_prepare_maestra_functions(PISDN_ADAPTER IoAdapter) in diva_os_prepare_maestra_functions() argument
516 static int diva_bri_reset_adapter(PISDN_ADAPTER IoAdapter) in diva_bri_reset_adapter() argument
522 if (!IoAdapter->port) { in diva_bri_reset_adapter()
525 if (IoAdapter->Initialized) { in diva_bri_reset_adapter()
527 IoAdapter->ANum)) return (-1); in diva_bri_reset_adapter()
529 (*(IoAdapter->rstFnc)) (IoAdapter); in diva_bri_reset_adapter()
531 Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter); in diva_bri_reset_adapter()
533 ((IoAdapter->Properties.Bus == BUS_PCI) ? M_PCI_ADDRH : ADDRH); in diva_bri_reset_adapter()
547 (IoAdapter->MemoryBase + IoAdapter->MemorySize - in diva_bri_reset_adapter()
558 (IoAdapter->MemoryBase + IoAdapter->MemorySize - in diva_bri_reset_adapter()
568 DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port); in diva_bri_reset_adapter()
573 IoAdapter->e_count = 0; in diva_bri_reset_adapter()
574 if (IoAdapter->e_tbl) { in diva_bri_reset_adapter()
575 memset(IoAdapter->e_tbl, 0x00, in diva_bri_reset_adapter()
576 IoAdapter->e_max * sizeof(E_INFO)); in diva_bri_reset_adapter()
578 IoAdapter->head = 0; in diva_bri_reset_adapter()
579 IoAdapter->tail = 0; in diva_bri_reset_adapter()
580 IoAdapter->assign = 0; in diva_bri_reset_adapter()
581 IoAdapter->trapped = 0; in diva_bri_reset_adapter()
583 memset(&IoAdapter->a.IdTable[0], 0x00, in diva_bri_reset_adapter()
584 sizeof(IoAdapter->a.IdTable)); in diva_bri_reset_adapter()
585 memset(&IoAdapter->a.IdTypeTable[0], 0x00, in diva_bri_reset_adapter()
586 sizeof(IoAdapter->a.IdTypeTable)); in diva_bri_reset_adapter()
587 memset(&IoAdapter->a.FlowControlIdTable[0], 0x00, in diva_bri_reset_adapter()
588 sizeof(IoAdapter->a.FlowControlIdTable)); in diva_bri_reset_adapter()
589 memset(&IoAdapter->a.FlowControlSkipTable[0], 0x00, in diva_bri_reset_adapter()
590 sizeof(IoAdapter->a.FlowControlSkipTable)); in diva_bri_reset_adapter()
591 memset(&IoAdapter->a.misc_flags_table[0], 0x00, in diva_bri_reset_adapter()
592 sizeof(IoAdapter->a.misc_flags_table)); in diva_bri_reset_adapter()
593 memset(&IoAdapter->a.rx_stream[0], 0x00, in diva_bri_reset_adapter()
594 sizeof(IoAdapter->a.rx_stream)); in diva_bri_reset_adapter()
595 memset(&IoAdapter->a.tx_stream[0], 0x00, in diva_bri_reset_adapter()
596 sizeof(IoAdapter->a.tx_stream)); in diva_bri_reset_adapter()
597 memset(&IoAdapter->a.tx_pos[0], 0x00, sizeof(IoAdapter->a.tx_pos)); in diva_bri_reset_adapter()
598 memset(&IoAdapter->a.rx_pos[0], 0x00, sizeof(IoAdapter->a.rx_pos)); in diva_bri_reset_adapter()
604 diva_bri_write_sdram_block(PISDN_ADAPTER IoAdapter, in diva_bri_write_sdram_block() argument
610 if (!IoAdapter->port) { in diva_bri_write_sdram_block()
614 Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter); in diva_bri_write_sdram_block()
616 ((IoAdapter->Properties.Bus == BUS_PCI) ? M_PCI_ADDRH : ADDRH); in diva_bri_write_sdram_block()
627 DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port); in diva_bri_write_sdram_block()
632 diva_bri_start_adapter(PISDN_ADAPTER IoAdapter, in diva_bri_start_adapter() argument
639 ADAPTER *a = &IoAdapter->a; in diva_bri_start_adapter()
641 if (IoAdapter->Initialized) { in diva_bri_start_adapter()
644 IoAdapter->ANum)) return (-1); in diva_bri_start_adapter()
646 if (!IoAdapter->port) { in diva_bri_start_adapter()
648 IoAdapter->ANum)) return (-1); in diva_bri_start_adapter()
651 sprintf(IoAdapter->Name, "A(%d)", (int) IoAdapter->ANum); in diva_bri_start_adapter()
652 DBG_LOG(("A(%d) start BRI", IoAdapter->ANum)) in diva_bri_start_adapter()
654 Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter); in diva_bri_start_adapter()
656 ((IoAdapter->Properties.Bus == BUS_PCI) ? M_PCI_ADDRH : ADDRH); in diva_bri_start_adapter()
662 (IoAdapter->MemoryBase + IoAdapter->MemorySize - in diva_bri_start_adapter()
666 DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port); in diva_bri_start_adapter()
671 Port = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); in diva_bri_start_adapter()
673 DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, Port); in diva_bri_start_adapter()
675 Port = DIVA_OS_MEM_ATTACH_PORT(IoAdapter); in diva_bri_start_adapter()
677 ((IoAdapter->Properties.Bus == BUS_PCI) ? M_PCI_ADDRH : ADDRH); in diva_bri_start_adapter()
687 (IoAdapter->MemoryBase + in diva_bri_start_adapter()
688 IoAdapter->MemorySize - in diva_bri_start_adapter()
700 DIVA_OS_MEM_DETACH_PORT(IoAdapter, Port); in diva_bri_start_adapter()
704 IoAdapter->ANum, IoAdapter->Properties.Name, in diva_bri_start_adapter()
706 (*(IoAdapter->trapFnc)) (IoAdapter); in diva_bri_start_adapter()
710 IoAdapter->Initialized = 1; in diva_bri_start_adapter()
715 IoAdapter->IrqCount = 0; in diva_bri_start_adapter()
718 if (IoAdapter->reset) { in diva_bri_start_adapter()
719 Port = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); in diva_bri_start_adapter()
721 DIVA_OS_MEM_DETACH_RESET(IoAdapter, Port); in diva_bri_start_adapter()
725 for (i = 0; ((!IoAdapter->IrqCount) && (i < 100)); i++) { in diva_bri_start_adapter()
728 if (!IoAdapter->IrqCount) { in diva_bri_start_adapter()
731 IoAdapter->ANum)) in diva_bri_start_adapter()
732 IoAdapter->Initialized = 0; in diva_bri_start_adapter()
733 IoAdapter->stop(IoAdapter); in diva_bri_start_adapter()
737 IoAdapter->Properties.Features = (word) features; in diva_bri_start_adapter()
738 diva_xdi_display_adapter_features(IoAdapter->ANum); in diva_bri_start_adapter()
739 DBG_LOG(("A(%d) BRI adapter successfully started", IoAdapter->ANum)) in diva_bri_start_adapter()
743 diva_xdi_didd_register_adapter(IoAdapter->ANum); in diva_bri_start_adapter()
750 PISDN_ADAPTER IoAdapter = &a->xdi_adapter; in diva_bri_clear_interrupts() local
755 IoAdapter->disIrq(IoAdapter); in diva_bri_clear_interrupts()
757 IoAdapter->tst_irq(&IoAdapter->a); in diva_bri_clear_interrupts()
758 IoAdapter->clr_irq(&IoAdapter->a); in diva_bri_clear_interrupts()
759 IoAdapter->tst_irq(&IoAdapter->a); in diva_bri_clear_interrupts()
764 diva_os_cancel_soft_isr(&IoAdapter->req_soft_isr); in diva_bri_clear_interrupts()
765 diva_os_cancel_soft_isr(&IoAdapter->isr_soft_isr); in diva_bri_clear_interrupts()
773 PISDN_ADAPTER IoAdapter = &a->xdi_adapter; in diva_bri_stop_adapter() local
776 if (!IoAdapter->port) { in diva_bri_stop_adapter()
779 if (!IoAdapter->Initialized) { in diva_bri_stop_adapter()
781 IoAdapter->ANum)) in diva_bri_stop_adapter()
784 IoAdapter->Initialized = 0; in diva_bri_stop_adapter()
789 diva_xdi_didd_remove_adapter(IoAdapter->ANum); in diva_bri_stop_adapter()
795 IoAdapter->a.ReadyInt = 1; in diva_bri_stop_adapter()
796 IoAdapter->a.ram_inc(&IoAdapter->a, &PR_RAM->ReadyInt); in diva_bri_stop_adapter()
804 IoAdapter->ANum)) in diva_bri_stop_adapter()
806 IoAdapter->a.ReadyInt = 0; in diva_bri_stop_adapter()
811 IoAdapter->stop(IoAdapter); in diva_bri_stop_adapter()