1285242Sachim/*******************************************************************************
2285242Sachim*Copyright (c) 2014 PMC-Sierra, Inc.  All rights reserved.
3285242Sachim*
4285242Sachim*Redistribution and use in source and binary forms, with or without modification, are permitted provided
5285242Sachim*that the following conditions are met:
6285242Sachim*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7285242Sachim*following disclaimer.
8285242Sachim*2. Redistributions in binary form must reproduce the above copyright notice,
9285242Sachim*this list of conditions and the following disclaimer in the documentation and/or other materials provided
10285242Sachim*with the distribution.
11285242Sachim*
12285242Sachim*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13285242Sachim*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14285242Sachim*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15285242Sachim*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16285242Sachim*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17285242Sachim*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18285242Sachim*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19285242Sachim*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20285242Sachim
21285242Sachim********************************************************************************/
22285242Sachim/*******************************************************************************/
23285242Sachim/** \file
24285242Sachim *
25285242Sachim * $RCSfile: ttdsmp.c,v $
26285242Sachim *
27285242Sachim * Copyright 2006 PMC-Sierra, Inc.
28285242Sachim *
29285242Sachim * $Author: hasungwo $
30285242Sachim * $Revision: 112322 $
31285242Sachim * $Date: 2012-01-04 19:23:42 -0800 (Wed, 04 Jan 2012) $
32285242Sachim *
33285242Sachim * This file contains initiator IO related functions in TD layer
34285242Sachim *
35285242Sachim */
36285242Sachim#include <osenv.h>
37285242Sachim#include <ostypes.h>
38285242Sachim#include <osdebug.h>
39285242Sachim
40285242Sachim#include <sa.h>
41285242Sachim#include <saapi.h>
42285242Sachim#include <saosapi.h>
43285242Sachim
44285242Sachim#include <titypes.h>
45285242Sachim#include <ostiapi.h>
46285242Sachim#include <tiapi.h>
47285242Sachim#include <tiglobal.h>
48285242Sachim
49285242Sachim#include <tdtypes.h>
50285242Sachim#include <osstring.h>
51285242Sachim#include <tdutil.h>
52285242Sachim
53285242Sachim#ifdef INITIATOR_DRIVER
54285242Sachim#include <itdtypes.h>
55285242Sachim#include <itddefs.h>
56285242Sachim#include <itdglobl.h>
57285242Sachim#endif
58285242Sachim
59285242Sachim#ifdef TARGET_DRIVER
60285242Sachim#include "ttdglobl.h"
61285242Sachim#include "ttdtxchg.h"
62285242Sachim#include "ttdtypes.h"
63285242Sachim#endif
64285242Sachim
65285242Sachim#include <tdsatypes.h>
66285242Sachim#include <tdproto.h>
67285242Sachim
68285242SachimosGLOBAL void
69285242SachimttdsaSMPCompleted(
70285242Sachim                  agsaRoot_t            *agRoot,
71285242Sachim                  agsaIORequest_t       *agIORequest,
72285242Sachim                  bit32                 agIOStatus,
73285242Sachim                  //agsaSMPFrameHeader_t  *agFrameHeader, //(TP)
74285242Sachim                  bit32                 agIOInfoLen,
75285242Sachim                  agsaFrameHandle_t     agFrameHandle
76285242Sachim                 )
77285242Sachim{
78285242Sachim  tdsaRootOsData_t       *osData = (tdsaRootOsData_t *)agRoot->osData;
79285242Sachim  tiRoot_t               *tiRoot = (tiRoot_t *)osData->tiRoot;
80285242Sachim  ttdsaXchg_t            *ttdsaXchg    = (ttdsaXchg_t *)agIORequest->osData;
81285242Sachim
82285242Sachim  /* cf) ttdsaIOCompleted */
83285242Sachim  TI_DBG1(("ttdsaSMPCompleted: start\n"));
84285242Sachim  if (tiRoot == agNULL)
85285242Sachim  {
86285242Sachim    TI_DBG1(("ttdsaSMPCompleted: tiRoot is NULL, wrong\n"));
87285242Sachim    return;
88285242Sachim  }
89285242Sachim
90285242Sachim  if (ttdsaXchg == agNULL)
91285242Sachim  {
92285242Sachim    TI_DBG1(("ttdsaSMPCompleted: ttdsaXchg is NULL, wrong\n"));
93285242Sachim    return;
94285242Sachim  }
95285242Sachim
96285242Sachim  ttdsaXchgFreeStruct(tiRoot,ttdsaXchg);
97285242Sachim
98285242Sachim
99285242Sachim  /* to-do: no callback to OS layer */
100285242Sachim  return;
101285242Sachim}
102285242Sachim
103285242SachimosGLOBAL void
104285242SachimttdsaNotSupportRespSend(
105285242Sachim                        agsaRoot_t            *agRoot,
106285242Sachim                        agsaDevHandle_t       *agDevHandle,
107285242Sachim                        ttdsaXchg_t           *ttdsaXchg,
108285242Sachim                        bit8                  smpfn
109285242Sachim                        )
110285242Sachim{
111285242Sachim  bit32                     agRequestType;
112285242Sachim  agsaSASRequestBody_t      *agSASRequestBody;
113285242Sachim  agsaSMPFrame_t            *agSMPFrame;
114285242Sachim  agsaIORequest_t           *agIORequest;
115285242Sachim  bit8                       SMPPayload[SMP_DIRECT_PAYLOAD_LIMIT];    /*(TP)*/
116285242Sachim  tdssSMPFrameHeader_t       tdSMPFrameHeader;              /*(TP)*/
117285242Sachim
118285242Sachim  TI_DBG1(("ttdsaNotSupportSend:\n"));
119285242Sachim  agRequestType = AGSA_SMP_TGT_RESPONSE;
120285242Sachim
121285242Sachim  agIORequest = &(ttdsaXchg->SMPRequestBody.agIORequest);
122285242Sachim
123285242Sachim  agSASRequestBody = &(ttdsaXchg->SMPRequestBody.agSASRequestBody);
124285242Sachim  agSMPFrame = &(agSASRequestBody->smpFrame);
125285242Sachim
126285242Sachim  osti_memset(&tdSMPFrameHeader, 0, sizeof(tdssSMPFrameHeader_t));    /*(TP)*/
127285242Sachim
128285242Sachim  /* smp header */                            /*(TP)*/
129285242Sachim  tdSMPFrameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
130285242Sachim  tdSMPFrameHeader.smpFunction = smpfn;
131285242Sachim  tdSMPFrameHeader.smpFunctionResult = UNKNOWN_SMP_FUNCTION; /* unknown smp */
132285242Sachim  tdSMPFrameHeader.smpReserved = 0;
133285242Sachim
134285242Sachim  /*old*/
135285242Sachim  //agSMPFrame->frameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
136285242Sachim  //agSMPFrame->frameHeader.smpFunction = smpfn;
137285242Sachim  //agSMPFrame->frameHeader.smpFunctionResult = UNKNOWN_SMP_FUNCTION; /* unknown smp */
138285242Sachim
139285242Sachim  osti_memcpy(SMPPayload, &tdSMPFrameHeader, 4);            /*TP)*/
140285242Sachim
141285242Sachim  agSMPFrame->outFrameBuf = SMPPayload;                 /*(TP)*/
142285242Sachim  agSMPFrame->outFrameAddrUpper32 = ttdsaXchg->smpresp.phyAddrUpper;
143285242Sachim  agSMPFrame->outFrameAddrLower32 = ttdsaXchg->smpresp.phyAddrLower;
144285242Sachim  agSMPFrame->outFrameLen = 0; /* no smp response payload */
145285242Sachim
146285242Sachim  //agSMPFrame->phyId = ttdsaXchg->SMPphyId;
147285242Sachim
148285242Sachim#ifdef RPM_SOC
149285242Sachim  /* not work yet because of high priority q */
150285242Sachim  saSMPStart(
151285242Sachim             agRoot,
152285242Sachim             agIORequest,
153285242Sachim             agDevHandle,
154285242Sachim             agRequestType,
155285242Sachim             agSASRequestBody,
156285242Sachim             &ossaSMPCompleted
157285242Sachim             );
158285242Sachim#else
159285242Sachim  saSMPStart(
160285242Sachim             agRoot,
161285242Sachim             agIORequest,
162285242Sachim             0, /* queue number */
163285242Sachim             agDevHandle,
164285242Sachim             agRequestType,
165285242Sachim             agSASRequestBody,
166285242Sachim             &ossaSMPCompleted
167285242Sachim             );
168285242Sachim#endif
169285242Sachim  return;
170285242Sachim}
171285242Sachim
172285242SachimosGLOBAL void
173285242SachimttdsaDiscoverRespSend(
174285242Sachim                      agsaRoot_t            *agRoot,
175285242Sachim                      agsaDevHandle_t       *agDevHandle,
176285242Sachim                      ttdsaXchg_t           *ttdsaXchg
177285242Sachim                      )
178285242Sachim{
179285242Sachim  bit32                     agRequestType;
180285242Sachim  agsaSASRequestBody_t      *agSASRequestBody;
181285242Sachim  agsaSMPFrame_t            *agSMPFrame;
182285242Sachim  smpRespDiscover_t         *Resp;
183285242Sachim  smp_resp_t                *SMPResp;
184285242Sachim  agsaIORequest_t           *agIORequest;
185285242Sachim  bit8                       SMPPayload[SMP_DIRECT_PAYLOAD_LIMIT];    /*(TP)*/
186285242Sachim  tdssSMPFrameHeader_t       tdSMPFrameHeader;              /*(TP)*/
187285242Sachim
188285242Sachim  TI_DBG1(("ttdsaDiscoverRespSend:\n"));
189285242Sachim
190285242Sachim  agRequestType = AGSA_SMP_TGT_RESPONSE;
191285242Sachim
192285242Sachim  SMPResp = (smp_resp_t *)ttdsaXchg->smpresp.virtAddr;
193285242Sachim
194285242Sachim  agIORequest = &(ttdsaXchg->SMPRequestBody.agIORequest);
195285242Sachim
196285242Sachim  agSASRequestBody = &(ttdsaXchg->SMPRequestBody.agSASRequestBody);
197285242Sachim  agSMPFrame = &(agSASRequestBody->smpFrame);
198285242Sachim
199285242Sachim  osti_memset(&tdSMPFrameHeader, 0, sizeof(tdssSMPFrameHeader_t));    /*(TP)*/
200285242Sachim
201285242Sachim  /* smp header */                          /*(TP)*/
202285242Sachim  tdSMPFrameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
203285242Sachim  tdSMPFrameHeader.smpFunction = SMP_DISCOVER; /* discover */
204285242Sachim  tdSMPFrameHeader.smpFunctionResult = SMP_FUNCTION_ACCEPTED;
205285242Sachim  tdSMPFrameHeader.smpReserved = 0;
206285242Sachim
207285242Sachim  /*old*/
208285242Sachim  //agSMPFrame->frameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
209285242Sachim  //agSMPFrame->frameHeader.smpFunction = SMP_DISCOVER; /* discover */
210285242Sachim  //agSMPFrame->frameHeader.smpFunctionResult = SMP_FUNCTION_ACCEPTED;
211285242Sachim
212285242Sachim  osti_memcpy(SMPPayload, &tdSMPFrameHeader, 4);            /*TP)*/
213285242Sachim
214285242Sachim  agSMPFrame->outFrameBuf = SMPPayload;                 /*(TP)*/
215285242Sachim  agSMPFrame->outFrameAddrUpper32 = ttdsaXchg->smpresp.phyAddrUpper;
216285242Sachim  agSMPFrame->outFrameAddrLower32 = ttdsaXchg->smpresp.phyAddrLower;
217285242Sachim  agSMPFrame->outFrameLen = sizeof(smpRespDiscover_t);
218285242Sachim
219285242Sachim  //agSMPFrame->phyId = ttdsaXchg->SMPphyId;
220285242Sachim
221285242Sachim  /* smp response payload */
222285242Sachim  Resp = (smpRespDiscover_t *)&(SMPResp->RespData);
223285242Sachim  osti_memset(Resp, 0, sizeof(smpRespDiscover_t));
224285242Sachim  /* temp, hardcode smp discover response */
225285242Sachim  /* needs to read contents from ID frame */
226285242Sachim  /* assumption: for now, attached to edge expander */
227285242Sachim  Resp->phyIdentifier = 0;
228285242Sachim  Resp->attachedDeviceType = SAS_EDGE_EXPANDER_DEVICE;
229285242Sachim  Resp->negotiatedPhyLinkRate = 0x9; /* enabled, 1.5G */
230285242Sachim  Resp->attached_Ssp_Stp_Smp_Sata_Initiator = 0;
231285242Sachim  Resp->attached_SataPS_Ssp_Stp_Smp_Sata_Target = 0x2; /* SMP target */
232285242Sachim  Resp->sasAddressHi[3] = 0x01;
233285242Sachim  Resp->sasAddressHi[2] = 0x02;
234285242Sachim  Resp->sasAddressHi[1] = 0x03;
235285242Sachim  Resp->sasAddressHi[0] = 0x04;
236285242Sachim  Resp->sasAddressLo[3] = 0x05;
237285242Sachim  Resp->sasAddressLo[2] = 0x06;
238285242Sachim  Resp->sasAddressLo[1] = 0x07;
239285242Sachim  Resp->sasAddressLo[0] = 0x08;
240285242Sachim
241285242Sachim  Resp->attachedSasAddressHi[3] = 0x01;
242285242Sachim  Resp->attachedSasAddressHi[2] = 0x01;
243285242Sachim  Resp->attachedSasAddressHi[1] = 0x01;
244285242Sachim  Resp->attachedSasAddressHi[0] = 0x01;
245285242Sachim  Resp->attachedSasAddressLo[3] = 0x02;
246285242Sachim  Resp->attachedSasAddressLo[2] = 0x02;
247285242Sachim  Resp->attachedSasAddressLo[1] = 0x02;
248285242Sachim  Resp->attachedSasAddressLo[0] = 0x02;
249285242Sachim
250285242Sachim  Resp->attachedPhyIdentifier = 0;
251285242Sachim  Resp->programmedAndHardware_MinPhyLinkRate = 0x8; /* not programmable and 1.5 G */
252285242Sachim  Resp->programmedAndHardware_MaxPhyLinkRate = 0x8; /* not programmable and 1.5 G */
253285242Sachim  Resp->phyChangeCount = 0; /* No broadcast(Change) received */
254285242Sachim  Resp->virtualPhy_partialPathwayTimeout = 0x7; /* no virutal phy and see spec 10.4.3.5, p 404 rev 7 */
255285242Sachim  Resp->routingAttribute = 0;
256285242Sachim  osti_memset(&Resp->reserved13, 0, 5);
257285242Sachim  osti_memset(&Resp->vendorSpecific, 0, 2);
258285242Sachim
259285242Sachim#ifdef RPM_SOC
260285242Sachim  /* not work yet because of high priority q */
261285242Sachim  saSMPStart(
262285242Sachim             agRoot,
263285242Sachim             agIORequest,
264285242Sachim             agDevHandle,
265285242Sachim             agRequestType,
266285242Sachim             agSASRequestBody,
267285242Sachim             &ossaSMPCompleted
268285242Sachim             );
269285242Sachim#else
270285242Sachim  saSMPStart(
271285242Sachim             agRoot,
272285242Sachim             agIORequest,
273285242Sachim             0, /* queue number */
274285242Sachim             agDevHandle,
275285242Sachim             agRequestType,
276285242Sachim             agSASRequestBody,
277285242Sachim             &ossaSMPCompleted
278285242Sachim             );
279285242Sachim#endif
280285242Sachim  return;
281285242Sachim}
282285242Sachim
283285242SachimosGLOBAL void
284285242SachimttdsaReportGeneralRespSend(
285285242Sachim                           agsaRoot_t            *agRoot,
286285242Sachim                           agsaDevHandle_t       *agDevHandle,
287285242Sachim                           ttdsaXchg_t           *ttdsaXchg
288285242Sachim                           )
289285242Sachim{
290285242Sachim  bit32                     agRequestType;
291285242Sachim  agsaSASRequestBody_t      *agSASRequestBody;
292285242Sachim  agsaSMPFrame_t            *agSMPFrame;
293285242Sachim  smpRespReportGeneral_t    *Resp;
294285242Sachim  smp_resp_t                *SMPResp;
295285242Sachim  agsaIORequest_t           *agIORequest;
296285242Sachim  bit8                       SMPPayload[SMP_DIRECT_PAYLOAD_LIMIT];    /*(TP)*/
297285242Sachim  tdssSMPFrameHeader_t       tdSMPFrameHeader;              /*(TP)*/
298285242Sachim
299285242Sachim  TI_DBG1(("ttdsaReportGeneralRespSend:\n"));
300285242Sachim
301285242Sachim  agRequestType = AGSA_SMP_TGT_RESPONSE;
302285242Sachim
303285242Sachim  SMPResp = (smp_resp_t *)ttdsaXchg->smpresp.virtAddr;
304285242Sachim
305285242Sachim  agIORequest = &(ttdsaXchg->SMPRequestBody.agIORequest);
306285242Sachim
307285242Sachim  agSASRequestBody = &(ttdsaXchg->SMPRequestBody.agSASRequestBody);
308285242Sachim  agSMPFrame = &(agSASRequestBody->smpFrame);
309285242Sachim
310285242Sachim  osti_memset(&tdSMPFrameHeader, 0, sizeof(tdssSMPFrameHeader_t));    /*(TP)*/
311285242Sachim
312285242Sachim  tdSMPFrameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
313285242Sachim  tdSMPFrameHeader.smpFunction = SMP_REPORT_GENERAL; /* report general */
314285242Sachim  tdSMPFrameHeader.smpFunctionResult = SMP_FUNCTION_ACCEPTED;
315285242Sachim  tdSMPFrameHeader.smpReserved = 0;
316285242Sachim
317285242Sachim  /*old*/
318285242Sachim  //agSMPFrame->frameHeader.smpFrameType = SMP_RESPONSE; /* SMP response */
319285242Sachim  //agSMPFrame->frameHeader.smpFunction = SMP_REPORT_GENERAL; /* report general */
320285242Sachim  //agSMPFrame->frameHeader.smpFunctionResult = SMP_FUNCTION_ACCEPTED;
321285242Sachim
322285242Sachim  osti_memcpy(SMPPayload, &tdSMPFrameHeader, 4);            /*(TP)*/
323285242Sachim
324285242Sachim  agSMPFrame->outFrameBuf = SMPPayload;                 /*(TP)*/
325285242Sachim  agSMPFrame->outFrameAddrUpper32 = ttdsaXchg->smpresp.phyAddrUpper;
326285242Sachim  agSMPFrame->outFrameAddrLower32 = ttdsaXchg->smpresp.phyAddrLower;
327285242Sachim  agSMPFrame->outFrameLen = sizeof(smpRespReportGeneral_t);
328285242Sachim
329285242Sachim  //agSMPFrame->phyId = ttdsaXchg->SMPphyId;
330285242Sachim
331285242Sachim  /* smp response payload */
332285242Sachim  Resp = (smpRespReportGeneral_t *)&(SMPResp->RespData);
333285242Sachim  osti_memset(Resp, 0, sizeof(smpRespReportGeneral_t));
334285242Sachim  /* temp, hardcode smp general response */
335285242Sachim  Resp->expanderChangeCount16[0] = 1;
336285242Sachim  Resp->expanderRouteIndexes16[0] = 2;
337285242Sachim  Resp->numOfPhys = 0x5; /* 0x1; */
338285242Sachim  Resp->configuring_configurable = 0;
339285242Sachim  tdhexdump("smp general response", (bit8 *)Resp, sizeof(smpRespReportGeneral_t));
340285242Sachim
341285242Sachim#ifdef RPM_SOC
342285242Sachim  /* not work yet because of high priority q */
343285242Sachim  saSMPStart(
344285242Sachim             agRoot,
345285242Sachim             agIORequest,
346285242Sachim             agDevHandle,
347285242Sachim             agRequestType,
348285242Sachim             agSASRequestBody,
349285242Sachim              &ossaSMPCompleted
350285242Sachim             );
351285242Sachim #else
352285242Sachim  saSMPStart(
353285242Sachim             agRoot,
354285242Sachim             agIORequest,
355285242Sachim             0, /* queue number */
356285242Sachim             agDevHandle,
357285242Sachim             agRequestType,
358285242Sachim             agSASRequestBody,
359285242Sachim             &ossaSMPCompleted
360285242Sachim             );
361285242Sachim#endif
362285242Sachim  return;
363285242Sachim}
364285242Sachim
365285242Sachim
366285242SachimosGLOBAL void
367285242SachimttdsaSMPReqReceived(
368285242Sachim                    agsaRoot_t            *agRoot,
369285242Sachim                    agsaDevHandle_t       *agDevHandle,
370285242Sachim                    agsaSMPFrameHeader_t  *agFrameHeader,
371285242Sachim                    agsaFrameHandle_t     agFrameHandle,
372285242Sachim                    bit32                 agFrameLength,
373285242Sachim                    bit32                 phyId
374285242Sachim                    )
375285242Sachim{
376285242Sachim  tdsaRootOsData_t       *osData = (tdsaRootOsData_t *)agRoot->osData;
377285242Sachim  tiRoot_t               *tiRoot = (tiRoot_t *)osData->tiRoot;
378285242Sachim  ttdsaXchg_t            *ttdsaXchg;
379285242Sachim  tdsaDeviceData_t       *oneDeviceData = agNULL;
380285242Sachim
381285242Sachim
382285242Sachim  TI_DBG1(("ttdsaSMPReqReceived: start\n"));
383285242Sachim
384285242Sachim  oneDeviceData = (tdsaDeviceData_t *)agDevHandle->osData;
385285242Sachim
386285242Sachim  if (oneDeviceData == agNULL)
387285242Sachim  {
388285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: no device data\n"));
389285242Sachim    return;
390285242Sachim  }
391285242Sachim
392285242Sachim  ttdsaXchg = ttdsaXchgGetStruct(agRoot);
393285242Sachim
394285242Sachim  if (ttdsaXchg == agNULL)
395285242Sachim  {
396285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: no free xchg structures\n"));
397285242Sachim    return;
398285242Sachim  }
399285242Sachim
400285242Sachim
401285242Sachim  oneDeviceData->agDevHandle = agDevHandle;
402285242Sachim  oneDeviceData->agRoot = agRoot;
403285242Sachim
404285242Sachim  /* saving the device */
405285242Sachim  ttdsaXchg->DeviceData = oneDeviceData;
406285242Sachim
407285242Sachim  ttdsaXchg->agRoot  = agRoot;
408285242Sachim  ttdsaXchg->tiRoot  = tiRoot;
409285242Sachim
410285242Sachim  ttdsaXchg->SMPRequestBody.agIORequest.sdkData = agNULL;
411285242Sachim
412285242Sachim  ttdsaXchg->SMPphyId = phyId;
413285242Sachim
414285242Sachim  switch ( agFrameHeader->smpFunction )
415285242Sachim  {
416285242Sachim  case SMP_REPORT_GENERAL:
417285242Sachim  {
418285242Sachim    /* must spec p392, rev7*/
419285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: REPORT_GENERAL\n"));
420285242Sachim    ttdsaReportGeneralRespSend(agRoot, agDevHandle, ttdsaXchg);
421285242Sachim    break;
422285242Sachim  }
423285242Sachim  case SMP_REPORT_MANUFACTURE_INFORMATION:
424285242Sachim  {
425285242Sachim    /* optional, spec p394, rev7*/
426285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: REPORT_MANUFACTURE_INFORMATION\n"));
427285242Sachim    ttdsaNotSupportRespSend(agRoot, agDevHandle, ttdsaXchg, SMP_REPORT_MANUFACTURE_INFORMATION);
428285242Sachim    break;
429285242Sachim  }
430285242Sachim  case SMP_DISCOVER:
431285242Sachim  {
432285242Sachim    /* must, spec p398, rev7*/
433285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: DISCOVER\n"));
434285242Sachim    ttdsaDiscoverRespSend(agRoot, agDevHandle, ttdsaXchg);
435285242Sachim    break;
436285242Sachim  }
437285242Sachim  default:
438285242Sachim  {
439285242Sachim    TI_DBG1(("ttdsaSMPReqReceived: UKNOWN or not yet supported 0x%x\n", agFrameHeader->smpFunction));
440285242Sachim    ttdsaNotSupportRespSend(agRoot, agDevHandle, ttdsaXchg, (bit8) agFrameHeader->smpFunction);
441285242Sachim    break;
442285242Sachim  }
443285242Sachim  }
444285242Sachim
445285242Sachim  return;
446285242Sachim}
447