FreeBSD kernel pms device code
dminit.c
Go to the documentation of this file.
1/*******************************************************************************
2**
3*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
4*
5*Redistribution and use in source and binary forms, with or without modification, are permitted provided
6*that the following conditions are met:
7*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8*following disclaimer.
9*2. Redistributions in binary form must reproduce the above copyright notice,
10*this list of conditions and the following disclaimer in the documentation and/or other materials provided
11*with the distribution.
12*
13*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
14*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
18*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
20*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
21
22********************************************************************************/
23#include <sys/cdefs.h>
24__FBSDID("$FreeBSD$");
25#include <dev/pms/config.h>
26
30
34
35#ifdef FDS_DM
39
43
44#ifdef DM_DEBUG
45bit32 gDMDebugLevel = 1;
46#endif
47
48osGLOBAL void
50 dmRoot_t *dmRoot,
51 dmSwConfig_t *swConfig,
52 dmMemoryRequirement_t *memoryRequirement,
53 bit32 *usecsPerTick,
54 bit32 *maxNumLocks)
55{
56 bit32 memoryReqCount = 0;
57 bit32 max_expander = DM_MAX_EXPANDER_DEV;
58 char *buffer;
59 bit32 buffLen;
60 bit32 lenRecv = 0;
61 static char tmpBuffer[DEFAULT_KEY_BUFFER_SIZE];
62 char *pLastUsedChar = agNULL;
63 char globalStr[] = "Global";
64 char iniParmsStr[] = "InitiatorParms";
65 char SwParmsStr[] = "SWParms";
66
67 DM_DBG3(("dmGetRequirements: start\n"));
68 /* sanity check */
69 DM_ASSERT((agNULL != swConfig), "");
70 DM_ASSERT((agNULL != memoryRequirement), "");
71 DM_ASSERT((agNULL != usecsPerTick), "");
72 DM_ASSERT((agNULL != maxNumLocks), "");
73
74 /* memory requirement for dmRoot, CACHE memory */
75 memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].singleElementLength = sizeof(dmIntRoot_t);
76 memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].numElements = 1;
77 memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].totalLength =
78 (memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].singleElementLength) * (memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].numElements);
79 memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].alignment = 4;
80 memoryRequirement->dmMemory[DM_ROOT_MEM_INDEX].type = DM_CACHED_MEM;
81 memoryReqCount++;
82
83 /* memory requirement for Port Context Links, CACHE memory */
86 memoryRequirement->dmMemory[DM_PORT_MEM_INDEX].totalLength =
87 (memoryRequirement->dmMemory[DM_PORT_MEM_INDEX].singleElementLength) * (memoryRequirement->dmMemory[DM_PORT_MEM_INDEX].numElements);
88 memoryRequirement->dmMemory[DM_PORT_MEM_INDEX].alignment = 4;
89 memoryRequirement->dmMemory[DM_PORT_MEM_INDEX].type = DM_CACHED_MEM;
90 memoryReqCount++;
91
92 /* memory requirement for Device Links, CACHE memory */
95 memoryRequirement->dmMemory[DM_DEVICE_MEM_INDEX].totalLength =
96 (memoryRequirement->dmMemory[DM_DEVICE_MEM_INDEX].singleElementLength) * (memoryRequirement->dmMemory[DM_DEVICE_MEM_INDEX].numElements);
97 memoryRequirement->dmMemory[DM_DEVICE_MEM_INDEX].alignment = 4;
98 memoryRequirement->dmMemory[DM_DEVICE_MEM_INDEX].type = DM_CACHED_MEM;
99 memoryReqCount++;
100
101 /* memory requirement for Expander Device Links, CACHE memory */
102 /*
103 Maximum number of expanders are configurable
104 The default is DM_MAX_EXPANDER_DEV
105 */
106 buffer = tmpBuffer;
107 buffLen = sizeof(tmpBuffer);
108
109 dm_memset(buffer, 0, buffLen);
110 lenRecv = 0;
111
113 dmRoot,
114 globalStr,
115 iniParmsStr,
116 agNULL,
117 agNULL,
118 agNULL,
119 agNULL,
120 "MaxExpanders",
121 buffer,
122 buffLen,
123 &lenRecv
124 ) == DM_RC_SUCCESS) && (lenRecv != 0))
125 {
126 if (osti_strncmp(buffer, "0x", 2) == 0)
127 {
128 max_expander = osti_strtoul (buffer, &pLastUsedChar, 0);
129 }
130 else
131 {
132 max_expander = osti_strtoul (buffer, &pLastUsedChar, 10);
133 }
134 }
135 DM_DBG3(("dmGetRequirements: max_expander %d\n", max_expander));
136
137
139 memoryRequirement->dmMemory[DM_EXPANDER_MEM_INDEX].numElements = max_expander;
140 memoryRequirement->dmMemory[DM_EXPANDER_MEM_INDEX].totalLength =
142 memoryRequirement->dmMemory[DM_EXPANDER_MEM_INDEX].alignment = 4;
143 memoryRequirement->dmMemory[DM_EXPANDER_MEM_INDEX].type = DM_CACHED_MEM;
144 memoryReqCount++;
145
146 /* memory requirement for SMP command Links, CACHE memory */
148 memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].numElements = DM_MAX_SMP;
149 memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].totalLength =
150 (memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].singleElementLength) * (memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].numElements);
151 memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].alignment = 4;
152 memoryRequirement->dmMemory[DM_SMP_MEM_INDEX].type = DM_CACHED_MEM;
153 memoryReqCount++;
154
155 /* memory requirement for INDIRECT SMP command/response Links, DMA memory */
158 memoryRequirement->dmMemory[DM_INDIRECT_SMP_MEM_INDEX].totalLength =
160 memoryRequirement->dmMemory[DM_INDIRECT_SMP_MEM_INDEX].alignment = 4;
162 memoryReqCount++;
163
164
165 /* set up memory requirement count */
166 memoryRequirement->count = memoryReqCount;
167
168 /* requirement for locks */
169 *maxNumLocks = DM_MAX_LOCKS;
170
171 /* setup the time tick */
172 *usecsPerTick = DM_USECS_PER_TICK;
173
174
175 /* set up the number of Expander device handles */
176 swConfig->numDevHandles = DM_MAX_DEV;
177 swConfig->itNexusTimeout = IT_NEXUS_TIMEOUT; /* default is 2000 ms*/
178
179 dm_memset(buffer, 0, buffLen);
180 lenRecv = 0;
181
183 dmRoot,
184 globalStr,
185 SwParmsStr,
186 agNULL,
187 agNULL,
188 agNULL,
189 agNULL,
190 "IT_NEXUS_TIMEOUT",
191 buffer,
192 buffLen,
193 &lenRecv
194 ) == DM_RC_SUCCESS) && (lenRecv != 0))
195 {
196 if (osti_strncmp(buffer, "0x", 2) == 0)
197 {
198 swConfig->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 0);
199 }
200 else
201 {
202 swConfig->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 10);
203 }
204 }
205
206 DM_DBG1(("dmGetRequirements: swConfig->itNexusTimeout 0x%X\n", swConfig->itNexusTimeout));
207
208 DM_DBG3(("dmGetRequirements: memoryReqCount %d\n", memoryRequirement->count));
209
210 return;
211}
212/*
213 ??? processing swConfig
214*/
217 dmRoot_t *dmRoot,
218 agsaRoot_t *agRoot,
219 dmMemoryRequirement_t *memoryAllocated,
220 dmSwConfig_t *swConfig,
221 bit32 usecsPerTick )
222{
223 dmIntRoot_t *dmIntRoot;
224 dmIntPortContext_t *dmIntPortContext;
225 dmDeviceData_t *dmDevice;
226 dmExpander_t *dmExpander;
227 dmSMPRequestBody_t *dmSMPRequest;
228 bit8 *dmIndirectSMPRequest;
229 dmIntContext_t *dmAllShared;
230 bit32 i;
231 bit32 max_expander = DM_MAX_EXPANDER_DEV;
232 char *buffer;
233 bit32 buffLen;
234 bit32 lenRecv = 0;
235 static char tmpBuffer[DEFAULT_KEY_BUFFER_SIZE];
236 char *pLastUsedChar = agNULL;
237 char globalStr[] = "Global";
238 char iniParmsStr[] = "InitiatorParms";
239 char SwParmsStr[] = "SWParms";
240
241 DM_DBG3(("dmInitialize: start\n"));
242 /* sanity check */
243 DM_ASSERT((agNULL != dmRoot), "");
244 DM_ASSERT((agNULL != agRoot), "");
245 DM_ASSERT((agNULL != memoryAllocated), "");
246 DM_ASSERT((agNULL != swConfig), "");
247 DM_ASSERT((DM_ROOT_MEM_INDEX < memoryAllocated->count), "");
248 DM_ASSERT((DM_PORT_MEM_INDEX < memoryAllocated->count), "");
249 DM_ASSERT((DM_DEVICE_MEM_INDEX < memoryAllocated->count), "");
250 DM_ASSERT((DM_EXPANDER_MEM_INDEX < memoryAllocated->count), "");
251 DM_ASSERT((DM_SMP_MEM_INDEX < memoryAllocated->count), "");
252 DM_ASSERT((DM_INDIRECT_SMP_MEM_INDEX < memoryAllocated->count), "");
253
254 /* Check the memory allocated */
255 for ( i = 0; i < memoryAllocated->count; i ++ )
256 {
257 /* If memory allocatation failed */
258 if (memoryAllocated->dmMemory[i].singleElementLength &&
259 memoryAllocated->dmMemory[i].numElements)
260 {
261 if ( (0 != memoryAllocated->dmMemory[i].numElements)
262 && (0 == memoryAllocated->dmMemory[i].totalLength) )
263 {
264 /* return failure */
265 DM_DBG1(("dmInitialize: Memory[%d] singleElementLength = 0x%0x numElements = 0x%x NOT allocated!!!\n",
266 i,
267 memoryAllocated->dmMemory[i].singleElementLength,
268 memoryAllocated->dmMemory[i].numElements));
269 return DM_RC_FAILURE;
270 }
271 }
272 }
273
274 /* DM's internal root */
275 dmIntRoot = (dmIntRoot_t *) (memoryAllocated->dmMemory[DM_ROOT_MEM_INDEX].virtPtr);
276 dmRoot->dmData = (void *) dmIntRoot;
277
278 dmAllShared = (dmIntContext_t *)&(dmIntRoot->dmAllShared);
280 dmAllShared->dmRootOsData.dmRoot = dmRoot;
281 dmAllShared->dmRootOsData.dmAllShared = (void *) dmAllShared;
282
283 /* Port Contexts */
284 dmIntPortContext = (dmIntPortContext_t *) (memoryAllocated->dmMemory[DM_PORT_MEM_INDEX].virtPtr);
285 dmAllShared->PortContextMem = (dmIntPortContext_t *)dmIntPortContext;
286
287 /* Devices */
288 dmDevice = (dmDeviceData_t *) (memoryAllocated->dmMemory[DM_DEVICE_MEM_INDEX].virtPtr);
289 dmAllShared->DeviceMem = (dmDeviceData_t *)dmDevice;
290
291 /* Expanders */
292 dmExpander = (dmExpander_t *) (memoryAllocated->dmMemory[DM_EXPANDER_MEM_INDEX].virtPtr);
293 dmAllShared->ExpanderMem = (dmExpander_t *)dmExpander;
294
295 /* SMP commands */
296 dmSMPRequest = (dmSMPRequestBody_t *) (memoryAllocated->dmMemory[DM_SMP_MEM_INDEX].virtPtr);
297 dmAllShared->SMPMem = (dmSMPRequestBody_t *)dmSMPRequest;
298
299 /* DMAable SMP request/reponse pointed by dmSMPRequestBody_t */
300 dmIndirectSMPRequest = (bit8 *) (memoryAllocated->dmMemory[DM_INDIRECT_SMP_MEM_INDEX].virtPtr);
301 dmAllShared->IndirectSMPMem = (bit8 *)dmIndirectSMPRequest;
304
305 dmAllShared->agRoot = agRoot;
306
307
308 dmAllShared->usecsPerTick = usecsPerTick;
309 dmAllShared->itNexusTimeout = IT_NEXUS_TIMEOUT;/*swConfig->itNexusTimeout;*/
311 dmAllShared->RateAdjust = 0;
313 dmInitTimers(dmRoot);
314
316 dmPortContextInit(dmRoot);
317
319 dmDeviceDataInit(dmRoot);
320
322 buffer = tmpBuffer;
323 buffLen = sizeof(tmpBuffer);
324
325 dm_memset(buffer, 0, buffLen);
326 lenRecv = 0;
327
329 dmRoot,
330 globalStr,
331 iniParmsStr,
332 agNULL,
333 agNULL,
334 agNULL,
335 agNULL,
336 "MaxExpanders",
337 buffer,
338 buffLen,
339 &lenRecv
340 ) == DM_RC_SUCCESS) && (lenRecv != 0))
341 {
342 if (osti_strncmp(buffer, "0x", 2) == 0)
343 {
344 max_expander = osti_strtoul (buffer, &pLastUsedChar, 0);
345 }
346 else
347 {
348 max_expander = osti_strtoul (buffer, &pLastUsedChar, 10);
349 }
350 }
351
352 dm_memset(buffer, 0, buffLen);
353 lenRecv = 0;
354
356 dmRoot,
357 globalStr,
358 SwParmsStr,
359 agNULL,
360 agNULL,
361 agNULL,
362 agNULL,
363 "IT_NEXUS_TIMEOUT",
364 buffer,
365 buffLen,
366 &lenRecv
367 ) == DM_RC_SUCCESS) && (lenRecv != 0))
368 {
369 if (osti_strncmp(buffer, "0x", 2) == 0)
370 {
371 dmAllShared->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 0);
372 }
373 else
374 {
375 dmAllShared->itNexusTimeout = osti_strtoul (buffer, &pLastUsedChar, 10);
376 }
377 }
378
379 DM_DBG1(("dmAllShared->itNexusTimeout %d \n", dmAllShared->itNexusTimeout));
380
381 dm_memset(buffer, 0, buffLen);
382 lenRecv = 0;
383
385 dmRoot,
386 globalStr,
387 SwParmsStr,
388 agNULL,
389 agNULL,
390 agNULL,
391 agNULL,
392 "MaxRetryDiscovery",
393 buffer,
394 buffLen,
395 &lenRecv
396 ) == DM_RC_SUCCESS) && (lenRecv != 0))
397 {
398 if (osti_strncmp(buffer, "0x", 2) == 0)
399 {
400 dmAllShared->MaxRetryDiscovery = osti_strtoul (buffer, &pLastUsedChar, 0);
401 }
402 else
403 {
404 dmAllShared->MaxRetryDiscovery = osti_strtoul (buffer, &pLastUsedChar, 10);
405 }
406 }
407
408 DM_DBG1(("dmAllShared->MaxRetryDiscovery %d \n", dmAllShared->MaxRetryDiscovery));
409
410 dm_memset(buffer, 0, buffLen);
411 lenRecv = 0;
413 dmRoot,
414 globalStr,
415 SwParmsStr,
416 agNULL,
417 agNULL,
418 agNULL,
419 agNULL,
420 "RateAdjust",
421 buffer,
422 buffLen,
423 &lenRecv
424 ) == DM_RC_SUCCESS) && (lenRecv != 0))
425 {
426 if (osti_strncmp(buffer, "0x", 2) == 0)
427 {
428 dmAllShared->RateAdjust = osti_strtoul (buffer, &pLastUsedChar, 0);
429 }
430 else
431 {
432 dmAllShared->RateAdjust = osti_strtoul (buffer, &pLastUsedChar, 10);
433 }
434 }
435 DM_DBG1(("dmAllShared->RateAdjust %d \n", dmAllShared->RateAdjust));
436
437 dmExpanderDeviceDataInit(dmRoot, max_expander);
438
440 dmSMPInit(dmRoot);
441
442#ifdef DM_DEBUG
443 gDMDebugLevel = swConfig->DMDebugLevel;
444#endif
445 return DM_RC_SUCCESS;
446}
447
448osGLOBAL void
450 dmRoot_t *dmRoot
451 )
452{
453 dmIntRoot_t *dmIntRoot = (dmIntRoot_t *)dmRoot->dmData;
454 dmIntContext_t *dmAllShared = (dmIntContext_t *)&dmIntRoot->dmAllShared;
455 dmSMPRequestBody_t *dmSMPCommand = (dmSMPRequestBody_t *)dmAllShared->SMPMem;
456 bit8 *dmIndirectSMPReqRsp = (bit8 *)dmAllShared->IndirectSMPMem;
457 bit32 prev_PhysAddrLower;
458
459 int i = 0;
460 DM_DBG3(("dmSMPInit: start \n"));
461
462 DMLIST_INIT_HDR(&(dmAllShared->freeSMPList));
463
464 for(i=0;i<DM_MAX_SMP;i++)
465 {
466 DMLIST_INIT_ELEMENT(&(dmSMPCommand[i].Link));
467 /* initialize expander fields */
468 dmSMPCommand[i].dmRoot = agNULL;
469 dmSMPCommand[i].dmDevice = agNULL;
470 dmSMPCommand[i].dmPortContext = agNULL;
471 dmSMPCommand[i].retries = 0;
472 dmSMPCommand[i].id = i;
473 dm_memset( &(dmSMPCommand[i].smpPayload), 0, sizeof(dmSMPCommand[i].smpPayload));
474 /* indirect SMP related */
475 dmSMPCommand[i].IndirectSMPResponse = agNULL;
476 dmSMPCommand[i].IndirectSMP = ((bit8 *)dmIndirectSMPReqRsp) + (i*SMP_INDIRECT_PAYLOAD);
477 dmSMPCommand[i].IndirectSMPUpper32 = dmAllShared->IndirectSMPUpper32;
478 dmSMPCommand[i].IndirectSMPLower32 = dmAllShared->IndirectSMPLower32;
479
480 prev_PhysAddrLower = dmAllShared->IndirectSMPLower32;
481 dmAllShared->IndirectSMPLower32 = dmAllShared->IndirectSMPLower32 + SMP_INDIRECT_PAYLOAD;
482 if (dmAllShared->IndirectSMPLower32 <= prev_PhysAddrLower)
483 {
484 dmAllShared->IndirectSMPUpper32++;
485 }
486
487 DMLIST_ENQUEUE_AT_TAIL(&(dmSMPCommand[i].Link), &(dmAllShared->freeSMPList));
488 }
489 return;
490
491}
492
493osGLOBAL void
495 dmRoot_t *dmRoot
496 )
497{
498 dmIntRoot_t *dmIntRoot = (dmIntRoot_t *)dmRoot->dmData;
499 dmIntContext_t *dmAllShared = (dmIntContext_t *)&dmIntRoot->dmAllShared;
500 dmDeviceData_t *dmDeviceData = (dmDeviceData_t *)dmAllShared->DeviceMem;
501 int i;
502
503 DM_DBG3(("dmDeviceDataInit: start \n"));
504
505 DMLIST_INIT_HDR(&(dmAllShared->MainDeviceList));
506 DMLIST_INIT_HDR(&(dmAllShared->FreeDeviceList));
507
508 for(i=0;i<DM_MAX_DEV;i++)
509 {
510 DMLIST_INIT_ELEMENT(&(dmDeviceData[i].FreeLink));
511 DMLIST_INIT_ELEMENT(&(dmDeviceData[i].MainLink));
512 DMLIST_INIT_ELEMENT(&(dmDeviceData[i].IncDisLink));
513 dmDeviceData[i].id = i;
514 dmDeviceData[i].DeviceType = DM_DEFAULT_DEVICE;
515 dmDeviceData[i].dmRoot = agNULL;
516// dmDeviceData[i].agDevHandle = agNULL;
517
518 dmDeviceData[i].dmPortContext = agNULL;
519 dmDeviceData[i].dmExpander = agNULL;
520 dmDeviceData[i].ExpDevice = agNULL;
521 dmDeviceData[i].phyID = 0xFF;
522 dmDeviceData[i].SASAddressID.sasAddressHi = 0;
523 dmDeviceData[i].SASAddressID.sasAddressLo = 0;
524 dmDeviceData[i].valid = agFALSE;
525 dmDeviceData[i].valid2 = agFALSE;
526 dmDeviceData[i].processed = agFALSE;
527 dmDeviceData[i].initiator_ssp_stp_smp = 0;
528 dmDeviceData[i].target_ssp_stp_smp = 0;
529 dmDeviceData[i].numOfPhys = 0;
530// dmDeviceData[i].registered = agFALSE;
531 dmDeviceData[i].directlyAttached = agFALSE;
532 dmDeviceData[i].SASSpecDeviceType = 0xFF;
533 dmDeviceData[i].IOStart = 0;
534 dmDeviceData[i].IOResponse = 0;
535 dmDeviceData[i].agDeviceResetContext.osData = agNULL;
536 dmDeviceData[i].agDeviceResetContext.sdkData = agNULL;
537 dmDeviceData[i].TRflag = agFALSE;
538 dmDeviceData[i].ResetCnt = 0;
539 dmDeviceData[i].registered = agFALSE;
540 dmDeviceData[i].reported = agFALSE;
541
542 dmDeviceData[i].MCN = 0;
543 dmDeviceData[i].MCNDone = agFALSE;
544 dmDeviceData[i].PrevMCN = 0;
545
546 dm_memset( &(dmDeviceData[i].dmDeviceInfo), 0, sizeof(dmDeviceInfo_t));
547 /* some other variables */
548 DMLIST_ENQUEUE_AT_TAIL(&(dmDeviceData[i].FreeLink), &(dmAllShared->FreeDeviceList));
549 }
550
551 return;
552}
553osGLOBAL void
555 dmRoot_t *dmRoot,
556 dmDeviceData_t *oneDeviceData
557 )
558{
559 DM_DBG3(("dmDeviceDataReInit: start \n"));
560
561 oneDeviceData->DeviceType = DM_DEFAULT_DEVICE;
562// oneDeviceData->agDevHandle = agNULL;
563
564 oneDeviceData->dmPortContext = agNULL;
565 oneDeviceData->dmExpander = agNULL;
566 oneDeviceData->ExpDevice = agNULL;
567 oneDeviceData->phyID = 0xFF;
568 oneDeviceData->SASAddressID.sasAddressHi = 0;
569 oneDeviceData->SASAddressID.sasAddressLo = 0;
570 oneDeviceData->valid = agFALSE;
571 oneDeviceData->valid2 = agFALSE;
572 oneDeviceData->processed = agFALSE;
573 oneDeviceData->initiator_ssp_stp_smp = 0;
574 oneDeviceData->target_ssp_stp_smp = 0;
575 oneDeviceData->numOfPhys = 0;
576// oneDeviceData->registered = agFALSE;
577 oneDeviceData->directlyAttached = agFALSE;
578 oneDeviceData->SASSpecDeviceType = 0xFF;
579 oneDeviceData->IOStart = 0;
580 oneDeviceData->IOResponse = 0;
581 oneDeviceData->agDeviceResetContext.osData = agNULL;
582 oneDeviceData->agDeviceResetContext.sdkData = agNULL;
583 oneDeviceData->TRflag = agFALSE;
584 oneDeviceData->ResetCnt = 0;
585 oneDeviceData->registered = agFALSE;
586 oneDeviceData->reported = agFALSE;
587
588 oneDeviceData->MCN = 0;
589 oneDeviceData->MCNDone = agFALSE;
590 oneDeviceData->PrevMCN = 0;
591
592 dm_memset( &(oneDeviceData->dmDeviceInfo), 0, sizeof(dmDeviceInfo_t));
593
594 return;
595}
596
597
598osGLOBAL void
600 dmRoot_t *dmRoot,
601 bit32 max_exp
602 )
603{
604 dmIntRoot_t *dmIntRoot = (dmIntRoot_t *)dmRoot->dmData;
605 dmIntContext_t *dmAllShared = (dmIntContext_t *)&dmIntRoot->dmAllShared;
606 dmExpander_t *dmExpData = (dmExpander_t *)dmAllShared->ExpanderMem;
607 bit32 i = 0;
608 DM_DBG3(("dmExpanderDeviceDataInit: start \n"));
609
610 DMLIST_INIT_HDR(&(dmAllShared->freeExpanderList));
611 DMLIST_INIT_HDR(&(dmAllShared->mainExpanderList));
612
613 for(i=0;i<max_exp;i++)
614 {
615 DMLIST_INIT_ELEMENT(&(dmExpData[i].linkNode));
616 DMLIST_INIT_ELEMENT(&(dmExpData[i].upNode));
617 /* initialize expander fields */
618 dmExpData[i].dmRoot = agNULL;
619 dmExpData[i].agDevHandle = agNULL;
620 dmExpData[i].dmDevice = agNULL;
621 dmExpData[i].dmUpStreamExpander = agNULL;
622 dmExpData[i].dmCurrentDownStreamExpander = agNULL;
623 dmExpData[i].hasUpStreamDevice = agFALSE;
624 dmExpData[i].numOfUpStreamPhys = 0;
625 dmExpData[i].currentUpStreamPhyIndex = 0;
626 dmExpData[i].numOfDownStreamPhys = 0;
627 dmExpData[i].currentDownStreamPhyIndex = 0;
628 dmExpData[i].discoveringPhyId = 0;
629 dmExpData[i].underDiscovering = agFALSE;
630 dmExpData[i].id = i;
631 DM_DBG3(("dmExpanderDeviceDataInit: exp id %d\n", i));
632
633 dmExpData[i].dmReturnginExpander = agNULL;
634 dmExpData[i].discoverSMPAllowed = agTRUE;
635 dm_memset( &(dmExpData[i].currentIndex), 0, sizeof(dmExpData[i].currentIndex));
636 dm_memset( &(dmExpData[i].upStreamPhys), 0, sizeof(dmExpData[i].upStreamPhys));
637 dm_memset( &(dmExpData[i].downStreamPhys), 0, sizeof(dmExpData[i].downStreamPhys));
638 dm_memset( &(dmExpData[i].routingAttribute), 0, sizeof(dmExpData[i].routingAttribute));
639 dmExpData[i].configSASAddrTableIndex = 0;
640 dm_memset( &(dmExpData[i].configSASAddressHiTable), 0, sizeof(dmExpData[i].configSASAddressHiTable));
641 dm_memset( &(dmExpData[i].configSASAddressLoTable), 0, sizeof(dmExpData[i].configSASAddressLoTable));
642 dmExpData[i].SAS2 = 0; /* default is SAS 1.1 spec */
643 dmExpData[i].TTTSupported = agFALSE; /* Table to Table is supported */
644 dmExpData[i].UndoDueToTTTSupported = agFALSE;
645
646
647 DMLIST_ENQUEUE_AT_TAIL(&(dmExpData[i].linkNode), &(dmAllShared->freeExpanderList));
648 }
649 return;
650}
651
652/* re-intialize an expander */
653osGLOBAL void
655 dmRoot_t *dmRoot,
656 dmExpander_t *oneExpander
657 )
658{
659 DM_DBG3(("dmExpanderDeviceDataReInit: start \n"));
660 oneExpander->dmRoot = agNULL;
661 oneExpander->agDevHandle = agNULL;
662 oneExpander->dmDevice = agNULL;
663 oneExpander->dmUpStreamExpander = agNULL;
664 oneExpander->dmCurrentDownStreamExpander = agNULL;
665 oneExpander->hasUpStreamDevice = agFALSE;
666 oneExpander->numOfUpStreamPhys = 0;
667 oneExpander->currentUpStreamPhyIndex = 0;
668 oneExpander->numOfDownStreamPhys = 0;
669 oneExpander->currentDownStreamPhyIndex = 0;
670 oneExpander->discoveringPhyId = 0;
671 oneExpander->underDiscovering = agFALSE;
672 oneExpander->dmReturnginExpander = agNULL;
673 oneExpander->discoverSMPAllowed = agTRUE;
674 dm_memset( &(oneExpander->currentIndex), 0, sizeof(oneExpander->currentIndex));
675 dm_memset( &(oneExpander->upStreamPhys), 0, sizeof(oneExpander->upStreamPhys));
676 dm_memset( &(oneExpander->downStreamPhys), 0, sizeof(oneExpander->downStreamPhys));
677 dm_memset( &(oneExpander->routingAttribute), 0, sizeof(oneExpander->routingAttribute));
678 oneExpander->configSASAddrTableIndex = 0;
679 dm_memset( &(oneExpander->configSASAddressHiTable), 0, sizeof(oneExpander->configSASAddressHiTable));
680 dm_memset( &(oneExpander->configSASAddressLoTable), 0, sizeof(oneExpander->configSASAddressLoTable));
681 oneExpander->SAS2 = 0; /* default is SAS 1.1 spec */
682 oneExpander->TTTSupported = agFALSE; /* Table to Table is supported */
683 oneExpander->UndoDueToTTTSupported = agFALSE;
684
685 return;
686}
687
688osGLOBAL void
690 dmRoot_t *dmRoot
691 )
692{
693 dmIntRoot_t *dmIntRoot = (dmIntRoot_t *)dmRoot->dmData;
694 dmIntContext_t *dmAllShared = (dmIntContext_t *)&dmIntRoot->dmAllShared;
695 dmIntPortContext_t *dmPortContext = (dmIntPortContext_t *)dmAllShared->PortContextMem;
696 int i = 0;
697#ifdef TBD
698 int j = 0;
699#endif
700
701 DM_DBG3(("dmPortContextInit: start \n"));
702
703 DMLIST_INIT_HDR(&(dmAllShared->MainPortContextList));
704 DMLIST_INIT_HDR(&(dmAllShared->FreePortContextList));
705 for(i=0;i<DM_MAX_PORT_CONTEXT;i++)
706 {
707 DMLIST_INIT_ELEMENT(&(dmPortContext[i].FreeLink));
708 DMLIST_INIT_ELEMENT(&(dmPortContext[i].MainLink));
709
710 DMLIST_INIT_HDR(&(dmPortContext[i].discovery.discoveringExpanderList));
711 DMLIST_INIT_HDR(&(dmPortContext[i].discovery.UpdiscoveringExpanderList));
713 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.discoveryTimer));
714 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.configureRouteTimer));
715 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.deviceRegistrationTimer));
716 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.SMPBusyTimer));
717 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.BCTimer));
718 dmInitTimerRequest(dmRoot, &(dmPortContext[i].discovery.DiscoverySMPTimer));
719 dmPortContext[i].discovery.retries = 0;
720 dmPortContext[i].discovery.configureRouteRetries = 0;
721 dmPortContext[i].discovery.deviceRetistrationRetries = 0;
722 dmPortContext[i].discovery.pendingSMP = 0;
723 dmPortContext[i].discovery.SeenBC = agFALSE;
724 dmPortContext[i].discovery.forcedOK = agFALSE;
725 dmPortContext[i].discovery.SMPRetries = 0;
726 dmPortContext[i].discovery.DeferredError = agFALSE;
727 dmPortContext[i].discovery.ConfiguresOthers = agFALSE;
728 dmPortContext[i].discovery.ResetTriggerred = agFALSE;
729
730#ifdef INITIATOR_DRIVER
731 dmPortContext[i].DiscoveryState = DM_DSTATE_NOT_STARTED;
732 dmPortContext[i].DiscoveryAbortInProgress = agFALSE;
733 dmPortContext[i].directAttatchedSAS = agFALSE;
734 dmPortContext[i].DiscoveryRdyGiven = agFALSE;
735 dmPortContext[i].SeenLinkUp = agFALSE;
736
737#endif
738 dmPortContext[i].id = i;
739#ifdef TBD
740 dmPortContext[i].agPortContext = agNULL;
741#endif
742 dmPortContext[i].LinkRate = 0;
743 dmPortContext[i].Count = 0;
744 dmPortContext[i].valid = agFALSE;
745 dmPortContext[i].RegFailed = agFALSE;
746
747#ifdef TBD
748 for (j=0;j<DM_MAX_NUM_PHYS;j++)
749 {
750 dmPortContext[i].PhyIDList[j] = agFALSE;
751 }
752#endif
753 dmPortContext[i].RegisteredDevNums = 0;
754 dmPortContext[i].eventPhyID = 0xFF;
755 dmPortContext[i].Transient = agFALSE;
756
757 /* add more variables later */
758 DMLIST_ENQUEUE_AT_TAIL(&(dmPortContext[i].FreeLink), &(dmAllShared->FreePortContextList));
759 }
760
761#ifdef DM_INTERNAL_DEBUG /* for debugging only */
762 for(i=0;i<DM_MAX_PORT_CONTEXT;i++)
763 {
764 DM_DBG6(("dmPortContextInit: index %d &tdsaPortContext[] %p\n", i, &(dmPortContext[i])));
765 }
766 DM_DBG6(("dmPortContextInit: sizeof(tdsaPortContext_t) %d 0x%x\n", sizeof(dmIntPortContext_t), sizeof(dmIntPortContext_t)));
767#endif
768
769 return;
770}
771
772osGLOBAL void
774 dmRoot_t *dmRoot,
775 dmIntPortContext_t *onePortContext
776 )
777{
778 dmDiscovery_t *discovery;
779
780 DM_DBG3(("dmPortContextReInit: start \n"));
781
782 discovery = &(onePortContext->discovery);
783
785 onePortContext->discovery.retries = 0;
786 onePortContext->discovery.configureRouteRetries = 0;
787 onePortContext->discovery.deviceRetistrationRetries = 0;
788 onePortContext->discovery.pendingSMP = 0;
789 onePortContext->discovery.SeenBC = agFALSE;
790 onePortContext->discovery.forcedOK = agFALSE;
791 onePortContext->discovery.SMPRetries = 0;
792 onePortContext->discovery.DeferredError = agFALSE;
793 onePortContext->discovery.ConfiguresOthers = agFALSE;
794 onePortContext->discovery.ResetTriggerred = agFALSE;
795
796 /* free expander lists */
797 dmCleanAllExp(dmRoot, onePortContext);
798
799 /* kill the discovery-related timers if they are running */
801 if (discovery->discoveryTimer.timerRunning == agTRUE)
802 {
805 dmRoot,
806 &discovery->discoveryTimer
807 );
808 }
809 else
810 {
812 }
813
814
816 if (discovery->configureRouteTimer.timerRunning == agTRUE)
817 {
820 dmRoot,
821 &discovery->configureRouteTimer
822 );
823 }
824 else
825 {
827 }
828
829
832 {
835 dmRoot,
836 &discovery->deviceRegistrationTimer
837 );
838 }
839 else
840 {
842 }
843
844
846 if (discovery->BCTimer.timerRunning == agTRUE)
847 {
850 dmRoot,
851 &discovery->BCTimer
852 );
853 }
854 else
855 {
857 }
858
859
861 if (discovery->SMPBusyTimer.timerRunning == agTRUE)
862 {
865 dmRoot,
866 &discovery->SMPBusyTimer
867 );
868 }
869 else
870 {
872 }
873
874
876 if (discovery->DiscoverySMPTimer.timerRunning == agTRUE)
877 {
880 dmRoot,
881 &discovery->DiscoverySMPTimer
882 );
883 }
884 else
885 {
887 }
888
889 onePortContext->DiscoveryState = DM_DSTATE_NOT_STARTED;
890 onePortContext->DiscoveryAbortInProgress = agFALSE;
891 onePortContext->directAttatchedSAS = agFALSE;
892 onePortContext->DiscoveryRdyGiven = agFALSE;
893 onePortContext->SeenLinkUp = agFALSE;
894
895 onePortContext->dmPortContext->dmData = agNULL;
896 onePortContext->dmPortContext = agNULL;
897 onePortContext->dmRoot = agNULL;
898
899 onePortContext->LinkRate = 0;
900 onePortContext->Count = 0;
901 onePortContext->valid = agFALSE;
902 onePortContext->RegisteredDevNums = 0;
903 onePortContext->eventPhyID = 0xFF;
904 onePortContext->Transient = agFALSE;
905
906 return;
907}
908
909
910osGLOBAL void
912 dmRoot_t *dmRoot
913 )
914{
915 dmIntRoot_t *dmIntRoot = (dmIntRoot_t *)dmRoot->dmData;
916 dmIntContext_t *dmAllShared = (dmIntContext_t *)&dmIntRoot->dmAllShared;
917
918#ifdef DM_DEBUG_ENABLE
919 dmIntPortContext_t *dmPortContext = (dmIntPortContext_t *)dmAllShared->PortContextMem;
920
921 DM_DBG6(("dmInitTimers: start \n"));
922 DM_DBG6(("dmInitTimers: ******* tdsaRoot %p \n", dmIntRoot));
923 DM_DBG6(("dmInitTimers: ******* tdsaPortContext %p \n",dmPortContext));
924#endif
925
926 /* initialize the timerlist */
927 DMLIST_INIT_HDR(&(dmAllShared->timerlist));
928
929 return;
930}
931#endif /* FDS_ DM */
932
933
#define DM_RC_FAILURE
Definition: dm.h:49
#define DM_CACHED_MEM
Definition: dm.h:41
#define DM_DMA_MEM
Definition: dm.h:42
#define DM_RC_SUCCESS
Definition: dm.h:48
#define DM_DISCOVERY_OPTION_FULL_START
Definition: dm.h:59
osGLOBAL bit32 dmInitialize(dmRoot_t *dmRoot, agsaRoot_t *agRoot, dmMemoryRequirement_t *memoryAllocated, dmSwConfig_t *swConfig, bit32 usecsPerTick)
osGLOBAL void dmGetRequirements(dmRoot_t *dmRoot, dmSwConfig_t *swConfig, dmMemoryRequirement_t *memoryRequirement, bit32 *usecsPerTick, bit32 *maxNumLocks)
#define DM_EXPANDER_MEM_INDEX
Definition: dmdefs.h:37
#define DM_USECS_PER_TICK
Definition: dmdefs.h:51
#define DM_DEVICE_MEM_INDEX
Definition: dmdefs.h:36
#define DM_INDIRECT_SMP_MEM_INDEX
Definition: dmdefs.h:39
@ DM_MAX_LOCKS
Definition: dmdefs.h:69
@ DM_TIMER_LOCK
Definition: dmdefs.h:67
#define DM_DSTATE_NOT_STARTED
Definition: dmdefs.h:137
#define DM_ROOT_MEM_INDEX
Definition: dmdefs.h:34
#define DM_MAX_DEV
Definition: dmdefs.h:45
#define DM_MAX_PORT_CONTEXT
Definition: dmdefs.h:47
#define DM_MAX_SMP
Definition: dmdefs.h:48
#define IT_NEXUS_TIMEOUT
Definition: dmdefs.h:1125
#define DM_MAX_INDIRECT_SMP
Definition: dmdefs.h:49
#define DM_DBG6(format)
Definition: dmdefs.h:129
#define DM_DEFAULT_DEVICE
Definition: dmdefs.h:1145
#define DM_PORT_MEM_INDEX
Definition: dmdefs.h:35
#define DM_MAX_EXPANDER_DEV
Definition: dmdefs.h:46
#define DM_DBG1(format)
Definition: dmdefs.h:124
#define DEFAULT_KEY_BUFFER_SIZE
Definition: dmdefs.h:60
#define DM_SMP_MEM_INDEX
Definition: dmdefs.h:38
#define DISCOVERY_RETRIES
Definition: dmdefs.h:1083
#define DM_MAX_NUM_PHYS
Definition: dmdefs.h:43
#define DM_DBG3(format)
Definition: dmdefs.h:126
#define SMP_INDIRECT_PAYLOAD
Definition: dmdefs.h:77
__FBSDID("$FreeBSD$")
#define DMLIST_INIT_HDR(hdr)
Definition: dmlist.h:36
#define DMLIST_INIT_ELEMENT(hdr)
Definition: dmlist.h:42
#define DMLIST_ENQUEUE_AT_TAIL(toAddHdr, listHdr)
Definition: dmlist.h:56
osGLOBAL void dmKillTimer(dmRoot_t *dmRoot, dmTimerRequest_t *timerRequest)
osGLOBAL void dmInitTimerRequest(dmRoot_t *dmRoot, dmTimerRequest_t *timerRequest)
osGLOBAL void dmPortContextReInit(dmRoot_t *dmRoot, dmIntPortContext_t *onePortContext)
osGLOBAL void dmDeviceDataReInit(dmRoot_t *dmRoot, dmDeviceData_t *oneDeviceData)
osGLOBAL void * dm_memset(void *s, int c, bit32 n)
osGLOBAL void dmSMPInit(dmRoot_t *dmRoot)
osGLOBAL void dmInitTimers(dmRoot_t *dmRoot)
osGLOBAL void dmCleanAllExp(dmRoot_t *dmRoot, dmIntPortContext_t *onePortContext)
osGLOBAL void dmPortContextInit(dmRoot_t *dmRoot)
osGLOBAL void dmExpanderDeviceDataInit(dmRoot_t *dmRoot, bit32 max_exp)
osGLOBAL void dmExpanderDeviceDataReInit(dmRoot_t *dmRoot, dmExpander_t *oneExpander)
osGLOBAL void dmDeviceDataInit(dmRoot_t *dmRoot)
struct dmIntPortContext_s dmIntPortContext_t
struct dmDeviceData_s dmDeviceData_t
struct dmSMPRequestBody_s dmSMPRequestBody_t
struct dmExpander_s dmExpander_t
struct dmIntRoot_s dmIntRoot_t
#define DM_ASSERT
Definition: ossa.h:39
#define osti_strncmp(s1, s2, n)
Definition: osstring.h:71
#define osti_strtoul(nptr, endptr, base)
Definition: osstring.h:75
#define osGLOBAL
Definition: ostypes.h:147
#define agNULL
Definition: ostypes.h:151
unsigned int bit32
Definition: ostypes.h:99
#define agFALSE
Definition: ostypes.h:150
#define agTRUE
Definition: ostypes.h:149
unsigned char bit8
Definition: ostypes.h:97
The file defines the constants, data structure, and functions defined by LL API.
The file defines the declaration of tSDK APIs.
The file defines the declaration of OS APIs.
bit32 sasAddressLo
Definition: dmtypes.h:82
bit32 sasAddressHi
Definition: dmtypes.h:83
data structure stores OS specific and LL specific context
Definition: sa.h:1658
void * osData
Definition: sa.h:1659
void * sdkData
Definition: sa.h:1660
Definition: dm.h:91
void * dmData
Definition: dm.h:93
bit32 IOStart
Definition: dmtypes.h:236
bit32 ResetCnt
Definition: dmtypes.h:240
bit32 MCNDone
Definition: dmtypes.h:244
bit8 processed
Definition: dmtypes.h:219
bit8 target_ssp_stp_smp
Definition: dmtypes.h:208
bit32 PrevMCN
Definition: dmtypes.h:245
agsaContext_t agDeviceResetContext
Definition: dmtypes.h:238
bit32 TRflag
Definition: dmtypes.h:239
bit8 SASSpecDeviceType
Definition: dmtypes.h:235
dmDeviceInfo_t dmDeviceInfo
Definition: dmtypes.h:224
bit8 DeviceType
Definition: dmtypes.h:198
struct dmExpander_s * dmExpander
Definition: dmtypes.h:227
bit32 registered
Definition: dmtypes.h:241
bit8 numOfPhys
Definition: dmtypes.h:209
struct dmDeviceData_s * ExpDevice
Definition: dmtypes.h:228
bit32 reported
Definition: dmtypes.h:242
dmRoot_t * dmRoot
Definition: dmtypes.h:200
bit8 initiator_ssp_stp_smp
Definition: dmtypes.h:207
DMSASAddressID_t SASAddressID
Definition: dmtypes.h:206
bit8 directlyAttached
Definition: dmtypes.h:234
struct dmIntPortContext_s * dmPortContext
Definition: dmtypes.h:215
bit32 IOResponse
Definition: dmtypes.h:237
bit32 SMPRetries
Definition: dmtypes.h:114
bit32 ResetTriggerred
Definition: dmtypes.h:115
bit32 SeenBC
Definition: dmtypes.h:111
dmTimerRequest_t discoveryTimer
Definition: dmtypes.h:104
bit32 ConfiguresOthers
Definition: dmtypes.h:119
bit32 configureRouteRetries
Definition: dmtypes.h:102
dmTimerRequest_t DiscoverySMPTimer
Definition: dmtypes.h:116
dmTimerRequest_t configureRouteTimer
Definition: dmtypes.h:105
bit32 DeferredError
Definition: dmtypes.h:118
dmTimerRequest_t deviceRegistrationTimer
Definition: dmtypes.h:106
dmTimerRequest_t BCTimer
Definition: dmtypes.h:107
bit32 forcedOK
Definition: dmtypes.h:112
bit32 deviceRetistrationRetries
Definition: dmtypes.h:103
bit32 pendingSMP
Definition: dmtypes.h:110
bit32 retries
Definition: dmtypes.h:101
dmTimerRequest_t SMPBusyTimer
Definition: dmtypes.h:113
bit32 type
Definition: dmtypes.h:99
bit32 underDiscovering
Definition: dmtypes.h:284
bit32 configSASAddressLoTable[DM_MAX_DEV]
Definition: dmtypes.h:298
dmRoot_t * dmRoot
Definition: dmtypes.h:262
bit32 SAS2
Definition: dmtypes.h:301
struct dmExpander_s * dmUpStreamExpander
Definition: dmtypes.h:268
bit32 TTTSupported
Definition: dmtypes.h:303
struct dmExpander_s * dmCurrentDownStreamExpander
Definition: dmtypes.h:278
bit32 discoverSMPAllowed
Definition: dmtypes.h:295
bit16 numOfDownStreamPhys
Definition: dmtypes.h:293
bit32 configSASAddressHiTable[DM_MAX_DEV]
Definition: dmtypes.h:297
bit8 routingAttribute[DM_MAX_EXPANDER_PHYS]
Definition: dmtypes.h:296
bit32 UndoDueToTTTSupported
Definition: dmtypes.h:304
dmDeviceData_t * dmDevice
Definition: dmtypes.h:267
agsaDevHandle_t * agDevHandle
Definition: dmtypes.h:263
bit8 downStreamPhys[DM_MAX_EXPANDER_PHYS]
Definition: dmtypes.h:292
bit8 currentDownStreamPhyIndex
Definition: dmtypes.h:294
bit8 discoveringPhyId
Definition: dmtypes.h:270
bit8 hasUpStreamDevice
Definition: dmtypes.h:269
bit32 id
Definition: dmtypes.h:257
bit32 configSASAddrTableIndex
Definition: dmtypes.h:299
bit16 currentUpStreamPhyIndex
Definition: dmtypes.h:281
bit16 currentIndex[DM_MAX_EXPANDER_PHYS]
Definition: dmtypes.h:272
bit16 numOfUpStreamPhys
Definition: dmtypes.h:280
struct dmExpander_s * dmReturnginExpander
Definition: dmtypes.h:291
bit8 upStreamPhys[DM_MAX_EXPANDER_PHYS]
Definition: dmtypes.h:279
bit32 IndirectSMPLower32
Definition: dmtypes.h:414
struct dmRootOsData_s dmRootOsData
Definition: dmtypes.h:376
dmList_t freeSMPList
Definition: dmtypes.h:409
dmExpander_t * ExpanderMem
Definition: dmtypes.h:403
dmList_t MainDeviceList
Definition: dmtypes.h:400
bit32 usecsPerTick
Definition: dmtypes.h:378
dmList_t timerlist
Definition: dmtypes.h:390
dmList_t freeExpanderList
Definition: dmtypes.h:404
bit32 MaxRetryDiscovery
Definition: dmtypes.h:416
dmList_t FreePortContextList
Definition: dmtypes.h:394
dmList_t MainPortContextList
Definition: dmtypes.h:395
bit32 itNexusTimeout
Definition: dmtypes.h:415
dmDeviceData_t * DeviceMem
Definition: dmtypes.h:398
bit32 RateAdjust
Definition: dmtypes.h:417
dmList_t mainExpanderList
Definition: dmtypes.h:405
bit8 * IndirectSMPMem
Definition: dmtypes.h:412
bit32 IndirectSMPUpper32
Definition: dmtypes.h:413
dmList_t FreeDeviceList
Definition: dmtypes.h:399
agsaRoot_t * agRoot
Definition: dmtypes.h:384
dmSMPRequestBody_t * SMPMem
Definition: dmtypes.h:408
dmIntPortContext_t * PortContextMem
Definition: dmtypes.h:392
bit32 RegisteredDevNums
Definition: dmtypes.h:185
bit8 directAttatchedSAS
Definition: dmtypes.h:180
bit32 DiscoveryAbortInProgress
Definition: dmtypes.h:138
bit32 DiscoveryState
Definition: dmtypes.h:137
dmPortContext_t * dmPortContext
Definition: dmtypes.h:168
dmDiscovery_t discovery
Definition: dmtypes.h:182
bit32 DiscoveryRdyGiven
Definition: dmtypes.h:144
dmRoot_t * dmRoot
Definition: dmtypes.h:169
dmIntContext_t dmAllShared
Definition: dmtypes.h:424
bit32 numElements
Definition: dm.h:126
bit32 physAddrLower
Definition: dm.h:124
bit32 type
Definition: dm.h:129
bit32 singleElementLength
Definition: dm.h:127
bit32 physAddrUpper
Definition: dm.h:123
bit32 totalLength
Definition: dm.h:125
void * virtPtr
Definition: dm.h:121
bit32 alignment
Definition: dm.h:128
dmMem_t dmMemory[DM_NUM_MEM_CHUNKS]
Definition: dm.h:137
void * dmAllShared
Definition: dmtypes.h:76
dmRoot_t * dmRoot
Definition: dmtypes.h:75
bit32 IndirectSMPUpper32
Definition: dmtypes.h:348
dmDeviceData_t * dmDevice
Definition: dmtypes.h:332
void * IndirectSMP
Definition: dmtypes.h:347
void * IndirectSMPResponse
Definition: dmtypes.h:353
dmIntPortContext_t * dmPortContext
Definition: dmtypes.h:342
bit32 IndirectSMPLower32
Definition: dmtypes.h:349
dmRoot_t * dmRoot
Definition: dmtypes.h:340
bit32 numDevHandles
Definition: dm.h:145
bit32 itNexusTimeout
Definition: dm.h:151
bit32 timerRunning
Definition: dmtypes.h:71
osGLOBAL void tddmSingleThreadedLeave(dmRoot_t *dmRoot, bit32 syncLockId)
osGLOBAL bit32 tddmGetTransportParam(dmRoot_t *dmRoot, char *key, char *subkey1, char *subkey2, char *subkey3, char *subkey4, char *subkey5, char *valueName, char *buffer, bit32 bufferLen, bit32 *lenReceived)
osGLOBAL void tddmSingleThreadedEnter(dmRoot_t *dmRoot, bit32 syncLockId)