]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/npe/include/IxAtmdAcc.h
doc: SPI: Add qspi test details on AM43xx
[karo-tx-uboot.git] / drivers / net / npe / include / IxAtmdAcc.h
1 /**
2  * @file    IxAtmdAcc.h
3  *
4  * @date    07-Nov-2001
5  *
6  * @brief IxAtmdAcc Public API
7  *
8  * This file contains the public API of IxAtmdAcc, related to the
9  * data functions of the component
10  *
11  * 
12  * @par
13  * IXP400 SW Release version 2.0
14  * 
15  * -- Copyright Notice --
16  * 
17  * @par
18  * Copyright 2001-2005, Intel Corporation.
19  * All rights reserved.
20  * 
21  * @par
22  * SPDX-License-Identifier:     BSD-3-Clause
23  * @par
24  * -- End of Copyright Notice --
25  */
26
27 /* ------------------------------------------------------
28    Doxygen group definitions
29    ------------------------------------------------------ */
30
31 /**
32  *
33  * @defgroup IxAtmdAccAPI IXP400 ATM Driver Access (IxAtmdAcc) API
34  *
35  * @brief The public API for the IXP400 Atm Driver Data component
36  *
37  * IxAtmdAcc is the low level interface by which AAL0/AAL5 and
38  * OAM data gets transmitted to,and received from the Utopia bus.
39  *
40  * For AAL0/AAL5 services transmit and receive connections may
41  * be established independantly for unique combinations of
42  * port,VPI,and VCI.
43  *
44  * Two AAL0 services supporting 48 or 52 byte cell data are provided.
45  * Submitted AAL0 PDUs must be a multiple of the cell data size (48/52).
46  * AAL0_52 is a raw cell service the client must format
47  * the PDU with an ATM cell header (excluding HEC) at the start of
48  * each cell, note that AtmdAcc does not validate the cell headers in
49  * a submitted PDU.
50  *
51  * OAM cells cannot be received over the AAL0 service but instead
52  * are received over a dedicated OAM service.
53  *
54  * For the OAM service an "OAM Tx channel" may be enabled for a port
55  * by establishing a single dedicated OAM Tx connection on that port.
56  * A single "OAM Rx channel" for all ports may be  enabled by
57  * establishing a dedicated OAM Rx connection.
58  *
59  * The OAM service allows buffers containing 52 byte OAM F4/F5 cells
60  * to be transmitted and received over the dedicated OAM channels.
61  * HEC is appended/removed, and CRC-10 performed by the NPE. The OAM
62  * service offered by AtmdAcc is a raw cell transport service.
63  * It is assumed that ITU I.610 procedures that make use of this
64  * service are implemented above AtmdAcc.
65  *
66  * Note that the dedicated OAM connections are established on
67  * reserved VPI,VCI, and (in the case of Rx) port values defined below.
68  * These values are used purely to descriminate the dedicated OAM channels
69  * and do not identify a particular OAM F4/F5 flow. F4/F5 flows may be
70  * realised for particluar VPI/VCIs by manipulating the VPI,VCI
71  * fields of the ATM cell headers of cells in the buffers passed
72  * to AtmdAcc. Note that AtmdAcc does not validate the cell headers
73  * in a submitted OAM PDU.
74  *
75  *
76  *
77  * This part is related to the User datapath processing
78  *
79  * @{
80  */
81
82 #ifndef IXATMDACC_H
83 #define IXATMDACC_H
84
85 #include "IxAtmTypes.h"
86
87 /* ------------------------------------------------------
88    AtmdAcc Data Types definition
89    ------------------------------------------------------ */
90
91 /**
92  *
93  * @ingroup IxAtmdAccAPI
94  *
95  * @def IX_ATMDACC_WARNING
96  *
97  * @brief Warning return code
98  *
99  * This constant is used to tell IxAtmDAcc user about a special case.
100  *
101  */
102 #define IX_ATMDACC_WARNING 2
103
104 /**
105  *
106  * @ingroup IxAtmdAccAPI
107  *
108  * @def IX_ATMDACC_BUSY
109  *
110  * @brief Busy return code
111  *
112  * This constant is used to tell IxAtmDAcc user that the request
113  * is correct, but cannot be processed because the IxAtmAcc resources
114  * are already used. The user has to retry its request later
115  *
116  */
117 #define IX_ATMDACC_BUSY 3
118
119 /**
120  *
121  * @ingroup IxAtmdAccAPI
122  *
123  * @def IX_ATMDACC_RESOURCES_STILL_ALLOCATED
124  *
125  * @brief Disconnect return code
126  *
127  * This constant is used to tell IxAtmDAcc user that the disconnect
128  * functions are not complete because the resources used by the driver
129  * are not yet released. The user has to retry the disconnect call
130  * later.
131  *
132  */
133 #define IX_ATMDACC_RESOURCES_STILL_ALLOCATED 4
134
135 /**
136  *
137  * @ingroup IxAtmdAccAPI
138  *
139  * @def IX_ATMDACC_DEFAULT_REPLENISH_COUNT
140  *
141  * @brief Default resources usage for RxVcFree replenish mechanism
142  *
143  * This constant is used to tell IxAtmDAcc to allocate and use
144  * the minimum of resources for rx free replenish.
145  *
146  * @sa ixAtmdAccRxVcConnect
147  */
148 #define IX_ATMDACC_DEFAULT_REPLENISH_COUNT 0
149
150
151 /**
152  * @ingroup IxAtmdAccAPI
153  *
154  * @def IX_ATMDACC_OAM_TX_VPI
155  *
156  * @brief The reserved value used for the dedicated OAM
157  * Tx connection. This "well known" value is used by atmdAcc and
158  * its clients to dsicriminate the OAM channel, and should be chosen so
159  * that it does not coencide with the VPI value used in an AAL0/AAL5 connection.
160  * Any attempt to connect a service type other than OAM on this VPI will fail.
161  *
162  *
163  */
164 #define IX_ATMDACC_OAM_TX_VPI 0
165
166 /**
167  * @ingroup IxAtmdAccAPI
168  *
169  * @def IX_ATMDACC_OAM_TX_VCI
170  *
171  * @brief The reserved value used for the dedicated OAM
172  * Tx connection. This "well known" value is used by atmdAcc and
173  * its clients to dsicriminate the OAM channel, and should be chosen so
174  * that it does not coencide with the VCI value used in an AAL0/AAL5 connection.
175  * Any attempt to connect a service type other than OAM on this VCI will fail.
176  */
177 #define IX_ATMDACC_OAM_TX_VCI 0
178
179
180  /**
181  * @ingroup IxAtmdAccAPI
182  *
183  * @def IX_ATMDACC_OAM_RX_PORT
184  *
185  * @brief The reserved dummy PORT used for all dedicated OAM
186  * Rx connections. Note that this is not a real port but must
187  * have a value that lies within the valid range of port values.
188  */
189 #define IX_ATMDACC_OAM_RX_PORT IX_UTOPIA_PORT_0
190
191  /**
192  * @ingroup IxAtmdAccAPI
193  *
194  * @def IX_ATMDACC_OAM_RX_VPI
195  *
196  * @brief The reserved value value used for the dedicated OAM
197  * Rx connection. This value should be chosen so that it does not
198  * coencide with the VPI value used in an AAL0/AAL5 connection.
199  * Any attempt to connect a service type other than OAM on this VPI will fail.
200  */
201 #define IX_ATMDACC_OAM_RX_VPI 0
202
203 /**
204  * @ingroup IxAtmdAccAPI
205  *
206  * @def IX_ATMDACC_OAM_RX_VCI
207  *
208  * @brief The reserved value value used for the dedicated OAM
209  * Rx connection. This value should be chosen so that it does not
210  * coencide with the VCI value used in an AAL0/AAL5 connection.
211  * Any attempt to connect a service type other than OAM on this VCI will fail.
212  */
213 #define IX_ATMDACC_OAM_RX_VCI 0
214
215
216 /**
217  * @enum IxAtmdAccPduStatus
218  *
219  * @ingroup IxAtmdAccAPI
220  *
221  * @brief IxAtmdAcc Pdu status :
222  *
223  * IxAtmdAccPduStatus is used during a RX operation to indicate
224  * the status of the received PDU
225  *
226  */
227
228 typedef enum
229 {
230     IX_ATMDACC_AAL0_VALID = 0,    /**< aal0 pdu */
231     IX_ATMDACC_OAM_VALID,         /**< OAM pdu */
232     IX_ATMDACC_AAL2_VALID,        /**< aal2 pdu @b reserved for future use */
233     IX_ATMDACC_AAL5_VALID,        /**< aal5 pdu complete and trailer is valid */
234     IX_ATMDACC_AAL5_PARTIAL,      /**< aal5 pdu not complete, trailer is missing */
235     IX_ATMDACC_AAL5_CRC_ERROR,    /**< aal5 pdu not complete, crc error/length error */
236     IX_ATMDACC_MBUF_RETURN        /**< empty buffer returned to the user */
237 } IxAtmdAccPduStatus;
238
239
240 /**
241  *
242  * @enum IxAtmdAccAalType
243  *
244  * @ingroup IxAtmdAccAPI
245  *
246  * @brief IxAtmdAcc AAL Service Type :
247  *
248  * IxAtmdAccAalType defines the type of traffic to run on this VC
249  *
250  */
251 typedef enum
252 {
253     IX_ATMDACC_AAL5,                /**< ITU-T AAL5 */
254     IX_ATMDACC_AAL2,                /**< ITU-T AAL2 @b reserved for future use */
255     IX_ATMDACC_AAL0_48,             /**< AAL0 48 byte payloads (cell header is added by NPE)*/
256     IX_ATMDACC_AAL0_52,             /**< AAL0 52 byte cell data (HEC is added by NPE) */
257     IX_ATMDACC_OAM,                 /**< OAM cell transport service (HEC is added by NPE)*/
258     IX_ATMDACC_MAX_SERVICE_TYPE     /**< not a service, used for parameter validation */
259 } IxAtmdAccAalType;
260
261 /**
262  *
263  * @enum IxAtmdAccClpStatus
264  *
265  * @ingroup IxAtmdAccAPI
266  *
267  * @brief IxAtmdAcc CLP indication
268  *
269  * IxAtmdAccClpStatus defines the CLP status of the current PDU
270  *
271  */
272 typedef enum
273 {
274     IX_ATMDACC_CLP_NOT_SET = 0,     /**< CLP indication is not set */
275     IX_ATMDACC_CLP_SET = 1     /**< CLP indication is set */
276 } IxAtmdAccClpStatus;
277
278 /**
279  * @typedef IxAtmdAccUserId
280  *
281  * @ingroup IxAtmdAccAPI
282  *
283  * @brief User-supplied Id
284  *
285  * IxAtmdAccUserId is passed through callbacks and allows the
286  * IxAtmdAcc user to identify the source of a call back. The range of
287  * this user-owned Id is [0...2^32-1)].
288  *
289  * The user provides this own Ids on a per-channel basis as a parameter
290  * in a call to @a ixAtmdAccRxVcConnect() or @a ixAtmdAccRxVcConnect()
291  *
292  * @sa ixAtmdAccRxVcConnect
293  * @sa ixAtmdAccTxVcConnect
294  *
295  */
296 typedef unsigned int IxAtmdAccUserId;
297
298 /* ------------------------------------------------------
299    Part of the IxAtmdAcc interface related to RX traffic
300    ------------------------------------------------------ */
301
302 /**
303  *
304  * @ingroup IxAtmdAccAPI
305  *
306  * @brief  Rx callback prototype
307  *
308  * IxAtmdAccRxVcRxCallback is the prototype of the Rx callback user
309  * function called once per PDU to pass a receive Pdu to a user on a
310  * partilcular connection. The callback is likely to push the mbufs
311  * to a protocol layer, and recycle the mbufs for a further use.
312  *
313  * @note -This function is called ONLY in the context of
314  *        the @a ixAtmdAccRxDispatch() function
315  *
316  * @sa ixAtmdAccRxDispatch
317  * @sa ixAtmdAccRxVcConnect
318  *
319  * @param port @ref IxAtmLogicalPort [in] - the port on which this PDU was received
320  *        a logical PHY port [@a IX_UTOPIA_PORT_0 .. @a IX_UTOPIA_MAX_PORTS - 1]
321  * @param userId @ref IxAtmdAccUserId [in] - user Id provided in the call
322  *        to @a ixAtmdAccRxVcConnect()
323  * @param status @ref IxAtmdAccPduStatus [in] - an indication about the PDU validity.
324  *        In the case of AAL0 the only possibile value is
325  *        AAL0_VALID, in this case the client may optionally determine
326  *        that an rx timeout occured by checking if the mbuf is
327  *        compleletly or only partially filled, the later case
328  *        indicating a timeout.
329  *        In the case of OAM the only possible value is OAM valid.
330  *        The status is set to @a IX_ATMDACC_MBUF_RETURN when
331  *        the mbuf is released during a disconnect process.
332  * @param clp @ref IxAtmdAccClpStatus [in] - clp indication for this PDU.
333  *        For AAL5/AAL0_48 this information
334  *        is set if the clp bit of any rx cell is set
335  *        For AAL0-52/OAM the client may inspect the CLP in individual
336  *        cell headers in the PDU, and this parameter is set to 0.
337  * @param *mbufPtr @ref IX_OSAL_MBUF [in] - depending on the servive type a pointer to
338  *        an mbuf (AAL5/AAL0/OAM) or mbuf chain (AAL5 only),
339  *        that comprises the complete PDU data.
340  *
341  *        This parameter is guaranteed not to be a null pointer.
342  *
343  */
344 typedef void (*IxAtmdAccRxVcRxCallback) (IxAtmLogicalPort port,
345                        IxAtmdAccUserId userId,
346                        IxAtmdAccPduStatus status,
347                        IxAtmdAccClpStatus clp,
348                        IX_OSAL_MBUF * mbufPtr);
349
350 /**
351  *
352  * @ingroup IxAtmdAccAPI
353  *
354  * @brief Callback prototype for free buffer level is low.
355  *
356  * IxAtmdAccRxVcFreeLowCallback is the prototype of the user function
357  * which get called on a per-VC basis, when more  mbufs are needed to
358  * continue the ATM data reception. This function is likely to supply
359  * more available mbufs by one or many calls to the replenish function
360  * @a ixAtmdAccRxVcFreeReplenish()
361  *
362  * This function is called when the number of available buffers for
363  * reception is going under the threshold level as defined
364  * in @a ixAtmdAccRxVcFreeLowCallbackRegister()
365  *
366  * This function is called inside an Qmgr dispatch context. No system
367  * resource or interrupt-unsafe feature should be used inside this
368  * callback.
369  *
370  * @sa ixAtmdAccRxVcFreeLowCallbackRegister
371  * @sa IxAtmdAccRxVcFreeLowCallback
372  * @sa ixAtmdAccRxVcFreeReplenish
373  * @sa ixAtmdAccRxVcFreeEntriesQuery
374  * @sa ixAtmdAccRxVcConnect
375  *
376  * @param userId @ref IxAtmdAccUserId [in] - user Id provided in the call
377  * to @a ixAtmdAccRxVcConnect()
378  *
379  * @return None
380  *
381  */
382 typedef void (*IxAtmdAccRxVcFreeLowCallback) (IxAtmdAccUserId userId);
383
384 /* ------------------------------------------------------
385    Part of the IxAtmdAcc interface related to TX traffic
386    ------------------------------------------------------ */
387
388 /**
389  *
390  * @ingroup IxAtmdAccAPI
391  *
392  * @brief  Buffer callback prototype.
393  *
394  * This function is called to relinguish ownership of a transmitted
395  * buffer chain to the user.
396  *
397  * @note -In the case of a chained mbuf the AmtdAcc component can
398  * chain many user buffers together and pass ownership to the user in
399  * one function call.
400  *
401  * @param userId @ref IxAtmdAccUserId [in] - user If provided at registration of this
402  *        callback.
403  * @param mbufPtr @ref IX_OSAL_MBUF [in] - a pointer to mbufs or chain of mbufs and is
404  *        guaranteed not to be a null pointer.
405  *
406  */
407 typedef void (*IxAtmdAccTxVcBufferReturnCallback) (IxAtmdAccUserId userId,
408                         IX_OSAL_MBUF * mbufPtr);
409
410 /* ------------------------------------------------------
411    Part of the IxAtmdAcc interface related to Initialisation
412    ------------------------------------------------------ */
413
414 /**
415  *
416  * @ingroup IxAtmdAccAPI
417  *
418  * @fn ixAtmdAccInit (void)
419  *
420  * @brief Initialise the IxAtmdAcc Component
421  *
422  * This function initialise the IxAtmdAcc component. This function shall
423  * be called before any other function of the API. Its role is to
424  * initialise all internal resources of the IxAtmdAcc component.
425  *
426  * The ixQmgr component needs to be initialized prior the use of
427  * @a ixAtmdAccInit()
428  *
429  * @param none
430  *
431  * Failing to initilialize the IxAtmdAcc API before any use of it will
432  * result in a failed status.
433  * If the specified component is not present, a success status will still be 
434  * returned, however, a warning indicating the NPE to download to is not
435  * present will be issued.
436  *
437  * @return @li IX_SUCCESS initialisation is complete (in case of component not
438  *             being present, a warning is clearly indicated)
439  * @return @li IX_FAIL unable to process this request either
440  *             because this IxAtmdAcc is already initialised
441  *             or some unspecified error has occrred.
442  */
443 PUBLIC IX_STATUS ixAtmdAccInit (void);
444
445 /**
446  *
447  * @ingroup IxAtmdAccAPI
448  *
449  * @fn ixAtmdAccShow (void)
450  *
451  * @brief Show IxAtmdAcc configuration on a per port basis
452  *
453  * @param none
454  *
455  * @return none
456  *
457  * @note - Display use printf() and are redirected to stdout
458  */
459 PUBLIC void
460 ixAtmdAccShow (void);
461
462 /**
463  *
464  * @ingroup IxAtmdAccAPI
465  * 
466  * @fn ixAtmdAccStatsShow (void)
467  *
468  * @brief Show all IxAtmdAcc stats
469  *
470  * @param none
471  *
472  * @return none
473  *
474  * @note - Stats display use printf() and are redirected to stdout
475  */
476 PUBLIC void
477 ixAtmdAccStatsShow (void);
478
479 /**
480  *
481  * @ingroup IxAtmdAccAPI
482  *
483  * @fn ixAtmdAccStatsReset (void)
484  *
485  * @brief Reset all IxAtmdAcc stats
486  *
487  * @param none
488  *
489  * @return none
490  *
491  */
492 PUBLIC void
493 ixAtmdAccStatsReset (void);
494
495 /* ------------------------------------------------------
496    Part of the IxAtmdAcc interface related to RX traffic
497    ------------------------------------------------------ */
498
499 /**
500  *
501  * @ingroup IxAtmdAccAPI
502  *
503  * @fn ixAtmdAccRxVcConnect (IxAtmLogicalPort port,
504                       unsigned int vpi,
505                       unsigned int vci,
506                       IxAtmdAccAalType aalServiceType,
507                       IxAtmRxQueueId rxQueueId,
508                       IxAtmdAccUserId userCallbackId,
509                       IxAtmdAccRxVcRxCallback rxCallback,
510                       unsigned int minimumReplenishCount,
511                       IxAtmConnId * connIdPtr,
512                       IxAtmNpeRxVcId * npeVcIdPtr )
513  *
514  * @brief Connect to a Aal Pdu receive service for a particular
515  *        port/vpi/vci, and service type.
516  *
517  * This function allows a user to connect to an Aal5/Aal0/OAM Pdu receive service
518  * for a particular port/vpi/vci. It registers the callback and allocates
519  * internal resources and a Connection Id to be used in further API calls
520  * related to this VCC.
521  *
522  * The function will setup VC receive service on the specified rx queue.
523  *
524  * This function is blocking and makes use internal locks, and hence
525  * should not be called from an interrupt context.
526  *
527  * On return from @a ixAtmdAccRxVcConnect() with a failure status, the
528  * connection Id parameter is unspecified. Its value cannot be used.
529  * A connId is the reference by which IxAtmdAcc refers to a
530  * connected VC. This identifier is the result of a succesful call
531  * to a connect function. This identifier is invalid after a
532  * sucessful call to a disconnect function.
533  *
534  * Calling this function for the same combination of Vpi, Vci and more
535  * than once without calling @a ixAtmdAccRxVcTryDisconnect() will result in a
536  * failure status.
537  *
538  * If this function returns success the user should supply receive
539  * buffers by calling @a ixAtmdAccRxVcFreeReplenish() and then call
540  * @a ixAtmdAccRxVcEnable() to begin receiving pdus.
541  *
542  * There is a choice of two receive Qs on which the VC pdus could be
543  * receive. The user must associate the VC with one of these. Essentially
544  * having two qs allows more flexible system configuration such as have
545  * high prioriy traffic on one q (e.g. voice) and low priority traffic on
546  * the other (e.g. data). The high priority Q could be serviced in
547  * preference to the low priority Q. One queue may be configured to be
548  * serviced as soon as there is traffic, the other queue may be configured
549  * to be serviced by a polling mechanism running at idle time.
550  *
551  * Two AAL0 services supporting 48 or 52 byte cell data are provided.
552  * Received AAL0 PDUs will be be a multiple of the cell data size (48/52).
553  * AAL0_52 is a raw cell service and includes an ATM cell header
554  * (excluding HEC) at the start of each cell.
555  *
556  * A single "OAM Rx channel" for all ports may be  enabled by
557  * establishing a dedicated OAM Rx connection.
558  *
559  * The OAM service allows buffers containing 52 byte OAM F4/F5 cells
560  * to be transmitted and received over the dedicated OAM channels.
561  * HEC is appended/removed, and CRC-10 performed by the NPE. The OAM
562  * service offered by AtmdAcc is a raw cell transport service.
563  * It is assumed that ITU I.610 procedures that make use of this
564  * service are implemented above AtmdAcc.
565  *
566  * Note that the dedicated OAM connections are established on
567  * reserved VPI,VCI, and (in the case of Rx) port values.
568  * These values are used purely to descriminate the dedicated OAM channels
569  * and do not identify a particular OAM F4/F5 flow. F4/F5 flows may be
570  * realised for particluar VPI/VCIs by manipulating the VPI,VCI
571  * fields of the ATM cell headers of cells in the buffers passed
572  * to AtmdAcc.
573  *
574  * Calling this function prior to enable the port will fail.
575  *
576  * @sa ixAtmdAccRxDispatch
577  * @sa ixAtmdAccRxVcEnable
578  * @sa ixAtmdAccRxVcDisable
579  * @sa ixAtmdAccRxVcTryDisconnect
580  * @sa ixAtmdAccPortEnable
581  *
582  * @param port @ref IxAtmLogicalPort [in] - VC identification : logical PHY port
583  *                  [@a IX_UTOPIA_PORT_0 .. @a IX_UTOPIA_MAX_PORTS - 1]
584  * @param vpi unsigned int [in] - VC identification : ATM Vpi [0..255] or IX_ATMDACC_OAM_VPI
585  * @param vci unsigned int [in] - VC identification : ATM Vci [0..65535] or IX_ATMDACC_OAM_VCI
586  * @param aalServiceType @ref IxAtmdAccAalType [in] - type of service: AAL5, AAL0_48, AAL0_52, or OAM
587  * @param rxQueueId @ref IxAtmRxQueueId [in] - this identifieds which of two Qs the VC
588  *     should use.when icoming traffic is processed
589  * @param userCallbackId @ref IxAtmdAccUserId [in] - user Id used later as a parameter to
590  *     the supplied rxCallback.
591  * @param rxCallback [in] @ref IxAtmdAccRxVxRxCallback - function called when mbufs are received.
592  *     This parameter cannot be a null pointer.
593  * @param bufferFreeCallback [in] - function to be called to return
594  *     ownership of buffers to IxAtmdAcc user.
595  * @param minimumReplenishCount unsigned int [in] -  For AAL5/AAL0 the number of free mbufs
596  *     to be used with this channel. Use a high number when the expected traffic
597  *     rate on this channel is high, or when the user's mbufs are small, or when
598  *     the RxVcFreeLow Notification has to be invoked less often. When this
599  *     value is IX_ATMDACC_DEFAULT_REPLENISH_COUNT, the minimum of
600  *     resources  will be used. Depending on traffic rate, pdu
601  *     size and mbuf size, rxfree queue size, polling/interrupt rate, this value may
602  *     require to be replaced by a different value in the range 1-128
603  *     For OAM the rxFree queue size is fixed by atmdAcc and this parameter is ignored.
604  * @param connIdPtr @ref IxAtmConnId [out] - pointer to a connection Id
605  *     This parameter cannot be a null pointer.
606  * @param npeVcIdPtr @ref IxAtmNpeRxVcId [out] - pointer to an npe Vc Id
607  *     This parameter cannot be a null pointer.
608  *
609  * @return @li IX_SUCCESS successful call to IxAtmdAccRxVcConnect
610  * @return @li IX_ATMDACC_BUSY cannot process this request :
611  *         no VC is available
612  * @return @li IX_FAIL
613  *             parameter error,
614  *             VC already in use,
615  *             attempt to connect AAL service on reserved OAM VPI/VCI,
616  *             attempt to connect OAM service on VPI/VCI other than the reserved OAM VPI/VCI,
617  *             port is not initialised,
618  *             or some other error occurs during processing.
619  *
620  */
621 PUBLIC IX_STATUS ixAtmdAccRxVcConnect (IxAtmLogicalPort port,
622                       unsigned int vpi,
623                       unsigned int vci,
624                       IxAtmdAccAalType aalServiceType,
625                       IxAtmRxQueueId rxQueueId,
626                       IxAtmdAccUserId userCallbackId,
627                       IxAtmdAccRxVcRxCallback rxCallback,
628                       unsigned int minimumReplenishCount,
629                       IxAtmConnId * connIdPtr,
630                       IxAtmNpeRxVcId * npeVcIdPtr );
631
632 /**
633  *
634  * @ingroup IxAtmdAccAPI
635  * 
636  * @fn ixAtmdAccRxVcFreeReplenish (IxAtmConnId connId,
637                         IX_OSAL_MBUF * mbufPtr)
638  *
639  * @brief Provide free mbufs for data reception on a connection.
640  *
641  * This function provides mbufs for data reception by the hardware. This
642  * function needs to be called by the user on a regular basis to ensure
643  * no packet loss. Providing free buffers is a connection-based feature;
644  * each connection can have different requirements in terms of buffer size
645  * number of buffers, recycling rate. This function could be invoked from
646  * within the context of a @a IxAtmdAccRxVcFreeLowCallback() callback
647  * for a particular VC
648  *
649  * Mbufs provided through this function call can be chained. They will be
650  * unchained internally. A call to this function with chained mbufs or
651  * multiple calls with unchained mbufs are equivalent, but calls with
652  * unchained mbufs are more efficients.
653  *
654  * Mbufs provided to this interface need to be able to hold at least one
655  * full cell payload (48/52 bytes, depending on service type).
656  * Chained buffers with a size less than the size supported by the hardware
657  * will be returned through the rx callback provided during the connect step.
658  *
659  * Failing to invoke this function prior to enabling the RX traffic
660  * can result in packet loss.
661  *
662  * This function is not reentrant for the same connId.
663  *
664  * This function does not use system resources and can be
665  * invoked from an interrupt context.
666  *
667  * @note - Over replenish is detected, and extra mbufs are returned through
668  *         the rx callback provided during the connect step.
669  *
670  * @note - Mbuf provided to the replenish function should have a length greater or
671  *         equal to 48/52 bytes according to service type.
672  *
673  * @note - The memory cache of mMbuf payload should be invalidated prior to Mbuf
674  *         submission. Flushing the Mbuf headers is handled by IxAtmdAcc.
675  *
676  * @note - When a chained mbuf is provided, this function process the mbufs
677  *         up to the hardware limit and invokes the user-supplied callback
678  *         to release extra buffers.
679  *
680  * @sa ixAtmdAccRxVcFreeLowCallbackRegister
681  * @sa IxAtmdAccRxVcFreeLowCallback
682  * @sa ixAtmdAccRxVcConnect
683  *
684  * @param connId @ref IxAtmConnId [in] - connection Id as returned from a succesfull call to
685  *        @a IxAtmdAccRxVcConnect()
686  * @param mbufPtr @ref IX_OSAL_MBUF [in] - pointer to a mbuf structure to be used for data
687  *        reception. The mbuf pointed to by this parameter can be chained
688  *        to an other mbuf.
689  *
690  * @return @li IX_SUCCESS successful call to @a ixAtmdAccRxVcFreeReplenish()
691  *          and the mbuf is now ready to use for incoming traffic.
692  * @return @li IX_ATMDACC_BUSY cannot process this request because
693  *         the max number of outstanding free buffers has been reached
694  *         or the internal resources have exhausted for this VC.
695  *         The user is responsible for retrying this request later.
696  * @return @li IX_FAIL cannot process this request because of parameter
697  *         errors or some unspecified internal error has occurred.
698  *
699  * @note - It is not always guaranteed the replenish step to be as fast as the
700  *   hardware is consuming Rx Free mbufs. There is nothing in IxAtmdAcc to
701  *   guarantee that replenish reaches the rxFree threshold level. If the
702  *   threshold level is not reached, the next rxFree low notification for
703  *   this channel will not be triggered.
704  *   The preferred ways to replenish can be as follows (depending on
705  *   applications and implementations) :
706  *   @li Replenish in a rxFree low notification until the function
707  *       ixAtmdAccRxVcFreeReplenish() returns IX_ATMDACC_BUSY
708  *   @li Query the queue level using @sa ixAtmdAccRxVcFreeEntriesQuery, then
709  *     , replenish using @a ixAtmdAccRxVcFreeReplenish(), then query the queue
710  *       level again, and replenish if the threshold is still not reached.
711  *   @li Trigger replenish from an other event source and use rxFree starvation
712  *       to throttle the Rx traffic.
713  *
714  */
715 PUBLIC IX_STATUS ixAtmdAccRxVcFreeReplenish (IxAtmConnId connId,
716                         IX_OSAL_MBUF * mbufPtr);
717
718 /**
719  *
720  * @ingroup IxAtmdAccAPI
721  * 
722  * @fn ixAtmdAccRxVcFreeLowCallbackRegister (IxAtmConnId connId,
723                                     unsigned int numberOfMbufs,
724                                     IxAtmdAccRxVcFreeLowCallback callback)
725  *
726  * @brief Configure the RX Free threshold value and register a callback
727  * to handle threshold notifications.
728  *
729  * The function ixAtmdAccRxVcFreeLowCallbackRegister sets the threshold value for
730  * a particular RX VC. When the number of buffers reaches this threshold
731  * the callback is invoked.
732  *
733  * This function should be called once per VC before RX traffic is
734  * enabled.This function will fail if the curent level of the free buffers
735  * is equal or less than the threshold value.
736  *
737  * @sa ixAtmdAccRxVcFreeLowCallbackRegister
738  * @sa IxAtmdAccRxVcFreeLowCallback
739  * @sa ixAtmdAccRxVcFreeReplenish
740  * @sa ixAtmdAccRxVcFreeEntriesQuery
741  * @sa ixAtmdAccRxVcConnect
742  *
743  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call
744  *        to @a IxAtmdAccRxVcConnect()
745  * @param numberOfMbufs unsigned int [in] - threshold number of buffers. This number
746  *        has to be a power of 2, one of the values 0,1,2,4,8,16,32....
747  *        The maximum value cannot be more than half of the rxFree queue
748  *        size (which can be retrieved using @a ixAtmdAccRxVcFreeEntriesQuery()
749  *        before any use of the @a ixAtmdAccRxVcFreeReplenish() function)
750  * @param callback @ref IxAtmdAccRxVcFreeLowCallback [in] - function telling the user that the number of
751  *        free buffers has reduced to the threshold value.
752  *
753  * @return @li IX_SUCCESS Threshold set successfully.
754  * @return @li IX_FAIL parameter error or the current number of free buffers
755  *              is less than or equal to the threshold supplied or some
756  *              unspecified error has occrred.
757  *
758  * @note - the callback will be called when the threshold level will drop from
759  *        exactly (numberOfMbufs + 1) to (numberOfMbufs).
760  *
761  */
762 PUBLIC IX_STATUS ixAtmdAccRxVcFreeLowCallbackRegister (IxAtmConnId connId,
763     unsigned int numberOfMbufs,
764     IxAtmdAccRxVcFreeLowCallback callback);
765
766 /**
767  *
768  * @ingroup IxAtmdAccAPI
769  *
770  * @fn ixAtmdAccRxVcFreeEntriesQuery (IxAtmConnId connId,
771                          unsigned int *numberOfMbufsPtr)
772  *
773  * @brief Get the number of rx mbufs the system can accept to replenish the
774  *       the rx reception mechanism on a particular channel
775  *
776  * The ixAtmdAccRxVcFreeEntriesQuery function is used to retrieve the current
777  * number of available mbuf entries for reception, on a per-VC basis. This
778  * function can be used to know the number of mbufs which can be provided
779  * using @a ixAtmdAccRxVcFreeReplenish().
780  *
781  * This function can be used from a timer context, or can be associated
782  * with a threshold event, or can be used inside an active polling
783  * mechanism which is under user control.
784  *
785  * This function is reentrant and does not use system resources and can
786  * be invoked from an interrupt context.
787  *
788  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call
789  *        to @a IxAtmdAccRxVcConnect()
790  * @param numberOfMbufsPtr unsigned int [out] - Pointer to the number of available entries.
791  *      . This parameter cannot be a null pointer.
792  *
793  * @return @li IX_SUCCESS the current number of mbufs not yet used for incoming traffic
794  * @return @li IX_FAIL invalid parameter
795  *
796  * @sa ixAtmdAccRxVcFreeReplenish
797  *
798  */
799 PUBLIC IX_STATUS ixAtmdAccRxVcFreeEntriesQuery (IxAtmConnId connId,
800                          unsigned int *numberOfMbufsPtr);
801
802 /**
803  *
804  * @ingroup IxAtmdAccAPI
805  *
806  * @fn ixAtmdAccRxVcEnable (IxAtmConnId connId)
807  *
808  * @brief Start the RX service on a VC.
809  *
810  * This functions kicks-off the traffic reception for a particular VC.
811  * Once invoked, incoming PDUs will be made available by the hardware
812  * and are eventually directed to the @a IxAtmdAccRxVcRxCallback() callback
813  * registered for the connection.
814  *
815  * If the traffic is already running, this function returns IX_SUCCESS.
816  * This function can be invoked many times.
817  *
818  * IxAtmdAccRxVcFreeLowCallback event will occur only after
819  * @a ixAtmdAccRxVcEnable() function is invoked.
820  *
821  * Before using this function, the @a ixAtmdAccRxVcFreeReplenish() function
822  * has to be used to replenish the RX Free queue. If not, incoming traffic
823  * may be discarded.and in the case of interrupt driven reception the
824  * @a IxAtmdAccRxVcFreeLowCallback() callback may be invoked as a side effect
825  * during a replenish action.
826  *
827  * This function is not reentrant and should not be used inside an
828  * interrupt context.
829  *
830  * For an VC connection this function can be called after a call to
831  * @a ixAtmdAccRxVcDisable() and should not be called after
832  * @a ixAtmdAccRxVcTryDisconnect()
833  *
834  * @sa ixAtmdAccRxVcDisable
835  * @sa ixAtmdAccRxVcConnect
836  * @sa ixAtmdAccRxVcFreeReplenish
837  *
838  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call
839  * to @a IxAtmdAccRxVcConnect()
840  *
841  * @return @li IX_SUCCESS successful call to ixAtmdAccRxVcEnable
842  * @return @li IX_ATMDACC_WARNING the channel is already enabled
843  * @return @li IX_FAIL invalid parameters or some unspecified internal
844  *         error occured.
845  *
846  */
847 PUBLIC IX_STATUS ixAtmdAccRxVcEnable (IxAtmConnId connId);
848
849 /**
850  *
851  * @ingroup IxAtmdAccAPI
852  * 
853  * @fn ixAtmdAccRxVcDisable (IxAtmConnId connId)
854  *
855  * @brief Stop the RX service on a VC.
856  *
857  * This functions stops the traffic reception for a particular VC connection.
858  *
859  * Once invoked, incoming Pdus are discarded by the hardware. Any Pdus
860  * pending will be freed to the user
861  *
862  * Hence once this function returns no more receive callbacks will be
863  * called for that VC. However, buffer free callbacks will be invoked
864  * until such time as all buffers supplied by the user have been freed
865  * back to the user
866  *
867  * Calling this function doe not invalidate the connId.
868  * @a ixAtmdAccRxVcEnable() can be invoked to enable Pdu reception again.
869  *
870  * If the traffic is already stopped, this function returns IX_SUCCESS.
871  *
872  * This function is not reentrant and should not be used inside an
873  * interrupt context.
874  *
875  * @sa ixAtmdAccRxVcConnect
876  * @sa ixAtmdAccRxVcEnable
877  * @sa ixAtmdAccRxVcDisable
878  *
879  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call to @a
880  *     IxAtmdAccRxVcConnect()
881  *
882  * @return @li IX_SUCCESS successful call to @a ixAtmdAccRxVcDisable().
883  * @return @li IX_ATMDACC_WARNING the channel is already disabled
884  * @return @li IX_FAIL invalid parameters or some unspecified internal error occured
885  *
886  */
887 PUBLIC IX_STATUS ixAtmdAccRxVcDisable (IxAtmConnId connId);
888
889 /**
890  *
891  * @ingroup IxAtmdAccAPI
892  * 
893  * @fn ixAtmdAccRxVcTryDisconnect (IxAtmConnId connId)
894  *
895  * @brief Disconnect a VC from the RX service.
896  *
897  * This function deregisters the VC and guarantees that all resources
898  * associated with this VC are free. After its execution, the connection
899  * Id is not available.
900  *
901  * This function will fail until such time as all resources allocated to
902  * the VC connection have been freed. The user is responsible to delay and
903  * call again this function many times until a success status is returned.
904  *
905  * This function needs internal locks and should not be called from an
906  * interrupt context
907  *
908  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call to
909  * @a IxAtmdAccRxVcConnect()
910  *
911  * @return @li IX_SUCCESS successful call to ixAtmdAccRxVcDisable
912  * @return @li IX_ATMDACC_RESOURCES_STILL_ALLOCATED not all resources
913  *         associated with the connection have been freed.
914  * @return @li IX_FAIL cannot process this request because of a parameter
915  *         error
916  *
917  */
918 PUBLIC IX_STATUS ixAtmdAccRxVcTryDisconnect (IxAtmConnId connId);
919
920 /* ------------------------------------------------------
921    Part of the IxAtmdAcc interface related to TX traffic
922    ------------------------------------------------------ */
923
924 /**
925  *
926  * @ingroup IxAtmdAccAPI
927  * 
928  * @fn ixAtmdAccTxVcConnect (IxAtmLogicalPort port,
929                       unsigned int vpi,
930                       unsigned int vci,
931                       IxAtmdAccAalType aalServiceType,
932                       IxAtmdAccUserId userId,
933                       IxAtmdAccTxVcBufferReturnCallback bufferFreeCallback,
934                       IxAtmConnId * connIdPtr)
935  *
936  * @brief Connect to a Aal Pdu transmit service for a particular
937  *        port/vpi/vci and service type.
938  *
939  * This function allows a user to connect to an Aal5/Aal0/OAM Pdu transmit service
940  * for a particular port/vpi/vci. It registers the callback and allocates
941  * internal resources and a Connection Id to be used in further API calls
942  * related to this VC.
943  *
944  * The function will setup VC transmit service on the specified on the
945  * specified port. A connId is the reference by which IxAtmdAcc refers to a
946  * connected VC. This identifier is the result of a succesful call
947  * to a connect function. This identifier is invalid after a
948  * sucessful call to a disconnect function.
949  *
950  * This function needs internal locks, and hence  should not be called
951  * from an interrupt context.
952  *
953  * On return from @a ixAtmdAccTxVcConnect() with a failure status, the
954  * connection Id parameter is unspecified. Its value cannot be used.
955  *
956  * Calling this function for the same combination of port, Vpi, Vci and
957  * more than once without calling @a ixAtmdAccTxVcTryDisconnect() will result
958  * in a failure status.
959  *
960  * Two AAL0 services supporting 48 or 52 byte cell data are provided.
961  * Submitted AAL0 PDUs must be a multiple of the cell data size (48/52).
962  * AAL0_52 is a raw cell service the client must format
963  * the PDU with an ATM cell header (excluding HEC) at the start of
964  * each cell, note that AtmdAcc does not validate the cell headers in
965  * a submitted PDU.
966  *
967  * For the OAM service an "OAM Tx channel" may be enabled for a port
968  * by establishing a single dedicated OAM Tx connection on that port.
969  *
970  * The OAM service allows buffers containing 52 byte OAM F4/F5 cells
971  * to be transmitted and received over the dedicated OAM channels.
972  * HEC is appended/removed, and CRC-10 performed by the NPE. The OAM
973  * service offered by AtmdAcc is a raw cell transport service.
974  * It is assumed that ITU I.610 procedures that make use of this
975  * service are implemented above AtmdAcc.
976  *
977  * Note that the dedicated OAM connections are established on
978  * reserved VPI,VCI, and (in the case of Rx) port values.
979  * These values are used purely to descriminate the dedicated OAM channels
980  * and do not identify a particular OAM F4/F5 flow. F4/F5 flows may be
981  * realised for particluar VPI/VCIs by manipulating the VPI,VCI
982  * fields of the ATM cell headers of cells in the buffers passed
983  * to AtmdAcc.
984  *
985  * Calling this function before enabling the port will fail.
986  *
987  * @sa ixAtmdAccTxVcTryDisconnect
988  * @sa ixAtmdAccPortTxScheduledModeEnable
989  * @sa ixAtmdAccPortEnable
990  *
991  * @param port @ref IxAtmLogicalPort [in] - VC identification : logical PHY port
992  *                  [@a IX_UTOPIA_PORT_0 .. @a IX_UTOPIA_MAX_PORTS - 1]
993  * @param vpi unsigned int  [in] - VC identification : ATM Vpi [0..255] or IX_ATMDACC_OAM_VPI
994  * @param vci unsigned int [in] - VC identification : ATM Vci [0..65535] or IX_ATMDACC_OAM_VCI
995  * @param aalServiceType @ref IxAtmdAccAalType [in] - type of service AAL5, AAL0_48, AAL0_52, or OAM
996  * @param userId @ref IxAtmdAccUserId [in] - user id to be used later during callbacks related
997  *        to this channel
998  * @param bufferFreeCallback @ref IxAtmdAccTxVcBufferReturnCallback [in] - function called when mbufs
999  *        transmission is complete. This parameter cannot be a null
1000  *        pointer.
1001  * @param connIdPtr @ref IxAtmConnId [out] - Pointer to a connection Id.
1002  *        This parameter cannot be a null pointer.
1003  *
1004  * @return @li IX_SUCCESS successful call to @a IxAtmdAccRxVcConnect().
1005  * @return @li IX_ATMDACC_BUSY cannot process this request
1006  *         because no VC is available
1007  * @return @li IX_FAIL
1008  *             parameter error,
1009  *             VC already in use,
1010  *             attempt to connect AAL service on reserved OAM VPI/VCI,
1011  *             attempt to connect OAM service on VPI/VCI other than the reserved OAM VPI/VCI,
1012  *             port is not initialised,
1013  *             or some other error occurs during processing.
1014  *
1015  * @note - Unscheduled mode is not supported in ixp425 1.0. Therefore, the
1016  *       function @a ixAtmdAccPortTxScheduledModeEnable() need to be called
1017  *       for this port before any establishing a Tx Connection
1018  */
1019 PUBLIC IX_STATUS ixAtmdAccTxVcConnect (IxAtmLogicalPort port,
1020                       unsigned int vpi,
1021                       unsigned int vci,
1022                       IxAtmdAccAalType aalServiceType,
1023                       IxAtmdAccUserId userId,
1024                       IxAtmdAccTxVcBufferReturnCallback bufferFreeCallback,
1025                       IxAtmConnId * connIdPtr);
1026
1027 /**
1028  *
1029  * @ingroup IxAtmdAccAPI
1030  *
1031  * @fn ixAtmdAccTxVcPduSubmit (IxAtmConnId connId,
1032                     IX_OSAL_MBUF * mbufPtr,
1033                     IxAtmdAccClpStatus clp,
1034                     unsigned int numberOfCells)
1035  *
1036  * @brief Submit a Pdu for transmission on connection.
1037  *
1038  * A data user calls this function to submit an mbufs containing a Pdu
1039  * to be transmitted. The buffer supplied can be chained and the Pdu it
1040  * contains must be complete.
1041  *
1042  * The transmission behavior of this call depends on the operational mode
1043  * of the port on which the connection is made.
1044  *
1045  * In unscheduled mode the mbuf will be submitted to the hardware
1046  * immediately if sufficent resource is available. Otherwise the function
1047  * will return failure.
1048  *
1049  * In scheduled mode the buffer is queued internally in IxAtmdAcc. The cell
1050  * demand is made known to the traffic shaping entity. Cells from the
1051  * buffers are MUXed onto the port some time later as dictated by the
1052  * traffic shaping entity. The traffic shaping entity does this by sending
1053  * transmit schedules to IxAtmdAcc via @a ixAtmdAccPortTxProcess() function call.
1054  *
1055  * Note that the dedicated OAM channel is scheduled just like any
1056  * other channel. This means that any OAM traffic relating to an
1057  * active AAL0/AAL5 connection will be scheduled independantly of the
1058  * AAL0/AAL5 traffic for that connection.
1059  *
1060  * When transmission is complete, the TX Done mechanism will give the
1061  * owmnership of these buffers back to the customer. The tx done mechanism
1062  * must be in operation before transmission is attempted.
1063  *
1064  * For AAL0/OAM submitted AAL0 PDUs must be a multiple of the cell data
1065  * size (48/52). AAL0_52 and OAM are raw cell services, and the client
1066  * must format the PDU with an ATM cell header (excluding HEC) at the
1067  * start of each cell, note that AtmdAcc does not validate the cell headers in
1068  * a submitted PDU.
1069  *
1070  *
1071  * @sa IxAtmdAccTxVcBufferReturnCallback
1072  * @sa ixAtmdAccTxDoneDispatch
1073  *
1074  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call to
1075  *        @a ixAtmdAccTxVcConnect()
1076  * @param mbufPtr @ref IX_OSAL_MBUF [in] - pointer to a chained structure of mbufs to transmit.
1077  *       This parameter cannot be a null pointer.
1078  * @param clp @ref IxAtmdAccClpStatus [in] - clp indication for this PDU. All cells of this pdu
1079  *       will be sent with the clp bit set
1080  * @param numberOfCells unsigned int [in] - number of cells in the PDU.
1081  *
1082  * @return @li IX_SUCCESS successful call to @a ixAtmdAccTxVcPduSubmit()
1083  *             The pdu pointed by the mbufPtr parameter will be
1084  *             transmitted
1085  * @return @li IX_ATMDACC_BUSY unable to process this request because
1086  *             internal resources are all used. The caller is responsible
1087  *             for retrying this request later.
1088  * @return @li IX_FAIL unable to process this request because of error
1089  *             in the parameters (wrong connId supplied,
1090  *             or wrong mbuf pointer supplied), the total length of all buffers
1091  *             in the chain should be a multiple of the cell size
1092  *             ( 48/52 depending on the service type ),
1093  *             or unspecified error during processing
1094  *
1095  * @note - This function in not re-entrant for the same VC (e.g. : two
1096  *         thread cannot send PDUs for the same VC). But two threads can
1097  *         safely call this function with a different connection Id
1098  *
1099  * @note - In unscheduled mode, this function is not re-entrant on a per
1100  *         port basis. The size of pdus is limited to 8Kb.
1101  *
1102  * @note - 0-length mbufs should be removed from the chain before submission.
1103  *         The total length of the pdu (sdu + padding +trailer) has to be
1104  *         updated in the header of the first mbuf of a chain of mbufs.
1105  *
1106  * @note - Aal5 trailer information (UUI, CPI, SDU length) has to be supplied
1107  *         before submission.
1108  *
1109  * @note - The payload memory cache should be flushed, if needed, prior to
1110  *         transmission. Mbuf headers are flushed by IxAtmdAcc
1111  *
1112  * @note - This function does not use system resources and can be used
1113  *         inside an interrupt context
1114  */
1115 PUBLIC IX_STATUS ixAtmdAccTxVcPduSubmit (IxAtmConnId connId,
1116                     IX_OSAL_MBUF * mbufPtr,
1117                     IxAtmdAccClpStatus clp,
1118                     unsigned int numberOfCells);
1119
1120 /**
1121  *
1122  * @ingroup IxAtmdAccAPI
1123  *
1124  * @fn ixAtmdAccTxVcTryDisconnect (IxAtmConnId connId)
1125  *
1126  * @brief Disconnect from a Aal Pdu transmit service for a particular
1127  *        port/vpi/vci.
1128  *
1129  * This function deregisters the VC and guarantees that all resources
1130  * associated with this VC are free. After its execution, the connection
1131  * Id is not available.
1132  *
1133  * This function will fail until such time as all resources allocated to
1134  * the VC connection have been freed. The user is responsible to delay
1135  * and call again this function many times until a success status is
1136  * returned.
1137  *
1138  * After its execution, the connection Id is not available.
1139  *
1140  * @param connId @ref IxAtmConnId [in] - connection Id as resulted from a succesfull call to
1141  *        @a ixAtmdAccTxVcConnect()
1142  *
1143  * @return @li IX_SUCCESS successful call to @a ixAtmdAccTxVcTryDisconnect()
1144  * @return @li IX_ATMDACC_RESOURCES_STILL_ALLOCATED not all resources
1145  *     associated with the connection have been freed. This condition will
1146  *     disappear after Tx and TxDone is complete for this channel.
1147  * @return @li IX_FAIL unable to process this request because of errors
1148  *                     in the parameters (wrong connId supplied)
1149  *
1150  * @note - This function needs internal locks and should not be called
1151  *         from an interrupt context
1152  *
1153  * @note - If the @a IX_ATMDACC_RESOURCES_STILL_ALLOCATED error does not
1154  *     clear after a while, this may be linked to a previous problem
1155  *     of cell overscheduling. Diabling the port and retry a disconnect
1156  *     will free the resources associated with this channel.
1157  *
1158  * @sa ixAtmdAccPortTxProcess
1159  *
1160  */
1161 PUBLIC IX_STATUS ixAtmdAccTxVcTryDisconnect (IxAtmConnId connId);
1162
1163 #endif /* IXATMDACC_H */
1164
1165 /**
1166  * @} defgroup IxAtmdAccAPI
1167  */
1168
1169