Lines Matching refs:id
18 static void DI_format(int do_lock, word id, int type, char *format, va_list argument_list);
19 static void DI_format_locked(word id, int type, char *format, va_list argument_list);
20 static void DI_format_old(word id, char *format, va_list ap) { } in DI_format_old() argument
21 static void DiProcessEventLog(unsigned short id, unsigned long msgID, va_list ap) { } in DiProcessEventLog() argument
375 int id, free_id = -1, best_id = 0; in DI_register() local
384 ((hDbg->id == 0) && (((_OldDbgHandle_ *)hDbg)->id == -1)) || in DI_register()
391 for (id = 1; id < ARRAY_SIZE(clients); id++) { in DI_register()
392 if (clients[id].hDbg == hDbg) { in DI_register()
399 if (clients[id].hDbg) { /* slot is busy */ in DI_register()
402 free_id = id; in DI_register()
403 if (!strcmp(clients[id].drvName, hDbg->drvName)) { in DI_register()
411 if (!clients[id].hDbg) { /* slot is busy */ in DI_register()
438 hDbg->id = (byte)free_id; in DI_register()
502 hDbg->id = -1; in DI_deregister()
562 static void DI_format_locked(unsigned short id, in DI_format_locked() argument
566 DI_format(1, id, type, format, argument_list); in DI_format_locked()
570 unsigned short id, in DI_format() argument
627 pmsg->drv_id = id; /* driver MAINT id */ in DI_format()
665 pmsg->drv_id = id; /* driver MAINT id */ in DI_format()
706 pmsg->drv_id = id; /* driver MAINT id */ in DI_format()
730 int diva_get_driver_info(dword id, byte *data, int data_length) { in diva_get_driver_info() argument
735 if (!data || !id || (data_length < 17) || in diva_get_driver_info()
736 (id >= ARRAY_SIZE(clients))) { in diva_get_driver_info()
742 if (clients[id].hDbg) { in diva_get_driver_info()
744 *p++ = (byte)clients[id].sec; /* save seconds */ in diva_get_driver_info()
745 *p++ = (byte)(clients[id].sec >> 8); in diva_get_driver_info()
746 *p++ = (byte)(clients[id].sec >> 16); in diva_get_driver_info()
747 *p++ = (byte)(clients[id].sec >> 24); in diva_get_driver_info()
749 *p++ = (byte)(clients[id].usec / 1000); /* save mseconds */ in diva_get_driver_info()
750 *p++ = (byte)((clients[id].usec / 1000) >> 8); in diva_get_driver_info()
751 *p++ = (byte)((clients[id].usec / 1000) >> 16); in diva_get_driver_info()
752 *p++ = (byte)((clients[id].usec / 1000) >> 24); in diva_get_driver_info()
756 if ((to_copy = min(strlen(clients[id].drvName), (size_t)(data_length - 1)))) { in diva_get_driver_info()
757 memcpy(p, clients[id].drvName, to_copy); in diva_get_driver_info()
760 if ((data_length >= 4) && clients[id].hDbg->drvTag[0]) { in diva_get_driver_info()
763 if ((to_copy = min(strlen(clients[id].hDbg->drvTag), (size_t)(data_length - 2)))) { in diva_get_driver_info()
764 memcpy(p, clients[id].hDbg->drvTag, to_copy); in diva_get_driver_info()
782 int diva_get_driver_dbg_mask(dword id, byte *data) { in diva_get_driver_dbg_mask() argument
786 if (!data || !id || (id >= ARRAY_SIZE(clients))) { in diva_get_driver_dbg_mask()
791 if (clients[id].hDbg) { in diva_get_driver_dbg_mask()
793 *data++ = (byte)(clients[id].hDbg->dbgMask); in diva_get_driver_dbg_mask()
794 *data++ = (byte)(clients[id].hDbg->dbgMask >> 8); in diva_get_driver_dbg_mask()
795 *data++ = (byte)(clients[id].hDbg->dbgMask >> 16); in diva_get_driver_dbg_mask()
796 *data++ = (byte)(clients[id].hDbg->dbgMask >> 24); in diva_get_driver_dbg_mask()
804 int diva_set_driver_dbg_mask(dword id, dword mask) { in diva_set_driver_dbg_mask() argument
809 if (!id || (id >= ARRAY_SIZE(clients))) { in diva_set_driver_dbg_mask()
816 if (clients[id].hDbg) { in diva_set_driver_dbg_mask()
817 dword old_mask = clients[id].hDbg->dbgMask; in diva_set_driver_dbg_mask()
819 clients[id].hDbg->dbgMask = mask; in diva_set_driver_dbg_mask()
820 clients[id].last_dbgMask = (clients[id].hDbg->dbgMask | clients[id].dbgMask); in diva_set_driver_dbg_mask()
822 diva_change_management_debug_mask(&clients[id], old_mask); in diva_set_driver_dbg_mask()
828 if (clients[id].request_pending) { in diva_set_driver_dbg_mask()
829 clients[id].request_pending = 0; in diva_set_driver_dbg_mask()
830 …(*(clients[id].request))((ENTITY *)(*(clients[id].pIdiLib->DivaSTraceGetHandle))(clients[id].pIdiL… in diva_set_driver_dbg_mask()
861 int id, free_id = -1; in diva_mnt_add_xdi_adapter() local
887 for (id = 1; id < ARRAY_SIZE(clients); id++) { in diva_mnt_add_xdi_adapter()
888 if (clients[id].hDbg && (clients[id].request == d->request)) { in diva_mnt_add_xdi_adapter()
894 if (clients[id].hDbg) { /* slot is busy */ in diva_mnt_add_xdi_adapter()
898 free_id = id; in diva_mnt_add_xdi_adapter()
900 if (!strcmp(clients[id].drvName, tmp)) { in diva_mnt_add_xdi_adapter()
905 free_id = id; in diva_mnt_add_xdi_adapter()
917 id = free_id; in diva_mnt_add_xdi_adapter()
918 clients[id].request = d->request; in diva_mnt_add_xdi_adapter()
919 clients[id].request_pending = 0; in diva_mnt_add_xdi_adapter()
920 clients[id].hDbg = &clients[id].Dbg; in diva_mnt_add_xdi_adapter()
921 clients[id].sec = sec; in diva_mnt_add_xdi_adapter()
922 clients[id].usec = usec; in diva_mnt_add_xdi_adapter()
923 strcpy(clients[id].drvName, tmp); in diva_mnt_add_xdi_adapter()
924 strcpy(clients[id].Dbg.drvName, tmp); in diva_mnt_add_xdi_adapter()
925 clients[id].Dbg.drvTag[0] = 0; in diva_mnt_add_xdi_adapter()
926 clients[id].logical = (int)logical; in diva_mnt_add_xdi_adapter()
927 clients[id].channels = (int)d->channels; in diva_mnt_add_xdi_adapter()
928 clients[id].dma_handle = -1; in diva_mnt_add_xdi_adapter()
930 clients[id].Dbg.dbgMask = 0; in diva_mnt_add_xdi_adapter()
931 clients[id].dbgMask = clients[id].Dbg.dbgMask; in diva_mnt_add_xdi_adapter()
932 if (id) { in diva_mnt_add_xdi_adapter()
933 clients[id].Dbg.dbgMask |= clients[free_id].last_dbgMask; in diva_mnt_add_xdi_adapter()
935 clients[id].last_dbgMask = 0; in diva_mnt_add_xdi_adapter()
937 clients[id].Dbg.Registered = DBG_HANDLE_REG_NEW; in diva_mnt_add_xdi_adapter()
938 clients[id].Dbg.id = (byte)id; in diva_mnt_add_xdi_adapter()
939 clients[id].Dbg.dbg_end = DI_deregister; in diva_mnt_add_xdi_adapter()
940 clients[id].Dbg.dbg_prt = DI_format_locked; in diva_mnt_add_xdi_adapter()
941 clients[id].Dbg.dbg_ev = DiProcessEventLog; in diva_mnt_add_xdi_adapter()
942 clients[id].Dbg.dbg_irq = DI_format_locked; in diva_mnt_add_xdi_adapter()
943 clients[id].Dbg.next = (pDbgHandle)DBG_MAGIC; in diva_mnt_add_xdi_adapter()
946 diva_trace_library_user_interface_t diva_maint_user_ifc = { &clients[id], in diva_mnt_add_xdi_adapter()
954 if ((clients[id].pIdiLib = in diva_mnt_add_xdi_adapter()
956 if (((*(clients[id].pIdiLib->DivaSTraceLibraryStart))(clients[id].pIdiLib->hLib))) { in diva_mnt_add_xdi_adapter()
958 (*(clients[id].pIdiLib->DivaSTraceLibraryFinit))(clients[id].pIdiLib->hLib); in diva_mnt_add_xdi_adapter()
959 clients[id].pIdiLib = NULL; in diva_mnt_add_xdi_adapter()
966 if (!clients[id].pIdiLib) { in diva_mnt_add_xdi_adapter()
967 clients[id].request = NULL; in diva_mnt_add_xdi_adapter()
968 clients[id].request_pending = 0; in diva_mnt_add_xdi_adapter()
969 clients[id].hDbg = NULL; in diva_mnt_add_xdi_adapter()
980 id, clients[id].Dbg.drvName); in diva_mnt_add_xdi_adapter()
1006 org_mask = clients[id].Dbg.dbgMask; in diva_mnt_add_xdi_adapter()
1007 clients[id].Dbg.dbgMask = 0; in diva_mnt_add_xdi_adapter()
1011 if (clients[id].request_pending) { in diva_mnt_add_xdi_adapter()
1012 clients[id].request_pending = 0; in diva_mnt_add_xdi_adapter()
1013 …(*(clients[id].request))((ENTITY *)(*(clients[id].pIdiLib->DivaSTraceGetHandle))(clients[id].pIdiL… in diva_mnt_add_xdi_adapter()
1018 diva_set_driver_dbg_mask(id, org_mask); in diva_mnt_add_xdi_adapter()
1444 if ((TraceFilterIdent == pC->hDbg->id) && (TraceFilterChannel == (int)channel->ChannelNumber)) { in diva_maint_state_change_notify()
1447 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, "Selective Trace OFF for Ch=%d", in diva_maint_state_change_notify()
1463 TraceFilterIdent = pC->hDbg->id; in diva_maint_state_change_notify()
1467 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, "Selective Trace ON for Ch=%d", in diva_maint_state_change_notify()
1473 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Ch = %d", in diva_maint_state_change_notify()
1475 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Status = <%s>", &channel->Line[0]); in diva_maint_state_change_notify()
1476 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Layer1 = <%s>", &channel->Framing[0]); in diva_maint_state_change_notify()
1477 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Layer2 = <%s>", &channel->Layer2[0]); in diva_maint_state_change_notify()
1478 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Layer3 = <%s>", &channel->Layer3[0]); in diva_maint_state_change_notify()
1479 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L RAddr = <%s>", in diva_maint_state_change_notify()
1481 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L RSAddr = <%s>", in diva_maint_state_change_notify()
1483 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L LAddr = <%s>", in diva_maint_state_change_notify()
1485 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L LSAddr = <%s>", in diva_maint_state_change_notify()
1488 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L BC = <%s>", tmp); in diva_maint_state_change_notify()
1490 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L HLC = <%s>", tmp); in diva_maint_state_change_notify()
1492 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L LLC = <%s>", tmp); in diva_maint_state_change_notify()
1493 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L CR = 0x%x", channel->CallReference); in diva_maint_state_change_notify()
1494 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Disc = 0x%x", in diva_maint_state_change_notify()
1496 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "L Owner = <%s>", &channel->UserID[0]); in diva_maint_state_change_notify()
1505 int id = TraceFilterIdent; in diva_maint_state_change_notify() local
1507 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) && in diva_maint_state_change_notify()
1508 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { in diva_maint_state_change_notify()
1518 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Ch = %lu", in diva_maint_state_change_notify()
1520 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Event = %lu", modem->Event); in diva_maint_state_change_notify()
1521 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Norm = %lu", modem->Norm); in diva_maint_state_change_notify()
1522 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Opts. = 0x%08x", modem->Options); in diva_maint_state_change_notify()
1523 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Tx = %lu Bps", modem->TxSpeed); in diva_maint_state_change_notify()
1524 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Rx = %lu Bps", modem->RxSpeed); in diva_maint_state_change_notify()
1525 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM RT = %lu mSec", in diva_maint_state_change_notify()
1527 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Sr = %lu", modem->SymbolRate); in diva_maint_state_change_notify()
1528 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Rxl = %d dBm", modem->RxLeveldBm); in diva_maint_state_change_notify()
1529 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM El = %d dBm", modem->EchoLeveldBm); in diva_maint_state_change_notify()
1530 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM SNR = %lu dB", modem->SNRdb); in diva_maint_state_change_notify()
1531 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM MAE = %lu", modem->MAE); in diva_maint_state_change_notify()
1532 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM LRet = %lu", in diva_maint_state_change_notify()
1534 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM RRet = %lu", in diva_maint_state_change_notify()
1536 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM LRes = %lu", modem->LocalResyncs); in diva_maint_state_change_notify()
1537 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM RRes = %lu", in diva_maint_state_change_notify()
1540 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Disc = %lu", modem->DiscReason); in diva_maint_state_change_notify()
1552 int id = TraceFilterIdent; in diva_maint_state_change_notify() local
1554 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) && in diva_maint_state_change_notify()
1555 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { in diva_maint_state_change_notify()
1564 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Ch = %lu", (int)fax->ChannelNumber); in diva_maint_state_change_notify()
1565 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Event = %lu", fax->Event); in diva_maint_state_change_notify()
1566 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Pages = %lu", fax->Page_Counter); in diva_maint_state_change_notify()
1567 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Feat. = 0x%08x", fax->Features); in diva_maint_state_change_notify()
1568 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX ID = <%s>", &fax->Station_ID[0]); in diva_maint_state_change_notify()
1569 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Saddr = <%s>", &fax->Subaddress[0]); in diva_maint_state_change_notify()
1570 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Pwd = <%s>", &fax->Password[0]); in diva_maint_state_change_notify()
1571 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Speed = %lu", fax->Speed); in diva_maint_state_change_notify()
1572 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Res. = 0x%08x", fax->Resolution); in diva_maint_state_change_notify()
1573 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Width = %lu", fax->Paper_Width); in diva_maint_state_change_notify()
1574 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Length= %lu", fax->Paper_Length); in diva_maint_state_change_notify()
1575 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX SLT = %lu", fax->Scanline_Time); in diva_maint_state_change_notify()
1577 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Disc = %lu", fax->Disc_Reason); in diva_maint_state_change_notify()
1587 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, in diva_maint_state_change_notify()
1589 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, in diva_maint_state_change_notify()
1600 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1604 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1608 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1612 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1616 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1620 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1624 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1628 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1636 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1640 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1644 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1648 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1652 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1656 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1660 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1668 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1672 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1676 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1680 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1684 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1688 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1692 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1696 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1700 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1707 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1711 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1715 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1719 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1723 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1727 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1731 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1735 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1739 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1743 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1747 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1751 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1755 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1759 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1763 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1767 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1771 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1775 diva_mnt_internal_dprintf(pC->hDbg->id, DLI_LOG, in diva_maint_state_change_notify()
1797 int id = TraceFilterIdent; in diva_maint_trace_notify() local
1802 if ((id >= 0) && (ch >= 0) && (id < ARRAY_SIZE(clients)) && in diva_maint_trace_notify()
1803 (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { in diva_maint_trace_notify()
1808 if (Adapter != clients[id].logical) { in diva_maint_trace_notify()
1860 pmsg->drv_id = pC->hDbg->id; in diva_maint_trace_notify()