From: ftillier Date: Wed, 2 Nov 2005 22:19:43 +0000 (+0000) Subject: [HCA] Distinguish between Tavor and Arbel HCAs, report correct device ID X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f08865a3094793cb7fbb6fe2d9cae1ccd0ca4912;p=~shefty%2Frdma-win.git [HCA] Distinguish between Tavor and Arbel HCAs, report correct device ID in CA attributes. Signed-off-by: Yossi Leybovich (sleybo@mellanox.co.il) git-svn-id: svn://openib.tc.cornell.edu/gen1@138 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCard.h b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCard.h index ce7f2e3c..f4bda55b 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCard.h +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCard.h @@ -497,7 +497,7 @@ typedef struct MD_DEV_CONTEXT_S { /* for TAVOR_SD */ { L"5A5A", "mt%d_pci%d", "mt%d_pci%d", MD_DEV_ID_TAVOR_SD, MD_DEV_IX_TAVOR_SD, TRUE, 0x00100000, 0x01000000, 0x00000000, 167000000, 4, 0 }, /* for TAVOR_SD */ - { L"6278", "InfiniHost%d", "InfiniHosA%d", MD_DEV_ID_ARBEL_TM, MD_DEV_IX_ARBEL_TM, TRUE, 0x00100000, 0x01000000, 0x00000000, 167000000, 4, 0 }, + { L"6278", "InfiniHostEx%d", "InfiniHosEx%d", MD_DEV_ID_ARBEL_TM, MD_DEV_IX_ARBEL_TM, TRUE, 0x00100000, 0x01000000, 0x00000000, 167000000, 4, 0 }, }; #else diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.c b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.c index d9cf0b61..12b8db2e 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.c +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.c @@ -586,7 +586,8 @@ PciFixCmdReg( } /* fix HCA command register from SHRIMP */ - if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR ) + if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR + || pi_pMdDevContext->m_eDevType ==MD_DEV_IX_ARBEL_TM) { /* fix command register for TAVOR */ l_pInterface = &pi_pMdDevContext->m_Interface; @@ -680,7 +681,8 @@ PciHdrWrite( return l_Status; } else - if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR) { + if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + pi_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM) { /* protect */ KSEM_ACQ(&pi_pMdDevContext->m_Sem); @@ -849,7 +851,8 @@ PciHdrSave( } else - if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR ) { + if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + pi_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM) { /* * HCA device @@ -936,7 +939,8 @@ PciHdrRestore( } } else - if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR ) { + if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + pi_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM) { /* * Bridge device @@ -987,7 +991,8 @@ PciReset( l_Status ); } else - if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR) { /* we are Tavor device */ + if (pi_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + pi_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM) { /* we are Tavor device */ l_Status = PciDevReset(pi_pMdDevContext, l_ResetOffset, l_ResetValue ); } else diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdIoctl.c b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdIoctl.c index e3b022e0..ea967bd3 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdIoctl.c +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdIoctl.c @@ -140,6 +140,7 @@ Return Value: case MD_DEV_IX_TAVOR_SD: case MD_DEV_IX_TAVOR: + case MD_DEV_IX_ARBEL_TM: l_Status = PciIoctl( l_pMdDevContext, l_pPcs, l_nIoControlCode, l_pInBuffer, l_nInBufLength, l_pOutBuffer, l_nOutBufLength, (PULONG)&pi_pIrp->IoStatus.Information ); break; diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPnp.c b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPnp.c index 1e04bd19..1c73e036 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPnp.c +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPnp.c @@ -932,7 +932,9 @@ Return Value: * add device to TAVOR */ - if (l_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR && g_pDrvContext->m_fSupportTavor) + if ((l_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + l_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM) + && g_pDrvContext->m_fSupportTavor) { /* add HCA to Tavor functional DLLs */ unsigned char l_RevId = 0; @@ -1128,7 +1130,8 @@ Return Value: // stop the card by sending some commands to it or suspend all new requests and wait for the end of in-progress ones // - if (l_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR && g_pDrvContext->m_fSupportTavor) + if ((l_pMdDevContext->m_eDevType == MD_DEV_IX_TAVOR || + l_pMdDevContext->m_eDevType == MD_DEV_IX_ARBEL_TM)&& g_pDrvContext->m_fSupportTavor) { /* remove HCA from Tavor functional DLLs */ HH_ret_t l_HhRet; diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdRdWr.c b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdRdWr.c index 8398471a..ea85c7b7 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdRdWr.c +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdRdWr.c @@ -103,8 +103,9 @@ Return Value: break; case MD_DEV_IX_TAVOR: + case MD_DEV_IX_ARBEL_TM: // MDCTL - PciRelease( l_pMdDevContext, l_pPcs ); + PciRelease( l_pMdDevContext, l_pPcs ); break; case MD_DEV_IX_TAVOR_BD: diff --git a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.c b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.c index 927d0b59..ec7839f3 100644 --- a/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.c +++ b/trunk/hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.c @@ -447,6 +447,7 @@ Return Value: break; case MD_DEV_IX_TAVOR: + case MD_DEV_IX_ARBEL_TM: GetRegistryDword( L"DdrMapOffset", MD_DFLT_CONF_DATA, &l_pMdDevContext->m_ulDdrMapOffset ); GetRegistryDword( L"DdrMapSize", MD_DFLT_CONF_DATA, &l_pMdDevContext->m_ulDdrMapSize ); GetRegistryDword( L"ResetCard", MD_DFLT_CONF_DATA, &l_pMdDevContext->m_PerformReset ); @@ -1415,8 +1416,9 @@ NTSTATUS CreateOneDevice( /* create Control Device names */ /* !!! from now on work with ARBEL_TM as with TAVOR */ - l_pDevInfo = (pi_DevIx == (int)MD_DEV_IX_ARBEL_TM) ? &g_DevParams[MD_DEV_IX_TAVOR] : &g_DevParams[pi_DevIx]; - if (l_pDevInfo->m_DevId == MD_DEV_ID_TAVOR) + //l_pDevInfo = (pi_DevIx == (int)MD_DEV_IX_ARBEL_TM) ? &g_DevParams[MD_DEV_IX_TAVOR] : &g_DevParams[pi_DevIx]; + l_pDevInfo = &g_DevParams[pi_DevIx]; + if (l_pDevInfo->m_DevId == MD_DEV_ID_TAVOR || l_pDevInfo->m_DevId == MD_DEV_ID_ARBEL_TM) sprintf( l_DevName, l_pDevInfo->m_Format, g_pDrvContext->m_uCardNo ); else sprintf( l_DevName, l_pDevInfo->m_Format, l_pDevInfo->m_DevId, g_pDrvContext->m_uCardNo );