[HCA] Distinguish between Tavor and Arbel HCAs, report correct device ID
[mirror/winof/.git] / hw / mt23108 / vapi / mlxsys / os_dep / win / tdriver / MdUtil.c
index 927d0b5..ec7839f 100644 (file)
@@ -447,6 +447,7 @@ Return Value:
                        break;\r
 \r
                case MD_DEV_IX_TAVOR:\r
+               case MD_DEV_IX_ARBEL_TM:\r
                        GetRegistryDword( L"DdrMapOffset",      MD_DFLT_CONF_DATA, &l_pMdDevContext->m_ulDdrMapOffset );\r
                        GetRegistryDword( L"DdrMapSize",        MD_DFLT_CONF_DATA, &l_pMdDevContext->m_ulDdrMapSize );\r
                        GetRegistryDword( L"ResetCard",         MD_DFLT_CONF_DATA, &l_pMdDevContext->m_PerformReset );\r
@@ -1415,8 +1416,9 @@ NTSTATUS CreateOneDevice(
 \r
        /* create Control Device names */\r
        /* !!! from now on work with ARBEL_TM as with TAVOR */\r
-       l_pDevInfo = (pi_DevIx == (int)MD_DEV_IX_ARBEL_TM) ? &g_DevParams[MD_DEV_IX_TAVOR] : &g_DevParams[pi_DevIx];\r
-       if (l_pDevInfo->m_DevId == MD_DEV_ID_TAVOR)\r
+       //l_pDevInfo = (pi_DevIx == (int)MD_DEV_IX_ARBEL_TM) ? &g_DevParams[MD_DEV_IX_TAVOR] : &g_DevParams[pi_DevIx];\r
+       l_pDevInfo =   &g_DevParams[pi_DevIx];\r
+       if (l_pDevInfo->m_DevId == MD_DEV_ID_TAVOR || l_pDevInfo->m_DevId == MD_DEV_ID_ARBEL_TM)\r
                sprintf( l_DevName, l_pDevInfo->m_Format, g_pDrvContext->m_uCardNo );\r
        else\r
                sprintf( l_DevName, l_pDevInfo->m_Format, l_pDevInfo->m_DevId, g_pDrvContext->m_uCardNo );\r