Lines Matching refs:IoAdapter

87 dump_xlog_buffer(PISDN_ADAPTER IoAdapter, Xdesc *xlogDesc)  in dump_xlog_buffer()  argument
94 &IoAdapter->Name[0], (int)logCnt)) in dump_xlog_buffer()
95 DBG_FTL(("Microcode: %s", &IoAdapter->ProtocolIdString[0])) in dump_xlog_buffer()
118 &IoAdapter->Name[0])) in dump_xlog_buffer()
159 dump_trap_frame(PISDN_ADAPTER IoAdapter, byte __iomem *exceptionFrame) in dump_trap_frame() argument
165 &IoAdapter->Name[0])) in dump_trap_frame()
166 DBG_FTL(("Microcode: %s", &IoAdapter->ProtocolIdString[0])) in dump_trap_frame()
203 void request(PISDN_ADAPTER IoAdapter, ENTITY *e) in request() argument
220 if (!IoAdapter->dma_map) { in request()
225 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "dma_op"); in request()
228 (struct _diva_dma_map_entry *)IoAdapter->dma_map); in request()
233 (struct _diva_dma_map_entry *)IoAdapter->dma_map, in request()
244 diva_free_dma_map_entry((struct _diva_dma_map_entry *)IoAdapter->dma_map, in request()
252 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "dma_op"); in request()
258 pI->logical_adapter_number = IoAdapter->ANum; in request()
259 pI->controller = IoAdapter->ControllerNumber; in request()
260 pI->total_controllers = IoAdapter->Properties.Adapters; in request()
267 prms.flag_dynamic_l1_down = (IoAdapter->capi_cfg.cfg_1 & \ in request()
269 prms.group_optimization_enabled = (IoAdapter->capi_cfg.cfg_1 & \ in request()
274 syncReq->xdi_sdram_bar.info.bar = IoAdapter->sdram_bar; in request()
295 if (IoAdapter) { in request()
296 diva_xdi_provide_istream_info(&IoAdapter->a, in request()
303 if (IoAdapter) in request()
305 strcpy(&syncReq->GetName.name[0], IoAdapter->Name); in request()
307 IoAdapter->ANum, IoAdapter->Name)) in request()
313 if (IoAdapter) in request()
315 syncReq->GetSerial.serial = IoAdapter->serialNo; in request()
317 IoAdapter->ANum, IoAdapter->serialNo)) in request()
323 if (IoAdapter) in request()
325 syncReq->GetCardType.cardtype = IoAdapter->cardType; in request()
327 IoAdapter->ANum, IoAdapter->cardType)) in request()
333 if (IoAdapter) in request()
335 pcm_req(IoAdapter, e); in request()
341 if (IoAdapter) in request()
343 pcm_req(IoAdapter, e); in request()
349 if (IoAdapter) in request()
352 (unsigned short)IoAdapter->features; in request()
358 if (IoAdapter) in request()
365 if (IoAdapter) in request()
371 if (!IoAdapter) in request()
376 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req"); in request()
382 if (IoAdapter->e_count >= IoAdapter->e_max) in request()
385 IoAdapter->e_max)) in request()
386 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req"); in request()
392 for (i = 1; IoAdapter->e_tbl[i].e; ++i); in request()
393 IoAdapter->e_tbl[i].e = e; in request()
394 IoAdapter->e_count++; in request()
409 if (!IoAdapter->trapped && IoAdapter->trapFnc) in request()
411 IoAdapter->trapFnc(IoAdapter); in request()
415 if (IoAdapter->trapped && IoAdapter->os_trap_nfy_Fnc) { in request()
416 (*(IoAdapter->os_trap_nfy_Fnc))(IoAdapter, IoAdapter->ANum); in request()
419 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req"); in request()
432 IoAdapter->e_tbl[i].next = 0; in request()
433 if (IoAdapter->head) in request()
435 IoAdapter->e_tbl[IoAdapter->tail].next = i; in request()
436 IoAdapter->tail = i; in request()
440 IoAdapter->head = i; in request()
441 IoAdapter->tail = i; in request()
446 diva_os_schedule_soft_isr(&IoAdapter->req_soft_isr); in request()
447 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req"); in request()
453 PISDN_ADAPTER IoAdapter = (PISDN_ADAPTER)Context; in DIDpcRoutine() local
454 ADAPTER *a = &IoAdapter->a; in DIDpcRoutine()
455 diva_os_atomic_t *pin_dpc = &IoAdapter->in_dpc; in DIDpcRoutine()
458 if (IoAdapter->tst_irq(a)) in DIDpcRoutine()
460 if (!IoAdapter->Unavailable) in DIDpcRoutine()
461 IoAdapter->dpc(a); in DIDpcRoutine()
462 IoAdapter->clr_irq(a); in DIDpcRoutine()
464 IoAdapter->out(a); in DIDpcRoutine()
469 if (IoAdapter->pcm_pending) { in DIDpcRoutine()
472 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in DIDpcRoutine()
475 pcm = (struct pc_maint *)IoAdapter->pcm_data; in DIDpcRoutine()
476 switch (IoAdapter->pcm_pending) { in DIDpcRoutine()
478 a->ram_out(a, &IoAdapter->pcm->rc, 0); in DIDpcRoutine()
479 a->ram_out(a, &IoAdapter->pcm->req, pcm->req); in DIDpcRoutine()
480 IoAdapter->pcm_pending = 2; in DIDpcRoutine()
483 if ((int)(a->ram_in(a, &IoAdapter->pcm->rc))) { in DIDpcRoutine()
484 a->ram_in_buffer(a, IoAdapter->pcm, pcm, sizeof(*pcm)); in DIDpcRoutine()
485 IoAdapter->pcm_pending = 3; in DIDpcRoutine()
491 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in DIDpcRoutine()
502 pcm_req(PISDN_ADAPTER IoAdapter, ENTITY *e) in pcm_req() argument
506 ADAPTER *a = &IoAdapter->a; in pcm_req()
512 if (IoAdapter->Properties.Card == CARD_MAE) in pcm_req()
514 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
517 IoAdapter->pcm_data = (void *)pcm; in pcm_req()
518 IoAdapter->pcm_pending = 1; in pcm_req()
519 diva_os_schedule_soft_isr(&IoAdapter->req_soft_isr); in pcm_req()
520 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
523 for (rc = 0, i = (IoAdapter->trapped ? 3000 : 250); !rc && (i > 0); --i) in pcm_req()
526 if (IoAdapter->pcm_pending == 3) { in pcm_req()
527 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
530 IoAdapter->pcm_pending = 0; in pcm_req()
531 IoAdapter->pcm_data = NULL; in pcm_req()
532 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
537 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
540 diva_os_schedule_soft_isr(&IoAdapter->req_soft_isr); in pcm_req()
541 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
545 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
548 IoAdapter->pcm_pending = 0; in pcm_req()
549 IoAdapter->pcm_data = NULL; in pcm_req()
550 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in pcm_req()
559 a->ram_out(a, &IoAdapter->pcm->rc, 0); in pcm_req()
560 a->ram_out(a, &IoAdapter->pcm->req, pcm->req); in pcm_req()
561 for (i = (IoAdapter->trapped ? 3000 : 250); --i > 0;) in pcm_req()
564 rc = (int)(a->ram_in(a, &IoAdapter->pcm->rc)); in pcm_req()
567 a->ram_in_buffer(a, IoAdapter->pcm, pcm, sizeof(*pcm)); in pcm_req()
572 if (IoAdapter->trapFnc) in pcm_req()
574 int trapped = IoAdapter->trapped; in pcm_req()
575 IoAdapter->trapFnc(IoAdapter); in pcm_req()
579 if (!trapped && IoAdapter->trapped && IoAdapter->os_trap_nfy_Fnc) { in pcm_req()
580 (*(IoAdapter->os_trap_nfy_Fnc))(IoAdapter, IoAdapter->ANum); in pcm_req()
620 PISDN_ADAPTER IoAdapter = (PISDN_ADAPTER)a->io; in mem_look_ahead() local
621 IoAdapter->RBuffer.length = mem_inw(a, &RBuffer->length); in mem_look_ahead()
622 mem_in_buffer(a, RBuffer->P, IoAdapter->RBuffer.P, in mem_look_ahead()
623 IoAdapter->RBuffer.length); in mem_look_ahead()
624 e->RBuffer = (DBUFFER *)&IoAdapter->RBuffer; in mem_look_ahead()
758 PISDN_ADAPTER IoAdapter; in free_entity() local
760 IoAdapter = (PISDN_ADAPTER) a->io; in free_entity()
761 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_free"); in free_entity()
762 IoAdapter->e_tbl[e_no].e = NULL; in free_entity()
763 IoAdapter->e_count--; in free_entity()
764 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_free"); in free_entity()
768 PISDN_ADAPTER IoAdapter; in assign_queue() local
770 IoAdapter = (PISDN_ADAPTER) a->io; in assign_queue()
771 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_assign"); in assign_queue()
772 IoAdapter->e_tbl[e_no].assign_ref = ref; in assign_queue()
773 IoAdapter->e_tbl[e_no].next = (byte)IoAdapter->assign; in assign_queue()
774 IoAdapter->assign = e_no; in assign_queue()
775 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_assign"); in assign_queue()
779 PISDN_ADAPTER IoAdapter; in get_assign() local
782 IoAdapter = (PISDN_ADAPTER) a->io; in get_assign()
783 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, in get_assign()
786 for (e_no = (byte)IoAdapter->assign; in get_assign()
787 e_no && IoAdapter->e_tbl[e_no].assign_ref != ref; in get_assign()
788 e_no = IoAdapter->e_tbl[e_no].next); in get_assign()
789 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, in get_assign()
796 PISDN_ADAPTER IoAdapter; in req_queue() local
798 IoAdapter = (PISDN_ADAPTER) a->io; in req_queue()
799 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req_q"); in req_queue()
800 IoAdapter->e_tbl[e_no].next = 0; in req_queue()
801 if (IoAdapter->head) { in req_queue()
802 IoAdapter->e_tbl[IoAdapter->tail].next = e_no; in req_queue()
803 IoAdapter->tail = e_no; in req_queue()
806 IoAdapter->head = e_no; in req_queue()
807 IoAdapter->tail = e_no; in req_queue()
809 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req_q"); in req_queue()
813 PISDN_ADAPTER IoAdapter; in look_req() local
814 IoAdapter = (PISDN_ADAPTER) a->io; in look_req()
815 return ((byte)IoAdapter->head); in look_req()
819 PISDN_ADAPTER IoAdapter; in next_req() local
821 IoAdapter = (PISDN_ADAPTER) a->io; in next_req()
822 diva_os_enter_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req_next"); in next_req()
823 IoAdapter->head = IoAdapter->e_tbl[IoAdapter->head].next; in next_req()
824 if (!IoAdapter->head) IoAdapter->tail = 0; in next_req()
825 diva_os_leave_spin_lock(&IoAdapter->data_spin_lock, &irql, "data_req_next"); in next_req()
832 PISDN_ADAPTER IoAdapter; in entity_ptr() local
833 IoAdapter = (PISDN_ADAPTER)a->io; in entity_ptr()
834 return (IoAdapter->e_tbl[e_no].e); in entity_ptr()