Lines Matching +full:smp +full:- +full:offset
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
101 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiINIIOAbort()
102 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiINIIOAbort()
129 agRoot = &(tdsaAllShared->agRootNonInt); in tiINIIOAbort()
130 tdIORequestBody = (tdIORequestBody_t *)taskTag->tdData; in tiINIIOAbort()
131 agIORequest = &(tdIORequestBody->agIORequest); in tiINIIOAbort()
132 oneDeviceData = tdIORequestBody->tiDevHandle->tdData; in tiINIIOAbort()
140 agDevHandle = oneDeviceData->agDevHandle; in tiINIIOAbort()
142 TI_DBG2(("tiINIIOAbort: did %d\n", oneDeviceData->id)); in tiINIIOAbort()
145 if (oneDeviceData->valid != agTRUE || oneDeviceData->registered != agTRUE || in tiINIIOAbort()
146 oneDeviceData->tdPortContext == agNULL ) in tiINIIOAbort()
148 TI_DBG1(("tiINIIOAbort: NO Device did %d\n", oneDeviceData->id )); in tiINIIOAbort()
149 TI_DBG1(("tiINIIOAbort: device AddrHi 0x%08x\n", oneDeviceData->SASAddressID.sasAddressHi)); in tiINIIOAbort()
150 TI_DBG1(("tiINIIOAbort: device AddrLo 0x%08x\n", oneDeviceData->SASAddressID.sasAddressLo)); in tiINIIOAbort()
180 tdAbortIORequestBody->IOType.InitiatorTMIO.osMemHandle = osMemHandle; in tiINIIOAbort()
182 tdAbortIORequestBody->IOCompletionFunc = itdssIOAbortedHandler; in tiINIIOAbort()
183 tdAbortIORequestBody->tiDevHandle = tdIORequestBody->tiDevHandle; in tiINIIOAbort()
186 agAbortIORequest = &(tdAbortIORequestBody->agIORequest); in tiINIIOAbort()
187 agAbortIORequest->osData = (void *) tdAbortIORequestBody; in tiINIIOAbort()
188 agAbortIORequest->sdkData = agNULL; /* LL takes care of this */ in tiINIIOAbort()
191 tdAbortIORequestBody->tiIOToBeAbortedRequest = taskTag; in tiINIIOAbort()
193 if (oneDeviceData->DeviceType == TD_SAS_DEVICE) in tiINIIOAbort()
213 else if (oneDeviceData->DeviceType == TD_SATA_DEVICE) in tiINIIOAbort()
217 smRoot = &(tdsaAllShared->smRoot); in tiINIIOAbort()
220 ToBeAbortedtdIORequestBody = (tdIORequestBody_t *)taskTag->tdData; in tiINIIOAbort()
221 ToBeAborted = &(ToBeAbortedtdIORequestBody->smIORequest); in tiINIIOAbort()
258 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiINIIOAbortAll()
259 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiINIIOAbortAll()
260 smRoot_t *smRoot = &(tdsaAllShared->smRoot); in tiINIIOAbortAll()
272 oneDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINIIOAbortAll()
281 if (oneDeviceData->valid != agTRUE || oneDeviceData->registered != agTRUE || in tiINIIOAbortAll()
282 oneDeviceData->tdPortContext == agNULL ) in tiINIIOAbortAll()
284 TI_DBG1(("tiINIIOAbortAll: NO Device did %d\n", oneDeviceData->id )); in tiINIIOAbortAll()
285 TI_DBG1(("tiINIIOAbortAll: device AddrHi 0x%08x\n", oneDeviceData->SASAddressID.sasAddressHi)); in tiINIIOAbortAll()
286 TI_DBG1(("tiINIIOAbortAll: device AddrLo 0x%08x\n", oneDeviceData->SASAddressID.sasAddressLo)); in tiINIIOAbortAll()
290 agRoot = oneDeviceData->agRoot; in tiINIIOAbortAll()
299 if (oneDeviceData->OSAbortAll == agTRUE) in tiINIIOAbortAll()
306 oneDeviceData->OSAbortAll = agTRUE; in tiINIIOAbortAll()
319 smDeviceHandle = (smDeviceHandle_t *)&(oneDeviceData->smDeviceHandle); in tiINIIOAbortAll()
320 smDeviceHandle->tdData = oneDeviceData; in tiINIIOAbortAll()
325 TI_DBG1(("tiINIIOAbortAll: unknow device type!!! 0x%x\n", oneDeviceData->target_ssp_stp_smp)); in tiINIIOAbortAll()
367 TI_DBG1(("tdsaAbortAll: did %d\n", oneDeviceData->id)); in tdsaAbortAll()
395 tdAbortIORequestBody->IOType.InitiatorTMIO.osMemHandle = osMemHandle; in tdsaAbortAll()
397 tdAbortIORequestBody->IOCompletionFunc = agNULL; in tdsaAbortAll()
398 //tdAbortIORequestBody->IOCompletionFunc = itdssIOAbortedHandler; in tdsaAbortAll()
400 tdAbortIORequestBody->tiDevHandle = (tiDeviceHandle_t *)&(oneDeviceData->tiDeviceHandle); in tdsaAbortAll()
403 agAbortIORequest = &(tdAbortIORequestBody->agIORequest); in tdsaAbortAll()
404 agAbortIORequest->osData = (void *) tdAbortIORequestBody; in tdsaAbortAll()
405 agAbortIORequest->sdkData = agNULL; /* LL takes care of this */ in tdsaAbortAll()
413 oneDeviceData->agDevHandle, in tdsaAbortAll()
424 if (oneDeviceData->satDevData.IDDeviceValid == agFALSE) in tdsaAbortAll()
430 oneDeviceData->agDevHandle, in tdsaAbortAll()
442 oneDeviceData->agDevHandle, in tdsaAbortAll()
456 oneDeviceData->agDevHandle, in tdsaAbortAll()
464 TI_DBG1(("tdsaAbortAll: unknown device type!!! 0x%x\n", oneDeviceData->target_ssp_stp_smp)); in tdsaAbortAll()
478 tdAbortIORequestBody->IOType.InitiatorTMIO.osMemHandle, in tdsaAbortAll()
507 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiCOMReset()
508 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiCOMReset()
520 tdsaAllShared->resetCount++; in tiCOMReset()
521 TI_DBG2(("tiCOMReset: reset count %d\n", tdsaAllShared->resetCount)); in tiCOMReset()
523 agRoot = &(tdsaAllShared->agRootNonInt); in tiCOMReset()
525 if (tdsaAllShared->flags.resetInProgress == agTRUE) in tiCOMReset()
533 tdsaAllShared->flags.resetInProgress = agTRUE; in tiCOMReset()
540 bit8 * DirectData = (bit8 * )tdsaAllShared->FatalErrorData; in tiCOMReset()
543 forensicData.dataBuf.directOffset = 0; /* current offset */ in tiCOMReset()
616 * \param outboundChannelNum: Zero-base channel number
621 * \note - The scope is shared target and initiator.
632 tdsaRootOsData_t *osData = (tdsaRootOsData_t *) (agRoot->osData); in ossaReenableInterrupts()
635 osData->tiRoot, in ossaReenableInterrupts()
664 * \param task: SAM-2 task management request.
665 * \param lun: Pointer to the SCSI-3 LUN information
683 warm reset->smp phy control(hard reset) or saLocalPhyControl(AGSA_PHY_HARD_RESET)
698 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiINITaskManagement()
699 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiINITaskManagement()
700 itdsaIni_t *Initiator = (itdsaIni_t *)tdsaAllShared->itdsaIni; in tiINITaskManagement()
742 oneDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINITaskManagement()
748 TI_DBG1(("tiINITaskManagement: did %d\n", oneDeviceData->id )); in tiINITaskManagement()
802 oneDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINITaskManagement()
810 if (oneDeviceData->valid != agTRUE || oneDeviceData->registered != agTRUE || in tiINITaskManagement()
811 oneDeviceData->tdPortContext == agNULL ) in tiINITaskManagement()
813 …e did %d Addr 0x%08x:0x%08x\n", oneDeviceData->id , oneDeviceData->SASAddressID.sasAddressHi, oneD… in tiINITaskManagement()
821 if (oneDeviceData->DeviceType == TD_SAS_DEVICE) in tiINITaskManagement()
823 agRoot = oneDeviceData->agRoot; in tiINITaskManagement()
824 agDevHandle = oneDeviceData->agDevHandle; in tiINITaskManagement()
836 tdsaDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINITaskManagement()
837 currentTaskTag->tdData = tdsaDeviceData; in tiINITaskManagement()
838 agContext = &(tdsaDeviceData->agDeviceResetContext); in tiINITaskManagement()
839 agContext->osData = currentTaskTag; in tiINITaskManagement()
841 TI_DBG2(("tiINITaskManagement: did %d device reset for SAS\n", oneDeviceData->id)); in tiINITaskManagement()
844 /* warm reset by saLocalPhyControl or SMP PHY control */ in tiINITaskManagement()
845 if (oneDeviceData->directlyAttached == agTRUE) in tiINITaskManagement()
851 oneDeviceData->phyID, in tiINITaskManagement()
904 TMtdIORequestBody->IOType.InitiatorTMIO.osMemHandle = osMemHandle; in tiINITaskManagement()
905 TMtdIORequestBody->IOType.InitiatorTMIO.CurrentTaskTag = currentTaskTag; in tiINITaskManagement()
906 TMtdIORequestBody->IOType.InitiatorTMIO.TaskTag = taskTag; in tiINITaskManagement()
912 TMtdIORequestBody->IOCompletionFunc = itdssTaskCompleted; in tiINITaskManagement()
914 /* TMtdIORequestBody->IOCompletionFunc = itdssIOCompleted; */ in tiINITaskManagement()
917 TMtdIORequestBody->tiDevHandle = tiDeviceHandle; in tiINITaskManagement()
920 TMtdIORequestBody->tiIORequest = currentTaskTag; in tiINITaskManagement()
922 currentTaskTag->tdData = TMtdIORequestBody; in tiINITaskManagement()
925 agIORequest = &(TMtdIORequestBody->agIORequest); in tiINITaskManagement()
926 agIORequest->osData = (void *) TMtdIORequestBody; in tiINITaskManagement()
927 agIORequest->sdkData = agNULL; /* SA takes care of this */ in tiINITaskManagement()
931 TMtdIORequestBody->agRequestType = AGSA_SSP_TASK_MGNT_REQ; in tiINITaskManagement()
934 tdIORequestBody_t tdIORequestBody -> agSASRequestBody in tiINITaskManagement()
936 agSASRequestBody = &(TMtdIORequestBody->transport.SAS.agSASRequestBody); in tiINITaskManagement()
937 agSSPTaskMgntRequest = &(agSASRequestBody->sspTaskMgntReq); in tiINITaskManagement()
939 TI_DBG2(("tiINITaskManagement: did %d LUN reset for SAS\n", oneDeviceData->id)); in tiINITaskManagement()
943 osti_memset(agSSPTaskMgntRequest->lun, 0, 8); in tiINITaskManagement()
947 osti_memcpy(agSSPTaskMgntRequest->lun, lun->lun, 8); in tiINITaskManagement()
954 agSSPTaskMgntRequest->tmOption = 2; in tiINITaskManagement()
960 agSSPTaskMgntRequest->taskMgntFunction = AGSA_ABORT_TASK; in tiINITaskManagement()
966 agSSPTaskMgntRequest->tmOption = 3; in tiINITaskManagement()
969 agSSPTaskMgntRequest->taskMgntFunction = AGSA_ABORT_TASK_SET; in tiINITaskManagement()
972 agSSPTaskMgntRequest->taskMgntFunction = AGSA_CLEAR_ACA; in tiINITaskManagement()
975 agSSPTaskMgntRequest->taskMgntFunction = AGSA_CLEAR_TASK_SET; in tiINITaskManagement()
978 agSSPTaskMgntRequest->taskMgntFunction = AGSA_LOGICAL_UNIT_RESET; in tiINITaskManagement()
981 agSSPTaskMgntRequest->taskMgntFunction = AGSA_QUERY_TASK; in tiINITaskManagement()
991 tdIORequestBody = (tdIORequestBody_t *)taskTag->tdData; in tiINITaskManagement()
1006 agTMRequest = &(tdIORequestBody->agIORequest); in tiINITaskManagement()
1016 agSSPTaskMgntRequest->tagOfTaskToBeManaged = 0; in tiINITaskManagement()
1021 TDLIST_INIT_HDR(&TMtdIORequestBody->EsglPageList); in tiINITaskManagement()
1023 if (TMtdIORequestBody->IOCompletionFunc == agNULL) in tiINITaskManagement()
1039 Initiator->NumIOsActive++; in tiINITaskManagement()
1048 TMtdIORequestBody->IOType.InitiatorTMIO.osMemHandle, in tiINITaskManagement()
1065 else if (oneDeviceData->DeviceType == TD_SATA_DEVICE) in tiINITaskManagement()
1070 agContext = &(oneDeviceData->agDeviceResetContext); in tiINITaskManagement()
1071 agContext->osData = currentTaskTag; in tiINITaskManagement()
1075 if (oneDeviceData->directlyAttached == agTRUE && in tiINITaskManagement()
1078 agRoot = oneDeviceData->agRoot; in tiINITaskManagement()
1079 agDevHandle = oneDeviceData->agDevHandle; in tiINITaskManagement()
1081 currentTaskTag->tdData = oneDeviceData; in tiINITaskManagement()
1085 if ( (lun->lun[0] | lun->lun[1] | lun->lun[2] | lun->lun[3] | in tiINITaskManagement()
1086 lun->lun[4] | lun->lun[5] | lun->lun[6] | lun->lun[7] ) != 0 ) in tiINITaskManagement()
1094 …l(agRoot, agContext, tdsaRotateQnumber(tiRoot, oneDeviceData), oneDeviceData->phyID, AGSA_PHY_HARD… in tiINITaskManagement()
1099 smRoot = &(tdsaAllShared->smRoot); in tiINITaskManagement()
1100 smDeviceHandle = &(oneDeviceData->smDeviceHandle); in tiINITaskManagement()
1105 ToBeAbortedtdIORequestBody = (tdIORequestBody_t *)taskTag->tdData; in tiINITaskManagement()
1106 ToBeAborted = &(ToBeAbortedtdIORequestBody->smIORequest); in tiINITaskManagement()
1134 SMTMtdIORequestBody->IOType.InitiatorTMIO.osMemHandle = SMosMemHandle; in tiINITaskManagement()
1135 SMTMtdIORequestBody->IOType.InitiatorTMIO.CurrentTaskTag = currentTaskTag; in tiINITaskManagement()
1136 SMTMtdIORequestBody->IOType.InitiatorTMIO.TaskTag = taskTag; in tiINITaskManagement()
1139 SMTMtdIORequestBody->tiDevHandle = tiDeviceHandle; in tiINITaskManagement()
1142 SMTMtdIORequestBody->tiIORequest = currentTaskTag; in tiINITaskManagement()
1144 currentTaskTag->tdData = SMTMtdIORequestBody; in tiINITaskManagement()
1146 TaskManagement = &(SMTMtdIORequestBody->smIORequest); in tiINITaskManagement()
1148 TaskManagement->tdData = SMTMtdIORequestBody; in tiINITaskManagement()
1149 TaskManagement->smData = &SMTMtdIORequestBody->smIORequestBody; in tiINITaskManagement()
1164 SMTMtdIORequestBody->IOType.InitiatorTMIO.osMemHandle, in tiINITaskManagement()
1171 else if (oneDeviceData->DeviceType == TD_SATA_DEVICE) in tiINITaskManagement()
1173 agRoot = oneDeviceData->agRoot; in tiINITaskManagement()
1174 agDevHandle = oneDeviceData->agDevHandle; in tiINITaskManagement()
1189 … TI_DBG2(("tiINITaskManagement: did %d LUN reset or device reset for SATA\n", oneDeviceData->id)); in tiINITaskManagement()
1190 tdsaDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINITaskManagement()
1191 satDevData = &tdsaDeviceData->satDevData; in tiINITaskManagement()
1192 currentTaskTag->tdData = tdsaDeviceData; in tiINITaskManagement()
1193 agContext = &(tdsaDeviceData->agDeviceResetContext); in tiINITaskManagement()
1194 agContext->osData = currentTaskTag; in tiINITaskManagement()
1199 if ( (lun->lun[0] | lun->lun[1] | lun->lun[2] | lun->lun[3] | in tiINITaskManagement()
1200 lun->lun[4] | lun->lun[5] | lun->lun[6] | lun->lun[7] ) != 0 ) in tiINITaskManagement()
1210 if (satDevData->satTmTaskTag != agNULL) in tiINITaskManagement()
1217 satDevData->satDriveState = SAT_DEV_STATE_IN_RECOVERY; in tiINITaskManagement()
1218 satDevData->satAbortAfterReset = agFALSE; in tiINITaskManagement()
1223 warm reset by saLocalPhyControl or SMP PHY control in tiINITaskManagement()
1225 if (oneDeviceData->directlyAttached == agTRUE) in tiINITaskManagement()
1228 …l(agRoot, agContext, tdsaRotateQnumber(tiRoot, oneDeviceData), oneDeviceData->phyID, AGSA_PHY_HARD… in tiINITaskManagement()
1275 TMtdIORequestBody->IOType.InitiatorTMIO.osMemHandle = osMemHandle; in tiINITaskManagement()
1276 TMtdIORequestBody->IOType.InitiatorTMIO.CurrentTaskTag = currentTaskTag; in tiINITaskManagement()
1277 TMtdIORequestBody->IOType.InitiatorTMIO.TaskTag = taskTag; in tiINITaskManagement()
1280 TMtdIORequestBody->tiDevHandle = tiDeviceHandle; in tiINITaskManagement()
1283 TMtdIORequestBody->tiIORequest = currentTaskTag; in tiINITaskManagement()
1285 currentTaskTag->tdData = TMtdIORequestBody; in tiINITaskManagement()
1288 agIORequest = &(TMtdIORequestBody->agIORequest); in tiINITaskManagement()
1289 agIORequest->osData = (void *) TMtdIORequestBody; in tiINITaskManagement()
1290 agIORequest->sdkData = agNULL; /* SA takes care of this */ in tiINITaskManagement()
1324 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiCOMPassthroughCmndStart()
1325 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiCOMPassthroughCmndStart()
1345 oneDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiCOMPassthroughCmndStart()
1353 if (tiPassthroughCmnd->passthroughCmnd != tiSMPCmnd || in tiCOMPassthroughCmndStart()
1354 tiPassthroughCmnd->passthroughCmnd != tiRMCCmnd) in tiCOMPassthroughCmndStart()
1360 if (oneDeviceData == agNULL && tiPassthroughCmnd->passthroughCmnd != tiSMPCmnd) in tiCOMPassthroughCmndStart()
1367 if (oneDeviceData->DeviceType == TD_SAS_DEVICE) in tiCOMPassthroughCmndStart()
1369 if (tiPassthroughCmnd->passthroughCmnd == tiSMPCmnd) in tiCOMPassthroughCmndStart()
1371 TI_DBG2(("tiCOMPassthroughCmndStart: SMP\n")); in tiCOMPassthroughCmndStart()
1374 tdsaPortStartInfo = (tdsaPortStartInfo_t *)tiportalContext->tdData; in tiCOMPassthroughCmndStart()
1375 tdsaPortContext = tdsaPortStartInfo->portContext; in tiCOMPassthroughCmndStart()
1376 agRoot = tdsaPortContext->agRoot; in tiCOMPassthroughCmndStart()
1380 agRoot = oneDeviceData->agRoot; in tiCOMPassthroughCmndStart()
1381 agDevHandle = oneDeviceData->agDevHandle; in tiCOMPassthroughCmndStart()
1385 tdssSMPRequestBody = &(tdPTCmndBody->protocol.SMP.SMPBody); in tiCOMPassthroughCmndStart()
1386 agSASRequestBody = &(tdssSMPRequestBody->agSASRequestBody); in tiCOMPassthroughCmndStart()
1387 agSMPFrame = &(agSASRequestBody->smpFrame); in tiCOMPassthroughCmndStart()
1390 tdPTCmndBody->EventCB = agEventCB; in tiCOMPassthroughCmndStart()
1393 tdPTCmndBody->tiPassthroughCmndType = tiSMPCmnd; in tiCOMPassthroughCmndStart()
1396 tdPTCmndBody->tiPassthroughRequest = tiPassthroughRequest; in tiCOMPassthroughCmndStart()
1397 tiPassthroughRequest->tdData = tdPTCmndBody; in tiCOMPassthroughCmndStart()
1400 tdPTCmndBody->tiDevHandle = tiDeviceHandle; in tiCOMPassthroughCmndStart()
1402 /* fill in SMP header */ in tiCOMPassthroughCmndStart()
1403 agSMPFrame->frameHeader.smpFrameType in tiCOMPassthroughCmndStart()
1404 = tiPassthroughCmnd->protocol.SMP.SMPHeader.smpFrameType; in tiCOMPassthroughCmndStart()
1405 agSMPFrame->frameHeader.smpFunction in tiCOMPassthroughCmndStart()
1406 = tiPassthroughCmnd->protocol.SMP.SMPHeader.smpFunction; in tiCOMPassthroughCmndStart()
1407 agSMPFrame->frameHeader.smpFunctionResult in tiCOMPassthroughCmndStart()
1408 = tiPassthroughCmnd->protocol.SMP.SMPHeader.smpFunctionResult; in tiCOMPassthroughCmndStart()
1409 agSMPFrame->frameHeader.smpReserved in tiCOMPassthroughCmndStart()
1410 = tiPassthroughCmnd->protocol.SMP.SMPHeader.smpReserved; in tiCOMPassthroughCmndStart()
1412 if (tiPassthroughCmnd->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1419 /* this is only for SMP target */ in tiCOMPassthroughCmndStart()
1420 agSMPFrame->phyId = tiPassthroughCmnd->protocol.SMP.phyID; in tiCOMPassthroughCmndStart()
1424 /* assumption: SMP payload is in tisgl1 */ in tiCOMPassthroughCmndStart()
1425 agSMPFrame->frameAddrUpper32 = tiPassthroughCmnd->tiSgl.upper; in tiCOMPassthroughCmndStart()
1426 agSMPFrame->frameAddrLower32 = tiPassthroughCmnd->tiSgl.lower; in tiCOMPassthroughCmndStart()
1428 /* This length excluding SMP header (4 bytes) and CRC field */ in tiCOMPassthroughCmndStart()
1429 agSMPFrame->frameLen = tiPassthroughCmnd->tiSgl.len; in tiCOMPassthroughCmndStart()
1434 tdIORequestBody = (tdIORequestBody_t *)agIORequest->osData; in tiCOMPassthroughCmndStart()
1436 agIORequest = &(tdssSMPRequestBody->agIORequest); in tiCOMPassthroughCmndStart()
1437 agIORequest->osData = (void *) tdPTCmndBody; in tiCOMPassthroughCmndStart()
1438 agIORequest->sdkData = agNULL; /* LL takes care of this */ in tiCOMPassthroughCmndStart()
1471 /* fill in SMP header */ in tiCOMPassthroughCmndStart()
1472 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1474 agSMPFrame->frameHeader.smpFrameType = SMP_REQUEST; /* SMP REQUEST */ in tiCOMPassthroughCmndStart()
1479 /* SMP target */ in tiCOMPassthroughCmndStart()
1480 agSMPFrame->frameHeader.smpFrameType = SMP_RESPONSE; /* SMP RESPONSE */ in tiCOMPassthroughCmndStart()
1482 switch (tdPTCmndBody->protocol.SMP.SMPFnResult) in tiCOMPassthroughCmndStart()
1519 …TI_DBG1(("tiCOMPassthroughCmndStart: unknown SMP function result %d\n", tdPTCmndBody->protocol.SMP… in tiCOMPassthroughCmndStart()
1522 agSMPFrame->frameHeader.smpFunctionResult = SMPFnResult; in tiCOMPassthroughCmndStart()
1526 switch (tdPTCmndBody->protocol.SMP.SMPFn) in tiCOMPassthroughCmndStart()
1530 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1542 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1554 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1566 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1578 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1590 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1602 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1614 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1626 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1638 if (tdPTCmndBody->protocol.SMP.IT == SMP_INITIATOR) in tiCOMPassthroughCmndStart()
1650 …TI_DBG1(("tiCOMPassthroughCmndStart: unknown SMP function %d\n", tdPTCmndBody->protocol.SMP.SMPFn)… in tiCOMPassthroughCmndStart()
1653 agSMPFrame->frameHeader.smpFunction = SMPFn; in tiCOMPassthroughCmndStart()
1656 /* assumption: SMP payload is in tisgl1 */ in tiCOMPassthroughCmndStart()
1657 agSMPFrame->frameAddrUpper32 = tdPTCmndBody->tiSgl.upper; in tiCOMPassthroughCmndStart()
1658 agSMPFrame->frameAddrLower32 = tdPTCmndBody->tiSgl.lower; in tiCOMPassthroughCmndStart()
1660 /* This length excluding SMP header (4 bytes) and CRC field */ in tiCOMPassthroughCmndStart()
1661 agSMPFrame->frameLen = SMPFrameLen; in tiCOMPassthroughCmndStart()
1672 else if (tiPassthroughCmnd->passthroughCmnd == tiRMCCmnd) in tiCOMPassthroughCmndStart()
1678 … TI_DBG1(("tiCOMPassthroughCmndStart: unknown protocol %d\n", tiPassthroughCmnd->passthroughCmnd)); in tiCOMPassthroughCmndStart()
1683 else if (oneDeviceData->DeviceType == TD_SATA_DEVICE) in tiCOMPassthroughCmndStart()
1690 …TI_DBG1(("tiCOMPassthroughCmndStart: error !!! unknown devietype %d\n", oneDeviceData->DeviceType)… in tiCOMPassthroughCmndStart()
1705 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiCOMPassthroughCmndAbort()
1706 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiCOMPassthroughCmndAbort()
1715 agRoot = &(tdsaAllShared->agRootNonInt); in tiCOMPassthroughCmndAbort()
1716 tdPTCmndBody = (tdPassthroughCmndBody_t *)taskTag->tdData; in tiCOMPassthroughCmndAbort()
1718 if (tdPTCmndBody->tiPassthroughCmndType == tiSMPCmnd) in tiCOMPassthroughCmndAbort()
1720 tdssSMPRequestBody = &(tdPTCmndBody->protocol.SMP.SMPBody); in tiCOMPassthroughCmndAbort()
1721 agIORequest = &(tdssSMPRequestBody->agIORequest); in tiCOMPassthroughCmndAbort()
1742 else if (tdPTCmndBody->tiPassthroughCmndType == tiRMCCmnd) in tiCOMPassthroughCmndAbort()
1749 …TI_DBG1(("tiCOMPassthroughCmndAbort: unknown passthrough command type %d\n", tdPTCmndBody->tiPasst… in tiCOMPassthroughCmndAbort()
1767 for SMP, nothing. Can't abot remotely in tiINIPassthroughCmndRemoteAbort()
1790 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiCOMShutDown()
1791 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiCOMShutDown()
1805 agRoot = &(tdsaAllShared->agRootNonInt); in tiCOMShutDown()
1814 tdsaFreeCardID(tiRoot, tdsaAllShared->CardID); in tiCOMShutDown()
1819 forensicData.dataBuf.directOffset = 0; /* current offset */ in tiCOMShutDown()
1878 * \param outboundChannelNum: Zero-base channel number
1883 * \note - The scope is shared target and initiator.
1894 tdsaRootOsData_t *osData = (tdsaRootOsData_t *) (agRoot->osData); in ossaDisableInterrupts()
1897 osData->tiRoot, in ossaDisableInterrupts()
1914 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tiCOMFrameReadBlock()
1915 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tiCOMFrameReadBlock()
1921 agRoot = &(tdsaAllShared->agRootNonInt); in tiCOMFrameReadBlock()
1970 oneDeviceData = (tdsaDeviceData_t *)tiDeviceHandle->tdData; in tiINITransportRecovery()
1979 if (oneDeviceData->valid != agTRUE || oneDeviceData->registered != agTRUE || in tiINITransportRecovery()
1980 oneDeviceData->tdPortContext == agNULL ) in tiINITransportRecovery()
1982 TI_DBG1(("tiINITransportRecovery: NO Device did %d\n", oneDeviceData->id )); in tiINITransportRecovery()
1983 …TI_DBG1(("tiINITransportRecovery: device AddrHi 0x%08x\n", oneDeviceData->SASAddressID.sasAddressH… in tiINITransportRecovery()
1984 …TI_DBG1(("tiINITransportRecovery: device AddrLo 0x%08x\n", oneDeviceData->SASAddressID.sasAddressL… in tiINITransportRecovery()
1988 onePortContext = oneDeviceData->tdPortContext; in tiINITransportRecovery()
1996 tiPortalContext = onePortContext->tiPortalContext; in tiINITransportRecovery()
1997 currentTaskTag = &(oneDeviceData->TransportRecoveryIO); in tiINITransportRecovery()
1998 currentTaskTag->osData = agNULL; in tiINITransportRecovery()
1999 agRoot = oneDeviceData->agRoot; in tiINITransportRecovery()
2000 agDevHandle = oneDeviceData->agDevHandle; in tiINITransportRecovery()
2002 if (oneDeviceData->DeviceType == TD_SAS_DEVICE) in tiINITransportRecovery()
2005 currentTaskTag->tdData = oneDeviceData; in tiINITransportRecovery()
2006 agContext = &(oneDeviceData->agDeviceResetContext); in tiINITransportRecovery()
2007 agContext->osData = currentTaskTag; in tiINITransportRecovery()
2008 oneDeviceData->TRflag = agTRUE; in tiINITransportRecovery()
2013 if (oneDeviceData->directlyAttached == agTRUE) in tiINITransportRecovery()
2016 …saLocalPhyControl(agRoot, agContext, tdsaRotateQnumber(tiRoot, oneDeviceData), oneDeviceData->phyI… in tiINITransportRecovery()
2046 else if (oneDeviceData->DeviceType == TD_SATA_DEVICE) in tiINITransportRecovery()
2049 currentTaskTag->tdData = oneDeviceData; in tiINITransportRecovery()
2050 agContext = &(oneDeviceData->agDeviceResetContext); in tiINITransportRecovery()
2051 agContext->osData = currentTaskTag; in tiINITransportRecovery()
2052 oneDeviceData->TRflag = agTRUE; in tiINITransportRecovery()
2057 if (oneDeviceData->directlyAttached == agTRUE) in tiINITransportRecovery()
2060 …saLocalPhyControl(agRoot, agContext, tdsaRotateQnumber(tiRoot, oneDeviceData), oneDeviceData->phyI… in tiINITransportRecovery()
2092 TI_DBG1(("tiINITransportRecovery: wrong device type %d\n", oneDeviceData->DeviceType)); in tiINITransportRecovery()
2110 * \param queueNumber: bits 0-15: inbound queue number.
2111 * bits 16-31: outbound queue number.
2148 * \param queueNumber: bits 0-15: inbound queue number.
2149 * bits 16-31: outbound queue number.
2187 * \param queueNumber: bits 0-15: inbound queue number.
2188 * bits 16-31: outbound queue number.
2220 agRoot = oneDeviceData->agRoot; in tdsaPhyControlSend()
2221 onePortContext = oneDeviceData->tdPortContext; in tdsaPhyControlSend()
2222 oneExpDeviceData = oneDeviceData->ExpDevice; in tdsaPhyControlSend()
2223 phyID = oneDeviceData->phyID; in tdsaPhyControlSend()
2225 if (oneDeviceData->directlyAttached == agTRUE) in tdsaPhyControlSend()
2254 …TI_DBG3(("tdsaPhyControlSend: target device AddrHi 0x%08x\n", oneDeviceData->SASAddressID.sasAddre… in tdsaPhyControlSend()
2255 …TI_DBG3(("tdsaPhyControlSend: target device AddrLo 0x%08x\n", oneDeviceData->SASAddressID.sasAddre… in tdsaPhyControlSend()
2256 …TI_DBG3(("tdsaPhyControlSend: expander AddrHi 0x%08x\n", oneExpDeviceData->SASAddressID.sasAddress… in tdsaPhyControlSend()
2257 …TI_DBG3(("tdsaPhyControlSend: expander AddrLo 0x%08x\n", oneExpDeviceData->SASAddressID.sasAddress… in tdsaPhyControlSend()
2258 …PhyControlSend: did %d expander did %d phyid %d\n", oneDeviceData->id, oneExpDeviceData->id, phyID… in tdsaPhyControlSend()
2263 /* fill in SMP payload */ in tdsaPhyControlSend()
2291 * \param frameHeader: Pointer to SMP frame header.
2320 …TI_DBG3(("tdsaPhyControlFailureRespRcvd: expander device AddrHi 0x%08x\n", oneDeviceData->SASAddre… in tdsaPhyControlFailureRespRcvd()
2321 …TI_DBG3(("tdsaPhyControlFailureRespRcvd: expander device AddrLo 0x%08x\n", oneDeviceData->SASAddre… in tdsaPhyControlFailureRespRcvd()
2327 TargetDeviceData = (tdsaDeviceData_t *)CurrentTaskTag->tdData; in tdsaPhyControlFailureRespRcvd()
2330 pSatDevData = (satDeviceData_t *)&(TargetDeviceData->satDevData); in tdsaPhyControlFailureRespRcvd()
2332 // agDevHandle = TargetDeviceData->agDevHandle; in tdsaPhyControlFailureRespRcvd()
2333 …TI_DBG2(("tdsaPhyControlFailureRespRcvd: target AddrHi 0x%08x\n", TargetDeviceData->SASAddressID.s… in tdsaPhyControlFailureRespRcvd()
2334 …TI_DBG2(("tdsaPhyControlFailureRespRcvd: target AddrLo 0x%08x\n", TargetDeviceData->SASAddressID.s… in tdsaPhyControlFailureRespRcvd()
2337 …ailureRespRcvd: satPendingIO %d satNCQMaxIO %d\n", pSatDevData->satPendingIO, pSatDevData->satNCQM… in tdsaPhyControlFailureRespRcvd()
2338 …cvd: satPendingNCQIO %d satPendingNONNCQIO %d\n", pSatDevData->satPendingNCQIO, pSatDevData->satPe… in tdsaPhyControlFailureRespRcvd()
2346 if (TargetDeviceData->TRflag == agTRUE) in tdsaPhyControlFailureRespRcvd()
2348 TargetDeviceData->TRflag = agFALSE; in tdsaPhyControlFailureRespRcvd()
2350 TargetDeviceData->tdPortContext->tiPortalContext, in tdsaPhyControlFailureRespRcvd()
2351 &(TargetDeviceData->tiDeviceHandle), in tdsaPhyControlFailureRespRcvd()
2379 * \param frameHeader: Pointer to SMP frame header.
2409 …TI_DBG3(("tdsaPhyControlRespRcvd: expander device AddrHi 0x%08x\n", oneDeviceData->SASAddressID.sa… in tdsaPhyControlRespRcvd()
2410 …TI_DBG3(("tdsaPhyControlRespRcvd: expander device AddrLo 0x%08x\n", oneDeviceData->SASAddressID.sa… in tdsaPhyControlRespRcvd()
2416 TargetDeviceData = (tdsaDeviceData_t *)CurrentTaskTag->tdData; in tdsaPhyControlRespRcvd()
2419 pSatDevData = (satDeviceData_t *)&(TargetDeviceData->satDevData); in tdsaPhyControlRespRcvd()
2420 agDevHandle = TargetDeviceData->agDevHandle; in tdsaPhyControlRespRcvd()
2422 …TI_DBG2(("tdsaPhyControlRespRcvd: target AddrHi 0x%08x\n", TargetDeviceData->SASAddressID.sasAddre… in tdsaPhyControlRespRcvd()
2423 …TI_DBG2(("tdsaPhyControlRespRcvd: target AddrLo 0x%08x\n", TargetDeviceData->SASAddressID.sasAddre… in tdsaPhyControlRespRcvd()
2426 …ontrolRespRcvd: satPendingIO %d satNCQMaxIO %d\n", pSatDevData->satPendingIO, pSatDevData->satNCQM… in tdsaPhyControlRespRcvd()
2427 …cvd: satPendingNCQIO %d satPendingNONNCQIO %d\n", pSatDevData->satPendingNCQIO, pSatDevData->satPe… in tdsaPhyControlRespRcvd()
2433 if (frameHeader->smpFunctionResult == SMP_FUNCTION_ACCEPTED) in tdsaPhyControlRespRcvd()
2435 TI_DBG3(("tdsaPhyControlRespRcvd: SMP success\n")); in tdsaPhyControlRespRcvd()
2443 pSatDevData->satDriveState = SAT_DEV_STATE_NORMAL; in tdsaPhyControlRespRcvd()
2446 if (TargetDeviceData->TRflag == agTRUE) in tdsaPhyControlRespRcvd()
2448 TargetDeviceData->TRflag = agFALSE; in tdsaPhyControlRespRcvd()
2450 TargetDeviceData->tdPortContext->tiPortalContext, in tdsaPhyControlRespRcvd()
2451 &(TargetDeviceData->tiDeviceHandle), in tdsaPhyControlRespRcvd()
2459 agDevHandle = TargetDeviceData->agDevHandle; in tdsaPhyControlRespRcvd()
2476 TI_DBG1(("tdsaPhyControlRespRcvd: SMP failure; result %d\n", frameHeader->smpFunctionResult)); in tdsaPhyControlRespRcvd()
2482 if (TargetDeviceData->TRflag == agTRUE) in tdsaPhyControlRespRcvd()
2484 TargetDeviceData->TRflag = agFALSE; in tdsaPhyControlRespRcvd()
2486 TargetDeviceData->tdPortContext->tiPortalContext, in tdsaPhyControlRespRcvd()
2487 &(TargetDeviceData->tiDeviceHandle), in tdsaPhyControlRespRcvd()
2547 TI_DBG3(("tdsaAbortAll: did %d\n", oneDeviceData->id)); in ttdsaAbortAll()
2576 tdAbortIORequestBody->IOType.InitiatorTMIO.osMemHandle = osMemHandle; in ttdsaAbortAll()
2579 tdAbortIORequestBody->IOCompletionFunc = ttdssIOAbortedHandler; in ttdsaAbortAll()
2581 tdAbortIORequestBody->tiDevHandle = (tiDeviceHandle_t *)&(oneDeviceData->tiDeviceHandle); in ttdsaAbortAll()
2584 agAbortIORequest = &(tdAbortIORequestBody->agIORequest); in ttdsaAbortAll()
2585 agAbortIORequest->osData = (void *) tdAbortIORequestBody; in ttdsaAbortAll()
2586 agAbortIORequest->sdkData = agNULL; /* LL takes care of this */ in ttdsaAbortAll()
2592 oneDeviceData->agDevHandle, in ttdsaAbortAll()
2608 tdsaRoot_t *tdsaRoot = (tdsaRoot_t *) tiRoot->tdData; in tdsaDeregisterDevicesInPort()
2609 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared; in tdsaDeregisterDevicesInPort()
2614 agRoot = &(tdsaAllShared->agRootNonInt); in tdsaDeregisterDevicesInPort()
2619 DeviceListList = tdsaAllShared->MainDeviceList.flink; in tdsaDeregisterDevicesInPort()
2620 while (DeviceListList != &(tdsaAllShared->MainDeviceList)) in tdsaDeregisterDevicesInPort()
2628 if (oneDeviceData->tdPortContext == onePortContext) in tdsaDeregisterDevicesInPort()
2630 …BG3(("tdsaDeregisterDevicesInPort: Found pid %d did %d\n", onePortContext->id, oneDeviceData->id)); in tdsaDeregisterDevicesInPort()
2631 if ( !( DEVICE_IS_SMP_TARGET(oneDeviceData) && oneDeviceData->directlyAttached == agTRUE)) in tdsaDeregisterDevicesInPort()
2633 …saDeregisterDeviceHandle(agRoot, agNULL, oneDeviceData->agDevHandle, tdsaRotateQnumber(tiRoot, one… in tdsaDeregisterDevicesInPort()
2638 oneDeviceData->registered = agTRUE; in tdsaDeregisterDevicesInPort()
2641 DeviceListList = DeviceListList->flink; in tdsaDeregisterDevicesInPort()
2662 TI_DBG6(("SwConfig->maxActiveIOs %d\n", SwConfig->maxActiveIOs)); in tdsaPrintSwConfig()
2663 TI_DBG6(("SwConfig->smpReqTimeout %d\n", SwConfig->smpReqTimeout)); in tdsaPrintSwConfig()
2682 TI_DBG6(("HwConfig->phyCount %d\n", HwConfig->phyCount)); in tdsaPrintHwConfig()
2699 TI_DBG6(("SASID->sspTargetPort %d\n", SA_IDFRM_IS_SSP_TARGET(id)?1:0)); in tdssPrintSASIdentify()
2700 TI_DBG6(("SASID->stpTargetPort %d\n", SA_IDFRM_IS_STP_TARGET(id)?1:0)); in tdssPrintSASIdentify()
2701 TI_DBG6(("SASID->smpTargetPort %d\n", SA_IDFRM_IS_SMP_TARGET(id)?1:0)); in tdssPrintSASIdentify()
2702 TI_DBG6(("SASID->sspInitiatorPort %d\n", SA_IDFRM_IS_SSP_INITIATOR(id)?1:0)); in tdssPrintSASIdentify()
2703 TI_DBG6(("SASID->stpInitiatorPort %d\n", SA_IDFRM_IS_STP_INITIATOR(id)?1:0)); in tdssPrintSASIdentify()
2704 TI_DBG6(("SASID->smpInitiatorPort %d\n", SA_IDFRM_IS_SMP_INITIATOR(id)?1:0)); in tdssPrintSASIdentify()
2705 TI_DBG6(("SASID->deviceType %d\n", SA_IDFRM_GET_DEVICETTYPE(id))); in tdssPrintSASIdentify()
2706 TI_DBG6(("SASID->sasAddressHi 0x%x\n", SA_IDFRM_GET_SAS_ADDRESSHI(id))); in tdssPrintSASIdentify()
2707 TI_DBG6(("SASID->sasAddressLo 0x%x\n", SA_IDFRM_GET_SAS_ADDRESSLO(id))); in tdssPrintSASIdentify()
2708 TI_DBG6(("SASID->phyIdentifier 0x%x\n", id->phyIdentifier)); in tdssPrintSASIdentify()
2776 TI_DBG6(("flist ele %d\n", ele1->id)); in print_tdlist_flink()
2778 hdr_tmp1 = hdr_tmp1->flink; in print_tdlist_flink()
2795 TI_DBG6(("flist ele %d\n", ele2->id)); in print_tdlist_flink()
2798 hdr_tmp1 = hdr_tmp1->flink; in print_tdlist_flink()
2826 TI_DBG6(("blist ele %d\n", ele1->id)); in print_tdlist_blink()
2829 hdr_tmp1 = hdr_tmp1->blink; in print_tdlist_blink()
2838 TI_DBG2(("%s - hexdump(len=%d):\n", ptitle, (int)len)); in tdhexdump()
2846 if (len - i > 4) in tdhexdump()
2864 bit32 offset = 0; in tdsaSingleThreadedEnter() local
2866 tiroot = ptiRoot->tdData; in tdsaSingleThreadedEnter()
2868 offset = tiroot->tdsaAllShared.MaxNumLLLocks + tiroot->tdsaAllShared.MaxNumOSLocks; in tdsaSingleThreadedEnter()
2870 ostiSingleThreadedEnter(ptiRoot, queueId + offset); in tdsaSingleThreadedEnter()
2877 bit32 offset = 0; in tdsaSingleThreadedLeave() local
2880 tiroot = ptiRoot->tdData; in tdsaSingleThreadedLeave()
2882 offset = tiroot->tdsaAllShared.MaxNumLLLocks + tiroot->tdsaAllShared.MaxNumOSLocks; in tdsaSingleThreadedLeave()
2884 ostiSingleThreadedLeave(ptiRoot, queueId + offset); in tdsaSingleThreadedLeave()