• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/pms/RefTisa/tisa/sassata/common/

Lines Matching defs:tdsaAllShared

128   tdsaContext_t  *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
149 char *cardNum = tdsaAllShared->CardIDString;
165 TI_DBG6(("tdsaGetSwConfigParams: tdsaRoot %p tdsaAllShared %p \n",tdsaRoot, tdsaAllShared));
173 SwConfig = (agsaSwConfig_t *)&(tdsaAllShared->SwConfig);
174 QueueConfig = (agsaQueueConfig_t *)&(tdsaAllShared->QueueConfig);
177 dmSwConfig = (dmSwConfig_t *)&(tdsaAllShared->dmSwConfig);
180 smSwConfig = (smSwConfig_t *)&(tdsaAllShared->smSwConfig);
208 SwConfig->param1 = tdsaAllShared->tdDeviceIdVendId;
209 SwConfig->param2 = tdsaAllShared->tdSubVendorId;
222 tdsaAllShared->portTMO = PORT_RECOVERY_TIMEOUT; /* default 5 sec */
223 tdsaAllShared->stp_idle_time = STP_IDLE_TIME; /* default 5 us */
224 tdsaAllShared->itNexusTimeout = IT_NEXUS_TIMEOUT; /* default 2000 ms */
335 tdsaAllShared->QueueOption = DEFAULT_QUEUE_OPTION; /* default 0 Outbound queue element */
353 tdsaAllShared->QueueOption = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
357 tdsaAllShared->QueueOption = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
561 tdsaAllShared->InboundQueueSize[i] = DEFAULT_INBOUND_QUEUE_SIZE; /* default 256 Inbound queue size */
579 tdsaAllShared->InboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
583 tdsaAllShared->InboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
584 TI_DBG6(("tdsaGetSwConfigParams: queue number %d IB queue size %d\n", i, tdsaAllShared->InboundQueueSize[i]));
596 tdsaAllShared->InboundQueueEleSize[i] = DEFAULT_INBOUND_QUEUE_ELE_SIZE; /* default 128 Inbound queue element */
614 tdsaAllShared->InboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
618 tdsaAllShared->InboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
619 TI_DBG6(("tdsaGetSwConfigParams: queue number %d IB queue ele size %d\n", i, tdsaAllShared->InboundQueueEleSize[i]));
630 tdsaAllShared->InboundQueuePriority[i] = DEFAULT_INBOUND_QUEUE_PRIORITY; /* default 0 Inbound queue priority */
648 tdsaAllShared->InboundQueuePriority[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
652 tdsaAllShared->InboundQueuePriority[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
653 TI_DBG6(("tdsaGetSwConfigParams: queue number %d priority %d\n", i, tdsaAllShared->InboundQueuePriority[i]));
682 tdsaAllShared->OutboundQueueSize[i] = DEFAULT_OUTBOUND_QUEUE_SIZE; /* default 256 Outbound queue size */
700 tdsaAllShared->OutboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
704 tdsaAllShared->OutboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
705 TI_DBG6(("tdsaGetSwConfigParams: queue number %d OB queue size %d\n", i, tdsaAllShared->OutboundQueueSize[i]));
718 tdsaAllShared->OutboundQueueEleSize[i] = DEFAULT_OUTBOUND_QUEUE_ELE_SIZE; /* default 128 Outbound queue element */
736 tdsaAllShared->OutboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
740 tdsaAllShared->OutboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
741 TI_DBG6(("tdsaGetSwConfigParams: queue number %d OB queue ele size %d\n", i, tdsaAllShared->OutboundQueueEleSize[i]));
754 tdsaAllShared->OutboundQueueInterruptDelay[i] = DEFAULT_OUTBOUND_QUEUE_INTERRUPT_DELAY; /* default 1 Outbound interrupt delay */
772 tdsaAllShared->OutboundQueueInterruptDelay[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
776 tdsaAllShared->OutboundQueueInterruptDelay[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
777 TI_DBG6(("tdsaGetSwConfigParams: queue number %d interrupt delay %d\n", i, tdsaAllShared->OutboundQueueInterruptDelay[i]));
789 tdsaAllShared->OutboundQueueInterruptCount[i] = DEFAULT_OUTBOUND_QUEUE_INTERRUPT_COUNT; /* default 1 Outbound interrupt count */
807 tdsaAllShared->OutboundQueueInterruptCount[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
811 tdsaAllShared->OutboundQueueInterruptCount[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
812 TI_DBG6(("tdsaGetSwConfigParams: queue number %d interrupt count %d\n", i, tdsaAllShared->OutboundQueueInterruptCount[i]));
824 tdsaAllShared->OutboundQueueInterruptEnable[i] = DEFAULT_OUTBOUND_INTERRUPT_ENABLE; /* default 1 Outbound interrupt is enabled */
842 tdsaAllShared->OutboundQueueInterruptEnable[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
846 tdsaAllShared->OutboundQueueInterruptEnable[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
847 TI_DBG6(("tdsaGetSwConfigParams: queue number %d interrupt enable %d\n", i, tdsaAllShared->OutboundQueueInterruptEnable[i]));
893 tdsaAllShared->InboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
897 tdsaAllShared->InboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
898 TI_DBG6(("tdsaGetSwConfigParams: queue number %d IB queue size %d\n", i, tdsaAllShared->InboundQueueSize[i]));
925 tdsaAllShared->InboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
929 tdsaAllShared->InboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
930 TI_DBG6(("tdsaGetSwConfigParams: queue number %d IB queue ele size %d\n", i, tdsaAllShared->InboundQueueEleSize[i]));
957 tdsaAllShared->InboundQueuePriority[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
961 tdsaAllShared->InboundQueuePriority[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
962 TI_DBG6(("tdsaGetSwConfigParams: card number %s queue number %d priority %d\n", cardNum, i, tdsaAllShared->InboundQueuePriority[i]));
1006 tdsaAllShared->OutboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
1010 tdsaAllShared->OutboundQueueSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
1011 TI_DBG6(("tdsaGetSwConfigParams: queue number %d OB queue size %d\n", i, tdsaAllShared->OutboundQueueSize[i]));
1039 tdsaAllShared->OutboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
1043 tdsaAllShared->OutboundQueueEleSize[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
1044 TI_DBG6(("tdsaGetSwConfigParams: queue number %d OB queue ele size %d\n", i, tdsaAllShared->OutboundQueueEleSize[i]));
1072 tdsaAllShared->OutboundQueueInterruptDelay[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
1076 tdsaAllShared->OutboundQueueInterruptDelay[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
1077 TI_DBG6(("tdsaGetSwConfigParams: card number %s queue number %d interrupt delay %d\n", cardNum, i, tdsaAllShared->OutboundQueueInterruptDelay[i]));
1105 tdsaAllShared->OutboundQueueInterruptCount[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
1109 tdsaAllShared->OutboundQueueInterruptCount[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
1110 TI_DBG6(("tdsaGetSwConfigParams: card number %s queue number %d interrupt count %d\n", cardNum, i, tdsaAllShared->OutboundQueueInterruptCount[i]));
1138 tdsaAllShared->OutboundQueueInterruptEnable[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 0);
1142 tdsaAllShared->OutboundQueueInterruptEnable[i] = (bit16) osti_strtoul (buffer, &pLastUsedChar, 10);
1143 TI_DBG6(("tdsaGetSwConfigParams: card number %s queue number %d interrupt enable %d\n", cardNum, i, tdsaAllShared->OutboundQueueInterruptEnable[i]));
1427 tdsaAllShared->portTMO = osti_strtoul (buffer, &pLastUsedChar, 0);
1431 tdsaAllShared->portTMO = osti_strtoul (buffer, &pLastUsedChar, 10);
1498 tdsaAllShared->SASConnectTimeLimit = 0;
1515 tdsaAllShared->SASConnectTimeLimit = osti_strtoul (buffer, &pLastUsedChar, 0);
1517 tdsaAllShared->SASConnectTimeLimit = osti_strtoul (buffer, &pLastUsedChar, 10);
1525 tdsaAllShared->FCA = 1; /* No FCA by default */
1543 tdsaAllShared->FCA = osti_strtoul (buffer, &pLastUsedChar, 0);
1547 tdsaAllShared->FCA = osti_strtoul (buffer, &pLastUsedChar, 10);
1556 tdsaAllShared->ResetInDiscovery = 0; /* No ResetInDiscovery by default */
1574 tdsaAllShared->ResetInDiscovery = osti_strtoul (buffer, &pLastUsedChar, 0);
1578 tdsaAllShared->ResetInDiscovery = osti_strtoul (buffer, &pLastUsedChar, 10);
1587 tdsaAllShared->MCN = 1; /* default MCN */
1605 tdsaAllShared->MCN = osti_strtoul (buffer, &pLastUsedChar, 0);
1609 tdsaAllShared->MCN = osti_strtoul (buffer, &pLastUsedChar, 10);
1611 TI_DBG6(("tdsaGetSwConfigParams: MCN %d\n", tdsaAllShared->MCN));
1619 tdsaAllShared->sflag = 0; /* default sflag */
1637 tdsaAllShared->sflag = osti_strtoul (buffer, &pLastUsedChar, 0);
1641 tdsaAllShared->sflag = osti_strtoul (buffer, &pLastUsedChar, 10);
1643 TI_DBG1(("tdsaGetSwConfigParams: sflag %d\n", tdsaAllShared->sflag));
1729 tdsaAllShared->RateAdjust = 0; /* No rate adjust by default */
1746 tdsaAllShared->RateAdjust = osti_strtoul (buffer, &pLastUsedChar, 0);
1750 tdsaAllShared->RateAdjust = osti_strtoul (buffer, &pLastUsedChar, 10);
1752 TI_DBG6(("tdsaGetSwConfigParams: tdsaAllShared->RateAdjust %d\n", tdsaAllShared->RateAdjust));
1818 tdsaAllShared->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 0);
1822 tdsaAllShared->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 10);
1824 TI_DBG1(("tdsaGetSwConfigParams: tdsaAllShared->itNexusTimeout %d\n", tdsaAllShared->itNexusTimeout));
1848 tdsaAllShared->stp_idle_time = osti_strtoul (buffer, &pLastUsedChar, 0);
1852 tdsaAllShared->stp_idle_time = osti_strtoul (buffer, &pLastUsedChar, 10);
1854 TI_DBG2(("tdsaGetSwConfigParams: STPIdleTime %d\n", tdsaAllShared->stp_idle_time));
1862 tdsaAllShared->STP_MCT_TMO = 32;
1879 tdsaAllShared->STP_MCT_TMO = osti_strtoul (buffer, &pLastUsedChar, 0);
1883 tdsaAllShared->STP_MCT_TMO = osti_strtoul (buffer, &pLastUsedChar, 10);
1885 TI_DBG2(("tdsaGetSwConfigParams: STP_MCT_TMO %d\n", tdsaAllShared->STP_MCT_TMO));
1892 tdsaAllShared->SSP_MCT_TMO = 32;
1909 tdsaAllShared->SSP_MCT_TMO = osti_strtoul (buffer, &pLastUsedChar, 0);
1913 tdsaAllShared->SSP_MCT_TMO = osti_strtoul (buffer, &pLastUsedChar, 10);
1915 TI_DBG2(("tdsaGetSwConfigParams: SSP_MCT_TMO %d\n", tdsaAllShared->SSP_MCT_TMO));
1923 tdsaAllShared->MAX_OPEN_TIME = 5;
1940 tdsaAllShared->MAX_OPEN_TIME = osti_strtoul (buffer, &pLastUsedChar, 0);
1944 tdsaAllShared->MAX_OPEN_TIME = osti_strtoul (buffer, &pLastUsedChar, 10);
1946 TI_DBG2(("tdsaGetSwConfigParams: MAX_OPEN_TIME %d\n", tdsaAllShared->MAX_OPEN_TIME));
1954 tdsaAllShared->SMP_MAX_CONN_TIMER = 0xFF;
1971 tdsaAllShared->SMP_MAX_CONN_TIMER = osti_strtoul (buffer, &pLastUsedChar, 0);
1975 tdsaAllShared->SMP_MAX_CONN_TIMER = osti_strtoul (buffer, &pLastUsedChar, 10);
1977 TI_DBG2(("tdsaGetSwConfigParams: SMP_MAX_CONN_TIMER %d\n", tdsaAllShared->SMP_MAX_CONN_TIMER));
1984 tdsaAllShared->STP_FRM_TMO = 0;
2001 tdsaAllShared->STP_FRM_TMO = osti_strtoul (buffer, &pLastUsedChar, 0);
2005 tdsaAllShared->STP_FRM_TMO = osti_strtoul (buffer, &pLastUsedChar, 10);
2007 TI_DBG2(("tdsaGetSwConfigParams: STP_FRM_TMO %d\n", tdsaAllShared->STP_FRM_TMO));
2014 tdsaAllShared->MFD = 1; /* disabled by default */
2031 tdsaAllShared->MFD = osti_strtoul (buffer, &pLastUsedChar, 0);
2035 tdsaAllShared->MFD = osti_strtoul (buffer, &pLastUsedChar, 10);
2037 TI_DBG2(("tdsaGetSwConfigParams: MFD %d\n", tdsaAllShared->MFD));
2044 tdsaAllShared->OPNRJT_RTRY_INTVL = 2;
2061 tdsaAllShared->OPNRJT_RTRY_INTVL = osti_strtoul (buffer, &pLastUsedChar, 0);
2065 tdsaAllShared->OPNRJT_RTRY_INTVL = osti_strtoul (buffer, &pLastUsedChar, 10);
2067 TI_DBG2(("tdsaGetSwConfigParams: OPNRJT_RTRY_INTVL %d\n", tdsaAllShared->OPNRJT_RTRY_INTVL));
2074 tdsaAllShared->DOPNRJT_RTRY_TMO = 128;
2091 tdsaAllShared->DOPNRJT_RTRY_TMO = osti_strtoul (buffer, &pLastUsedChar, 0);
2095 tdsaAllShared->DOPNRJT_RTRY_TMO = osti_strtoul (buffer, &pLastUsedChar, 10);
2097 TI_DBG2(("tdsaGetSwConfigParams: DOPNRJT_RTRY_TMO %d\n", tdsaAllShared->DOPNRJT_RTRY_TMO));
2104 // tdsaAllShared->COPNRJT_RTRY_TMO = 32;
2105 tdsaAllShared->COPNRJT_RTRY_TMO = 128;
2122 tdsaAllShared->COPNRJT_RTRY_TMO = osti_strtoul (buffer, &pLastUsedChar, 0);
2126 tdsaAllShared->COPNRJT_RTRY_TMO = osti_strtoul (buffer, &pLastUsedChar, 10);
2128 TI_DBG2(("tdsaGetSwConfigParams: COPNRJT_RTRY_TMO %d\n", tdsaAllShared->COPNRJT_RTRY_TMO));
2135 // tdsaAllShared->DOPNRJT_RTRY_THR = 16; /* FW default */
2138 Assuming a bigger value 3 second, 3000000/128 = 23437.5 where 128 is tdsaAllShared->DOPNRJT_RTRY_TMO
2140 tdsaAllShared->DOPNRJT_RTRY_THR = 23438;
2157 tdsaAllShared->DOPNRJT_RTRY_THR = osti_strtoul (buffer, &pLastUsedChar, 0);
2161 tdsaAllShared->DOPNRJT_RTRY_THR = osti_strtoul (buffer, &pLastUsedChar, 10);
2163 TI_DBG2(("tdsaGetSwConfigParams: DOPNRJT_RTRY_THR %d\n", tdsaAllShared->DOPNRJT_RTRY_THR));
2170 // tdsaAllShared->COPNRJT_RTRY_THR = 1024; /* FW default */
2173 Assuming a bigger value 3 second, 3000000/128 = 23437.5 where 128 is tdsaAllShared->COPNRJT_RTRY_TMO
2175 tdsaAllShared->COPNRJT_RTRY_THR = 23438;
2192 tdsaAllShared->COPNRJT_RTRY_THR = osti_strtoul (buffer, &pLastUsedChar, 0);
2196 tdsaAllShared->COPNRJT_RTRY_THR = osti_strtoul (buffer, &pLastUsedChar, 10);
2198 TI_DBG2(("tdsaGetSwConfigParams: COPNRJT_RTRY_THR %d\n", tdsaAllShared->COPNRJT_RTRY_THR));
2205 tdsaAllShared->MAX_AIP = 0x200000;
2222 tdsaAllShared->MAX_AIP = osti_strtoul (buffer, &pLastUsedChar, 0);
2226 tdsaAllShared->MAX_AIP = osti_strtoul (buffer, &pLastUsedChar, 10);
2228 TI_DBG2(("tdsaGetSwConfigParams: MAX_AIP %d\n", tdsaAllShared->MAX_AIP));
2286 tdsaRoot->tdsaAllShared.MpiOverride.MPITableType = 0xFF;
2287 tdsaRoot->tdsaAllShared.MpiOverride.offset = 0;
2288 tdsaRoot->tdsaAllShared.MpiOverride.value = 0;
2290 SwConfig->mpiContextTable = &(tdsaRoot->tdsaAllShared.MpiOverride);
2320 tdsaRoot->tdsaAllShared.MpiOverride.MPITableType = osti_strtoul (buffer, &pLastUsedChar, 0);
2324 tdsaRoot->tdsaAllShared.MpiOverride.MPITableType = osti_strtoul (buffer, &pLastUsedChar, 10);
2326 TI_DBG1(("tdsaGetSwConfigParams: MpiOverride.MPITableType 0x%X\n",tdsaRoot->tdsaAllShared.MpiOverride.MPITableType ));
2345 tdsaRoot->tdsaAllShared.MpiOverride.offset = osti_strtoul (buffer, &pLastUsedChar, 0);
2349 tdsaRoot->tdsaAllShared.MpiOverride.offset = osti_strtoul (buffer, &pLastUsedChar, 10);
2352 TI_DBG1(("tdsaGetSwConfigParams: MpiOverride.offset 0x%X\n",tdsaRoot->tdsaAllShared.MpiOverride.offset ));
2371 tdsaRoot->tdsaAllShared.MpiOverride.value = osti_strtoul (buffer, &pLastUsedChar, 0);
2375 tdsaRoot->tdsaAllShared.MpiOverride.value = osti_strtoul (buffer, &pLastUsedChar, 10);
2377 TI_DBG1(("tdsaGetSwConfigParams: MpiOverride.value 0x%X\n",tdsaRoot->tdsaAllShared.MpiOverride.value ));
2423 TI_DBG1(("tdsaGetSwConfigParams: SwConfig->PCI_trigger 0x%x 0x%x\n",SwConfig->PCI_trigger, tdsaRoot->itdsaIni->tdsaAllShared->SwConfig.PCI_trigger));
2429 tdsaAllShared->SASConnectTimeLimit));
2462 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
2475 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x1;
2479 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x2;
2483 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x4;
2487 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x8;
2492 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = 0;
2493 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x1;
2494 TI_DBG1(("tdsaParseLinkRateMode: LinkRate == 0 || LinkRate >= 0x%x\n",tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2505 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x10;
2509 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x20;
2514 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties & 0xf;
2515 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | 0x30;
2517 TI_DBG2(("tdsaParseLinkRateMode:1 index 0x%x Mode 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2523 agsaRoot_t *agRoot = &tdsaAllShared->agRootInt;
2527 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode 0 phy %d phyProperties 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2533 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode 1 phy %d phyProperties 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2534 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | (1 << 22);
2538 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | (1 << 22);
2539 tdsaAllShared->Ports[index].agPhyConfig.phyProperties &= 0xFFFFFFF0;
2540 tdsaAllShared->Ports[index].agPhyConfig.phyProperties |= 0x4;
2547 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode 2 phy %d phyProperties 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2548 tdsaAllShared->Ports[index].agPhyConfig.phyProperties = tdsaAllShared->Ports[index].agPhyConfig.phyProperties | (1 << 20);
2555 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode %d phy %d phyProperties 0x%x\n",OpticalMode,index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2559 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode unknown %d phy %d phyProperties 0x%x\n",OpticalMode,index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2564 TI_DBG1(("tdsaParseLinkRateMode: OpticalMode off phy %d phyProperties 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2567 TI_DBG1(("tdsaParseLinkRateMode: phy %d phyProperties 0x%x\n",index,tdsaAllShared->Ports[index].agPhyConfig.phyProperties));
2593 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
2607 TI_DBG6(("tdsaGetHwConfigParams: tdsaRoot %p tdsaAllShared %p \n",tdsaRoot, tdsaAllShared));
2614 HwConfig = (agsaHwConfig_t *)&(tdsaAllShared->HwConfig);
2624 tdsaAllShared->FWMaxPorts = DEFAULT_FW_MAX_PORTS; /* 8, applicable only to SPC not to SPCv */
2628 tdsaAllShared->phyCalibration = 0;
2767 tdsaAllShared->FWMaxPorts = osti_strtoul (buffer, &pLastUsedChar, 0);
2771 tdsaAllShared->FWMaxPorts = osti_strtoul (buffer, &pLastUsedChar, 10);
2794 tdsaAllShared->phyCalibration = osti_strtoul (buffer, &pLastUsedChar, 0);
2798 tdsaAllShared->phyCalibration = osti_strtoul (buffer, &pLastUsedChar, 10);
3128 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
3129 agsaRoot_t *agRoot = &tdsaAllShared->agRootInt;
3135 char *globalStr = tdsaAllShared->CardIDString;
3143 TI_DBG6(("tdsaGetCardPhyParams: tdsaRoot %p tdsaAllShared %p \n", tdsaRoot,tdsaAllShared));
3157 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3158 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05060708);
3160 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x31; /* 49 */
3168 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3169 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05060708);
3171 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x37; /* 55 */
3172 TI_DBG6(("tdsaGetCardPhyParams: phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3181 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3182 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05050500+i);
3184 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x37; /* 55 */
3185 TI_DBG6(("tdsaGetCardPhyParams: phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3219 TI_DBG2(("tdsaGetCardPhyParams: phy %d phyProperties %d\n", i, tdsaAllShared->Ports[i].agPhyConfig.phyProperties));
3238 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, osti_strtoul(buffer, &pLastUsedChar, 0));
3239 TI_DBG6(("tdsaGetCardPhyParams: phy %d hi 0x%x \n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID))));
3243 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, osti_strtoul(buffer, &pLastUsedChar, 10));
3244 TI_DBG6(("tdsaGetCardPhyParams: phy %d hi %d \n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID))));
3268 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, osti_strtoul(buffer, &pLastUsedChar, 0));
3269 TI_DBG6(("tdsaGetCardPhyParams: phy %d lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3273 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, osti_strtoul(buffer, &pLastUsedChar, 10));
3274 TI_DBG6(("tdsaGetCardPhyParams: phy %d lo %d\n", i, SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3277 TI_DBG6(("tdsaGetCardPhyParams: loop phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3375 TI_DBG2(("tdsaGetCardPhyParams: phy %d phyProperties %d\n", i, tdsaAllShared->Ports[i].agPhyConfig.phyProperties));
3412 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
3413 agsaRoot_t *agRoot = &tdsaAllShared->agRootInt;
3427 TI_DBG6(("tdsaGetGlobalPhyParams: tdsaRoot %p tdsaAllShared %p \n", tdsaRoot,tdsaAllShared));
3441 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3442 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05060708);
3444 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x31; /* 49 */
3456 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3457 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05060708);
3461 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01010101);
3462 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x02020202);
3469 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3470 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05060708);
3474 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3475 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x02020202);
3479 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01010101);
3480 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x0f0f0f0f);
3485 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x31; /* 55 */
3486 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3502 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3503 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05050500+i);
3507 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3508 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x06060600+i);
3515 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3516 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05050500+i);
3520 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3521 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x06060600+i);
3528 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3529 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x05050500+i);
3533 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3534 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x06060600+i);
3538 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, 0x01020304);
3539 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, 0x0f0f0f0f+i);
3543 tdsaAllShared->Ports[i].agPhyConfig.phyProperties = 0x31; /* 49 The default is 1.5G and will be changed based on the registry value */
3544 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3595 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, osti_strtoul(buffer, &pLastUsedChar, 0));
3596 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d hi 0x%x \n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID))));
3600 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressHi, 0, osti_strtoul(buffer, &pLastUsedChar, 10));
3601 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d hi %d \n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID))));
3626 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, osti_strtoul(buffer, &pLastUsedChar, 0));
3627 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3631 OSSA_WRITE_BE_32(agRoot, tdsaAllShared->Ports[i].SASID.sasAddressLo, 0, osti_strtoul(buffer, &pLastUsedChar, 10));
3632 TI_DBG6(("tdsaGetGlobalPhyParams: phy %d lo %d\n", i, SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3636 TI_DBG6(("tdsaGetGlobalPhyParams: loop phy %d hi 0x%x lo 0x%x\n", i, SA_IDFRM_GET_SAS_ADDRESSHI(&(tdsaAllShared->Ports[i].SASID)), SA_IDFRM_GET_SAS_ADDRESSLO(&(tdsaAllShared->Ports[i].SASID))));
3730 TI_DBG2(("tdsaGetGlobalPhyParams:A phy %d phyProperties %d\n", i, tdsaAllShared->Ports[i].agPhyConfig.phyProperties));
3733 TI_DBG2(("tdsaGetGlobalPhyParams:B phy %d phyProperties %d\n", i, tdsaAllShared->Ports[i].agPhyConfig.phyProperties));
3773 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
3785 TI_DBG6(("tdsaGetPortParams: tdsaRoot %p tdsaAllShared %p \n", tdsaRoot,tdsaAllShared));
3807 tdsaAllShared->currentInterruptDelay = osti_strtoul (buffer, &pLastUsedChar, 0);
3811 tdsaAllShared->currentInterruptDelay = osti_strtoul (buffer, &pLastUsedChar, 10);
3834 tdsaContext_t *tdsaAllShared;
3837 tdsaAllShared = (tdsaContext_t*)&(tdsaRoot->tdsaAllShared);
3838 saLogDump(&tdsaAllShared->agRootNonInt, size, addr);
3868 tdsaContext_t *tdsaAllShared;
3931 tdsaAllShared = (tdsaContext_t *)&(tdsaRoot->tdsaAllShared);
3937 if (tdsaAllShared->flags.resetInProgress == agTRUE)
3943 loResource = &(tdsaAllShared->loResource);
3945 agRoot = &(tdsaAllShared->agRootNonInt);
3946 tdsaAllShared->flags.sysIntsActive = sysIntsActive;
3970 tdsaPrintSwConfig(&(tdsaAllShared->SwConfig));
3973 tdsaAllShared->SwConfig.max_MSIX_InterruptVectors = loResource->loLevelOption.maxInterruptVectors;
3974 tdsaAllShared->SwConfig.max_MSI_InterruptVectors = loResource->loLevelOption.max_MSI_InterruptVectors;
3975 tdsaAllShared->SwConfig.legacyInt_X = loResource->loLevelOption.flag;
3976 TI_DBG2(("tiCOMPortInit: got max_MSIX_InterruptVectors %d \n", tdsaAllShared->SwConfig.max_MSIX_InterruptVectors));
3977 TI_DBG2(("tiCOMPortInit: got max_MSI_InterruptVectors %d \n", tdsaAllShared->SwConfig.max_MSI_InterruptVectors));
3978 TI_DBG2(("tiCOMPortInit: got flag - legacyInt_X %d \n", tdsaAllShared->SwConfig.legacyInt_X));
3982 ((tdsaAllShared->SwConfig.max_MSIX_InterruptVectors == 0) &&
3983 (tdsaAllShared->SwConfig.max_MSI_InterruptVectors == 0) &&
3984 (tdsaAllShared->SwConfig.legacyInt_X == 0))
3986 ((tdsaAllShared->SwConfig.max_MSIX_InterruptVectors != 0) &&
3987 (tdsaAllShared->SwConfig.max_MSI_InterruptVectors == 0) &&
3988 (tdsaAllShared->SwConfig.legacyInt_X == 0))
3990 ((tdsaAllShared->SwConfig.max_MSIX_InterruptVectors == 0) &&
3991 (tdsaAllShared->SwConfig.max_MSI_InterruptVectors != 0) &&
3992 (tdsaAllShared->SwConfig.legacyInt_X == 0))
3994 ((tdsaAllShared->SwConfig.max_MSIX_InterruptVectors == 0) &&
3995 (tdsaAllShared->SwConfig.max_MSI_InterruptVectors == 0) &&
3996 (tdsaAllShared->SwConfig.legacyInt_X != 0))
4007 QueueConfig = &tdsaAllShared->QueueConfig;
4011 QueueConfig->inboundQueues[i].elementCount = tdsaAllShared->InboundQueueSize[i];
4012 QueueConfig->inboundQueues[i].elementSize = tdsaAllShared->InboundQueueEleSize[i];
4013 QueueConfig->inboundQueues[i].priority = tdsaAllShared->InboundQueuePriority[i];
4015 TI_DBG6(("tiCOMPortInit: InboundQueuePriroity %d \n", tdsaAllShared->InboundQueuePriority[i]));
4019 QueueConfig->outboundQueues[i].elementCount = tdsaAllShared->OutboundQueueSize[i];
4020 QueueConfig->outboundQueues[i].elementSize = tdsaAllShared->OutboundQueueEleSize[i];
4021 QueueConfig->outboundQueues[i].interruptDelay = tdsaAllShared->OutboundQueueInterruptDelay[i]; /* default 0; no interrupt delay */
4022 QueueConfig->outboundQueues[i].interruptCount = tdsaAllShared->OutboundQueueInterruptCount[i]; /* default 1 */
4023 QueueConfig->outboundQueues[i].interruptEnable = tdsaAllShared->OutboundQueueInterruptEnable[i]; /* default 1 */
4025 if (tdsaAllShared->SwConfig.max_MSIX_InterruptVectors != 0)
4027 QueueConfig->outboundQueues[i].interruptVectorIndex = i % tdsaAllShared->SwConfig.max_MSIX_InterruptVectors;
4029 else if (tdsaAllShared->SwConfig.max_MSI_InterruptVectors != 0)
4031 QueueConfig->outboundQueues[i].interruptVectorIndex = i % tdsaAllShared->SwConfig.max_MSI_InterruptVectors;
4037 TI_DBG6(("tiCOMPortInit: OutboundQueueInterruptDelay %d OutboundQueueInterruptCount %d OutboundQueueInterruptEnable %d\n", tdsaAllShared->OutboundQueueInterruptDelay[i], tdsaAllShared->OutboundQueueInterruptCount[i], tdsaAllShared->OutboundQueueInterruptEnable[i]));
4041 QueueConfig->queueOption = tdsaAllShared->QueueOption;
4043 tdsaAllShared->SwConfig.param3 = (void *)QueueConfig;
4044 tdsaAllShared->SwConfig.stallUsec = 10;
4047 tdsaAllShared->SMPQNum = 0; /* default */
4052 tdsaAllShared->SMPQNum = i;
4059 tdsaPrintHwConfig(&(tdsaAllShared->HwConfig));
4063 if (tdsaAllShared->currentOperation & TD_OPERATION_TARGET)
4073 osti_memcpy(&tmpLLSwConfig, &(tdsaAllShared->SwConfig), sizeof(agsaSwConfig_t));
4112 osti_memcpy(&tmpLLSwConfig, &(tdsaAllShared->SwConfig), sizeof(agsaSwConfig_t));
4130 osti_memcpy(&tmpLLSwConfig, &(tdsaAllShared->SwConfig), sizeof(agsaSwConfig_t));
4217 osti_memset(&(tdsaAllShared->tdFWControlEx), 0, sizeof(tdFWControlEx_t));
4224 TI_DBG1(("tiCOMPortInit: tdsaAllShared->tdDeviceIdVendId %x\n",tdsaAllShared->tdDeviceIdVendId));
4225 TI_DBG1(("tiCOMPortInit: tdsaAllShared->tdSubVendorId= SUB_VEN_ID %x\n",tdsaAllShared->tdSubVendorId));
4227 TI_DBG1(("tiCOMPortInit: swConfig->param1 hwDEVICE_ID_VENDID %x\n", tdsaAllShared->SwConfig.param1 ));
4228 TI_DBG1(("tiCOMPortInit: swConfig->param2 hwSVID %x\n", tdsaAllShared->SwConfig.param2));
4238 if (tdsaAllShared->SwConfig.hostDirectAccessSupport != 0)
4282 tdsaAllShared->SwConfig.param4 = &(HDAImg);
4287 tdsaAllShared->SwConfig.param4 = agNULL;
4294 tdsaAllShared->SwConfig.FWConfig = 0;
4296 tdsaAllShared->SwConfig.PortRecoveryResetTimer = 0x30032;
4300 tdsaAllShared->SwConfig.fatalErrorInterruptVector = loResource->loLevelOption.maxInterruptVectors > 31 ? 31 : loResource->loLevelOption.maxInterruptVectors -1;
4302 TI_DBG1(("tiCOMPortInit: SwConfig->FWConfig 0x%x\n", tdsaAllShared->SwConfig.FWConfig));
4303 TI_DBG1(("tiCOMPortInit: SwConfig->fatalErrorInterruptVector 0x%x\n", tdsaAllShared->SwConfig.fatalErrorInterruptVector));
4308 &(tdsaAllShared->HwConfig),
4310 &(tdsaAllShared->SwConfig),
4315 /*TI_DBG6(("tiCOMPortInit: tdsaAllShared->SwConfig.enableDIF %d\n", tdsaAllShared->SwConfig.enableDIF)); */
4316 /*TI_DBG6(("tiCOMPortInit: tdsaAllShared->SwConfig.enableEncryption %d\n", tdsaAllShared->SwConfig.enableEncryption)); */
4331 tdsaAllShared->agRootInt.sdkData = tdsaAllShared->agRootNonInt.sdkData;
4337 tdsaAllShared->Ports[i].flags.portInitialized = agTRUE;
4399 dmRoot = &(tdsaAllShared->dmRoot);
4434 &(tdsaAllShared->dmSwConfig), //&dmSwConfig, /* start here */
4444 smRoot = &(tdsaAllShared->smRoot);
4479 &(tdsaAllShared->smSwConfig), //&smSwConfig, /* start here */
4489 dmRoot = &(tdsaAllShared->dmRoot);
4515 &(tdsaAllShared->dmSwConfig), //&dmSwConfig, /* start here */
4525 smRoot = &(tdsaAllShared->smRoot);
4551 &(tdsaAllShared->smSwConfig), //&smSwConfig, /* start here */
4692 tdsaContext_t *tdsaAllShared = (tdsaContext_t *) &tdsaRoot->tdsaAllShared;
4693 bit32 phyCount = tdsaAllShared->phyCount;
4773 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
4774 agsaRoot_t *agRoot = &tdsaAllShared->agRootInt;
4785 if (tdsaAllShared->flags.resetInProgress == agTRUE)
4795 if (tdsaAllShared->Ports[portID].flags.portInitialized == agFALSE)
4804 if (tdsaAllShared->Ports[portID].flags.portStarted == agTRUE)
4811 (void *) tdsaAllShared->Ports[portID].tiPortalContext
4817 portalContext->tdData = &(tdsaAllShared->Ports[portID]);
4818 TI_DBG4 (("tiCOMPortStart : saving portalconext portID %d tdsaAllShared %p\n", portID, tdsaAllShared));
4820 tdsaAllShared->Ports[portID].tiPortalContext = portalContext;
4821 TI_DBG4(("tiCOMPortStart : portID/phyID %d tiPortalContext %p\n", portID, tdsaAllShared->Ports[portID].tiPortalContext));
4824 where is "tdsaAllShared->Ports[0].portContext" set?
4827 if (tdsaAllShared->Ports[portID].flags.portStarted == agTRUE)
4839 tdsaAllShared->Ports[portID].SASID.target_ssp_stp_smp = 0;
4840 tdsaAllShared->Ports[portID].SASID.initiator_ssp_stp_smp
4842 tdsaAllShared->Ports[portID].SASID.deviceType_addressFrameType = AGSA_DEV_TYPE_END_DEVICE;
4844 tdsaAllShared->Ports[portID].SASID.phyIdentifier = (bit8)portID;
4850 tdsaAllShared->Ports[portID].SASID.target_ssp_stp_smp = SA_IDFRM_SSP_BIT;
4851 tdsaAllShared->Ports[portID].SASID.initiator_ssp_stp_smp = 0;
4852 tdsaAllShared->Ports[portID].SASID.deviceType_addressFrameType = AGSA_DEV_TYPE_END_DEVICE;
4853 tdsaAllShared->Ports[portID].SASID.phyIdentifier = (bit8)portID;
4860 tdsaAllShared->Ports[portID].SASID.target_ssp_stp_smp = SA_IDFRM_SSP_BIT;
4861 tdsaAllShared->Ports[portID].SASID.initiator_ssp_stp_smp
4863 tdsaAllShared->Ports[portID].SASID.deviceType_addressFrameType = AGSA_DEV_TYPE_END_DEVICE;
4865 tdsaAllShared->Ports[portID].SASID.phyIdentifier = (bit8)portID;
4871 tdssPrintSASIdentify(&(tdsaAllShared->Ports[portID].SASID));
4874 (tdsaAllShared->flags.sysIntsActive == agTRUE) ? "agTRUE" : "agFALSE"));
4879 if ( tdsaAllShared->first_process == agFALSE)
4883 tdsaAllShared->first_process = agTRUE;
4887 tdssPrintSASIdentify(&(tdsaAllShared->Ports[portID].SASID));
4892 if (tdsaAllShared->phyCalibration)
4895 tdsaAllShared->Ports[portID].agPhyConfig.phyProperties =
4896 (tdsaAllShared->Ports[portID].agPhyConfig.phyProperties) | 0x80;
4900 tdsaAllShared->Ports[portID].agPhyConfig.phyProperties =
4901 (tdsaAllShared->Ports[portID].agPhyConfig.phyProperties) | (portID << 8);
4903 TI_DBG2(("tiCOMPortStart: tdsaAllShared->Ports[0x%x].agPhyConfig.phyProperties 0x%x\n",
4904 portID, tdsaAllShared->Ports[portID].agPhyConfig.phyProperties));
4909 tdsaAllShared->Ports[portID].agPhyConfig.phyProperties = tdsaAllShared->Ports[portID].agPhyConfig.phyProperties | 0x40000;
4910 TI_DBG1(("tiCOMPortStart:gSSC_Disable tdsaAllShared->Ports[portID].agPhyConfig.phyProperties 0x%x\n", tdsaAllShared->Ports[portID].agPhyConfig.phyProperties));
4920 SASConfigPage.STP_SSP_MCT_TMO = (tdsaAllShared->STP_MCT_TMO << 16) | tdsaAllShared->SSP_MCT_TMO; /* default of 3200 us for STP and SSP maximum connection time */
4921 SASConfigPage.STP_FRM_TMO = (tdsaAllShared->MAX_OPEN_TIME << 24) | (tdsaAllShared->SMP_MAX_CONN_TIMER << 16) | tdsaAllShared->STP_FRM_TMO; /* MAX_OPEN_TIME, SMP_MAX_CONN_TIMER, STP frame timeout */
4922 SASConfigPage.STP_IDLE_TMO = tdsaAllShared->stp_idle_time;
4927 SASConfigPage.OPNRJT_RTRY_INTVL = (tdsaAllShared->MFD << 16) | tdsaAllShared->OPNRJT_RTRY_INTVL; /* Multi Data Fetach enabled and 2 us for Open Reject Retry interval */
4928 SASConfigPage.Data_Cmd_OPNRJT_RTRY_TMO = (tdsaAllShared->DOPNRJT_RTRY_TMO << 16) | tdsaAllShared->COPNRJT_RTRY_TMO; /* 128 us for ORR Timeout for DATA phase and 32 us for ORR Timeout for command phase */
4929 SASConfigPage.Data_Cmd_OPNRJT_RTRY_THR = (tdsaAllShared->DOPNRJT_RTRY_THR << 16) | tdsaAllShared->COPNRJT_RTRY_THR; /* 16 for ORR backoff threshold for DATA phase and 1024 for ORR backoff threshold for command phase */
4930 SASConfigPage.MAX_AIP = tdsaAllShared->MAX_AIP; /* MAX AIP. Default is 0x200000 */
4968 &(tdsaAllShared->Ports[portID].agPhyConfig),
4969 &(tdsaAllShared->Ports[portID].SASID)
4981 (void *) tdsaAllShared->Ports[portID].tiPortalContext
5015 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5036 agRoot = &(tdsaAllShared->agRootNonInt);
5042 if (TDLIST_EMPTY(&(tdsaAllShared->MainPortContextList)))
5049 PortContextList = tdsaAllShared->MainPortContextList.flink;
5050 while (PortContextList != &(tdsaAllShared->MainPortContextList))
5085 tdsaAllShared->Ports[i].portContext = agNULL;
5143 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5153 if (TDLIST_EMPTY(&(tdsaAllShared->MainPortContextList)))
5165 PortContextList = tdsaAllShared->MainPortContextList.flink;
5166 while (PortContextList != &(tdsaAllShared->MainPortContextList))
5253 tdsaContext_t *tdsaAllShared ;
5259 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5260 TD_ASSERT(tdsaAllShared, "tdsaAllShared");
5261 agRoot = &(tdsaAllShared->agRootNonInt);
5264 agRoot = &(tdsaAllShared->agRootNonInt);
5328 tdsaContext_t *tdsaAllShared ;
5334 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5335 TD_ASSERT(tdsaAllShared, "tdsaAllShared");
5336 agRoot = &(tdsaAllShared->agRootNonInt);
5339 agRoot = &(tdsaAllShared->agRootNonInt);
5385 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5391 agRoot = &(tdsaAllShared->agRootNonInt);
5483 tdsaContext_t *tdsaAllShared;
5490 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5491 TD_ASSERT(tdsaAllShared, "tdsaAllShared");
5492 agRoot = &(tdsaAllShared->agRootNonInt);
5582 tdsaContext_t *tdsaAllShared ;
5588 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5589 TD_ASSERT(tdsaAllShared, "tdsaAllShared");
5590 agRoot = &(tdsaAllShared->agRootNonInt);
5594 agRoot = &(tdsaAllShared->agRootNonInt);
5653 tdsaContext_t *tdsaAllShared;
5665 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5666 TD_ASSERT(tdsaAllShared, "tdsaAllShared");
5667 agRoot = &(tdsaAllShared->agRootNonInt);
5734 tdsaContext_t *tdsaAllShared;
5741 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5743 agRoot = &(tdsaAllShared->agRootNonInt);
5776 tdsaContext_t *tdsaAllShared;
5784 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5786 agRoot = &(tdsaAllShared->agRootNonInt);
5866 tdsaContext_t *tdsaAllShared;
5876 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5878 agRoot = &(tdsaAllShared->agRootNonInt);
5925 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5932 agRoot = &(tdsaAllShared->agRootNonInt);
5987 tdsaContext_t *tdsaAllShared = agNULL;
5996 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
5997 TD_ASSERT(tdsaAllShared != agNULL, "tdsaAllShared is NULL !!!");
5999 agRoot = &(tdsaAllShared->agRootNonInt);
6075 tdsaContext_t *tdsaAllShared = agNULL;
6084 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6085 TD_ASSERT(tdsaAllShared != agNULL, "tdsaAllShared is NULL !!!");
6087 agRoot = &(tdsaAllShared->agRootNonInt);
6147 tdsaContext_t *tdsaAllShared = agNULL;
6156 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6157 TD_ASSERT(tdsaAllShared != agNULL, "tdsaAllShared is NULL !!!");
6159 agRoot = &(tdsaAllShared->agRootNonInt);
6237 tdsaContext_t *tdsaAllShared = agNULL;
6246 tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6247 TD_ASSERT(tdsaAllShared != agNULL, "tdsaAllShared is NULL !!!");
6249 agRoot = &(tdsaAllShared->agRootNonInt);
6305 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6311 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6312 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6349 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->FreeLink), &(tdsaAllShared->FreeDeviceList));
6386 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6393 smRoot_t *smRoot = &(tdsaAllShared->smRoot);
6401 dmRoot = &(tdsaAllShared->dmRoot);
6404 PortContextList = tdsaAllShared->MainPortContextList.flink;
6405 while (PortContextList != &(tdsaAllShared->MainPortContextList))
6429 TDLIST_ENQUEUE_AT_TAIL(&(onePortContext->FreeLink), &(tdsaAllShared->FreePortContextList));
6434 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6435 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6460 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->FreeLink), &(tdsaAllShared->FreeDeviceList));
6505 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6507 bit32 Indenom = tdsaAllShared->QueueConfig.numInboundQueues;
6508 bit32 Outdenom = tdsaAllShared->QueueConfig.numOutboundQueues;
6523 PortContextList = tdsaAllShared->MainPortContextList.flink;
6524 while (PortContextList != &(tdsaAllShared->MainPortContextList))
6547 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6548 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6574 if (!TDLIST_NOT_EMPTY(&(tdsaAllShared->FreeDeviceList)))
6581 TDLIST_DEQUEUE_FROM_HEAD(&DeviceListList, &(tdsaAllShared->FreeDeviceList));
6610 DEVINFO_PUT_ITNEXUSTO(&oneDeviceData->agDeviceInfo, (bit16)tdsaAllShared->itNexusTimeout);
6638 if( tdsaAllShared->sflag )
6642 TI_DBG1(("tdssAddSASToSharedcontext: First, saRegisterNewDevice sflag %d\n", tdsaAllShared->sflag));
6673 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->MainLink), &(tdsaAllShared->MainDeviceList));
6710 DEVINFO_PUT_ITNEXUSTO(&oneDeviceData->agDeviceInfo, (bit16)tdsaAllShared->itNexusTimeout);
6735 if( tdsaAllShared->sflag )
6739 TI_DBG1(("tdssAddSASToSharedcontext: Second, saRegisterNewDevice sflag %d\n", tdsaAllShared->sflag));
6799 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6808 PortContextList = tdsaAllShared->MainPortContextList.flink;
6809 while (PortContextList != &(tdsaAllShared->MainPortContextList))
6826 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6827 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6884 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6894 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6895 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6946 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
6960 DeviceListList = tdsaAllShared->MainDeviceList.flink;
6961 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
6986 if (!TDLIST_NOT_EMPTY(&(tdsaAllShared->FreeDeviceList)))
6993 TDLIST_DEQUEUE_FROM_HEAD(&DeviceListList, &(tdsaAllShared->FreeDeviceList));
7047 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->MainLink), &(tdsaAllShared->MainDeviceList));
7130 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7138 DeviceListList = tdsaAllShared->MainDeviceList.flink;
7142 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
7170 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
7235 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7243 DeviceListList = tdsaAllShared->MainDeviceList.flink;
7244 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
7295 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7319 if (TDLIST_EMPTY(&(tdsaAllShared->freeExpanderList)))
7326 TDLIST_DEQUEUE_FROM_HEAD(&ExpanderList, &(tdsaAllShared->freeExpanderList));
7515 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7565 TDLIST_ENQUEUE_AT_TAIL(&(oneExpander->linkNode), &(tdsaAllShared->freeExpanderList));
7639 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7651 DeviceListList = tdsaAllShared->MainDeviceList.flink;
7652 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
7678 if (!TDLIST_NOT_EMPTY(&(tdsaAllShared->FreeDeviceList)))
7685 TDLIST_DEQUEUE_FROM_HEAD(&DeviceListList, &(tdsaAllShared->FreeDeviceList));
7729 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->MainLink), &(tdsaAllShared->MainDeviceList));
7789 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7799 if (tdsaAllShared->eventSource[PhyID].EventValid == agTRUE &&
7805 eventSource = &(tdsaAllShared->eventSource[PhyID].Source);
7820 tdsaAllShared->eventSource[PhyID].EventValid = agFALSE;
7830 TDLIST_ENQUEUE_AT_TAIL(&(onePortContext->FreeLink), &(tdsaAllShared->FreePortContextList));
7836 if (TDLIST_EMPTY(&(tdsaAllShared->MainDeviceList)))
7842 DeviceListList = tdsaAllShared->MainDeviceList.flink;
7843 while (DeviceListList != &(tdsaAllShared->MainDeviceList))
7890 TDLIST_ENQUEUE_AT_TAIL(&(oneDeviceData->FreeLink), &(tdsaAllShared->FreeDeviceLis));
7891 DeviceListList = tdsaAllShared->MainDeviceList.flink;
7892 if (TDLIST_EMPTY(&(tdsaAllShared->MainDeviceList)))
7975 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7977 // bit32 denom = tdsaAllShared->QueueConfig.numOutboundQueues;
7986 ret = ((tdsaAllShared->QueueConfig.numOutboundQueues-1) << 16) | (tdsaAllShared->QueueConfig.numInboundQueues-1);
7997 tdsaContext_t *tdsaAllShared = (tdsaContext_t *)&tdsaRoot->tdsaAllShared;
7998 bit32 denom = tdsaAllShared->QueueConfig.numInboundQueues;
8002 tdsaAllShared->IBQnumber++;
8003 if (tdsaAllShared->IBQnumber % denom == 0) /* % Qnumber*/
8005 tdsaAllShared->IBQnumber = 0;
8007 TI_DBG6(("tdsaRotateQnumber: IBQnumber %d\n", tdsaAllShared->IBQnumber));
8011 tdsaAllShared->OBQnumber++;
8012 denom = tdsaAllShared->QueueConfig.numOutboundQueues;
8013 if (tdsaAllShared->OBQnumber % denom == 0) /* % Qnumber*/
8015 tdsaAllShared->OBQnumber = 0;
8017 TI_DBG6(("tdsaRotateQnumber: OBQnumber %d\n", tdsaAllShared->OBQnumber));
8019 ret = (tdsaAllShared->OBQnumber << 16) | tdsaAllShared->IBQnumber;