xref: /freebsd/sys/dev/isci/scil/scic_phy.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1f11c7f63SJim Harris /*-
2*718cf2ccSPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
3*718cf2ccSPedro F. Giffuni  *
4f11c7f63SJim Harris  * This file is provided under a dual BSD/GPLv2 license.  When using or
5f11c7f63SJim Harris  * redistributing this file, you may do so under either license.
6f11c7f63SJim Harris  *
7f11c7f63SJim Harris  * GPL LICENSE SUMMARY
8f11c7f63SJim Harris  *
9f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
10f11c7f63SJim Harris  *
11f11c7f63SJim Harris  * This program is free software; you can redistribute it and/or modify
12f11c7f63SJim Harris  * it under the terms of version 2 of the GNU General Public License as
13f11c7f63SJim Harris  * published by the Free Software Foundation.
14f11c7f63SJim Harris  *
15f11c7f63SJim Harris  * This program is distributed in the hope that it will be useful, but
16f11c7f63SJim Harris  * WITHOUT ANY WARRANTY; without even the implied warranty of
17f11c7f63SJim Harris  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18f11c7f63SJim Harris  * General Public License for more details.
19f11c7f63SJim Harris  *
20f11c7f63SJim Harris  * You should have received a copy of the GNU General Public License
21f11c7f63SJim Harris  * along with this program; if not, write to the Free Software
22f11c7f63SJim Harris  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23f11c7f63SJim Harris  * The full GNU General Public License is included in this distribution
24f11c7f63SJim Harris  * in the file called LICENSE.GPL.
25f11c7f63SJim Harris  *
26f11c7f63SJim Harris  * BSD LICENSE
27f11c7f63SJim Harris  *
28f11c7f63SJim Harris  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29f11c7f63SJim Harris  * All rights reserved.
30f11c7f63SJim Harris  *
31f11c7f63SJim Harris  * Redistribution and use in source and binary forms, with or without
32f11c7f63SJim Harris  * modification, are permitted provided that the following conditions
33f11c7f63SJim Harris  * are met:
34f11c7f63SJim Harris  *
35f11c7f63SJim Harris  *   * Redistributions of source code must retain the above copyright
36f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer.
37f11c7f63SJim Harris  *   * Redistributions in binary form must reproduce the above copyright
38f11c7f63SJim Harris  *     notice, this list of conditions and the following disclaimer in
39f11c7f63SJim Harris  *     the documentation and/or other materials provided with the
40f11c7f63SJim Harris  *     distribution.
41f11c7f63SJim Harris  *
42f11c7f63SJim Harris  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43f11c7f63SJim Harris  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44f11c7f63SJim Harris  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45f11c7f63SJim Harris  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46f11c7f63SJim Harris  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47f11c7f63SJim Harris  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48f11c7f63SJim Harris  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49f11c7f63SJim Harris  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50f11c7f63SJim Harris  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51f11c7f63SJim Harris  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52f11c7f63SJim Harris  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53f11c7f63SJim Harris  */
54f11c7f63SJim Harris #ifndef _SCIC_PHY_H_
55f11c7f63SJim Harris #define _SCIC_PHY_H_
56f11c7f63SJim Harris 
57f11c7f63SJim Harris /**
58f11c7f63SJim Harris  * @file
59f11c7f63SJim Harris  *
60f11c7f63SJim Harris  * @brief This file contains all of the interface methods that can be called
61f11c7f63SJim Harris  *        by an SCIC user on a phy (SAS or SATA) object.
62f11c7f63SJim Harris  */
63f11c7f63SJim Harris 
64f11c7f63SJim Harris #ifdef __cplusplus
65f11c7f63SJim Harris extern "C" {
66f11c7f63SJim Harris #endif // __cplusplus
67f11c7f63SJim Harris 
68f11c7f63SJim Harris #include <dev/isci/scil/sci_types.h>
69f11c7f63SJim Harris #include <dev/isci/scil/sci_status.h>
70f11c7f63SJim Harris 
71f11c7f63SJim Harris #include <dev/isci/scil/intel_sata.h>
72f11c7f63SJim Harris #include <dev/isci/scil/intel_sas.h>
73f11c7f63SJim Harris 
74f11c7f63SJim Harris 
75f11c7f63SJim Harris /**
76f11c7f63SJim Harris  * @struct SCIC_PHY_PROPERTIES
77f11c7f63SJim Harris  * @brief This structure defines the properties common to all phys
78f11c7f63SJim Harris  *        that can be retrieved.
79f11c7f63SJim Harris  */
80f11c7f63SJim Harris typedef struct SCIC_PHY_PROPERTIES
81f11c7f63SJim Harris {
82f11c7f63SJim Harris    /**
83f11c7f63SJim Harris     * This field specifies the port that currently contains the
84f11c7f63SJim Harris     * supplied phy.  This field may be set to SCI_INVALID_HANDLE
85f11c7f63SJim Harris     * if the phy is not currently contained in a port.
86f11c7f63SJim Harris     */
87f11c7f63SJim Harris    SCI_PORT_HANDLE_T  owning_port;
88f11c7f63SJim Harris 
89f11c7f63SJim Harris    /**
90f11c7f63SJim Harris     * This field specifies the maximum link rate for which this phy
91f11c7f63SJim Harris     * will negotiate.
92f11c7f63SJim Harris     */
93f11c7f63SJim Harris    SCI_SAS_LINK_RATE max_link_rate;
94f11c7f63SJim Harris 
95f11c7f63SJim Harris    /**
96f11c7f63SJim Harris     * This field specifies the link rate at which the phy is
97f11c7f63SJim Harris     * currently operating.
98f11c7f63SJim Harris     */
99f11c7f63SJim Harris    SCI_SAS_LINK_RATE  negotiated_link_rate;
100f11c7f63SJim Harris 
101f11c7f63SJim Harris    /**
102f11c7f63SJim Harris     * This field indicates the identify address frame that will be
103f11c7f63SJim Harris     * transmitted to the connected phy.
104f11c7f63SJim Harris     */
105f11c7f63SJim Harris    SCI_SAS_IDENTIFY_ADDRESS_FRAME_T transmit_iaf;
106f11c7f63SJim Harris 
107f11c7f63SJim Harris    /**
108f11c7f63SJim Harris     * This field specifies the index of the phy in relation to other
109f11c7f63SJim Harris     * phys within the controller.  This index is zero relative.
110f11c7f63SJim Harris     */
111f11c7f63SJim Harris    U8 index;
112f11c7f63SJim Harris 
113f11c7f63SJim Harris } SCIC_PHY_PROPERTIES_T;
114f11c7f63SJim Harris 
115f11c7f63SJim Harris /**
116f11c7f63SJim Harris  * @struct SCIC_SAS_PHY_PROPERTIES
117f11c7f63SJim Harris  * @brief This structure defines the properties, specific to a
118f11c7f63SJim Harris  *        SAS phy, that can be retrieved.
119f11c7f63SJim Harris  */
120f11c7f63SJim Harris typedef struct SCIC_SAS_PHY_PROPERTIES
121f11c7f63SJim Harris {
122f11c7f63SJim Harris    /**
123f11c7f63SJim Harris     * This field delineates the Identify Address Frame received
124f11c7f63SJim Harris     * from the remote end point.
125f11c7f63SJim Harris     */
126f11c7f63SJim Harris    SCI_SAS_IDENTIFY_ADDRESS_FRAME_T received_iaf;
127f11c7f63SJim Harris 
128f11c7f63SJim Harris    /**
129f11c7f63SJim Harris     * This field delineates the Phy capabilities structure received
130f11c7f63SJim Harris     * from the remote end point.
131f11c7f63SJim Harris     */
132f11c7f63SJim Harris    SAS_CAPABILITIES_T received_capabilities;
133f11c7f63SJim Harris 
134f11c7f63SJim Harris } SCIC_SAS_PHY_PROPERTIES_T;
135f11c7f63SJim Harris 
136f11c7f63SJim Harris /**
137f11c7f63SJim Harris  * @struct SCIC_SATA_PHY_PROPERTIES
138f11c7f63SJim Harris  * @brief This structure defines the properties, specific to a
139f11c7f63SJim Harris  *        SATA phy, that can be retrieved.
140f11c7f63SJim Harris  */
141f11c7f63SJim Harris typedef struct SCIC_SATA_PHY_PROPERTIES
142f11c7f63SJim Harris {
143f11c7f63SJim Harris    /**
144f11c7f63SJim Harris     * This field delineates the signature FIS received from the
145f11c7f63SJim Harris     * attached target.
146f11c7f63SJim Harris     */
147f11c7f63SJim Harris    SATA_FIS_REG_D2H_T signature_fis;
148f11c7f63SJim Harris 
149f11c7f63SJim Harris    /**
150f11c7f63SJim Harris     * This field specifies to the user if a port selector is connected
151f11c7f63SJim Harris     * on the specified phy.
152f11c7f63SJim Harris     */
153f11c7f63SJim Harris    BOOL is_port_selector_present;
154f11c7f63SJim Harris 
155f11c7f63SJim Harris } SCIC_SATA_PHY_PROPERTIES_T;
156f11c7f63SJim Harris 
157f11c7f63SJim Harris /**
158f11c7f63SJim Harris  * @enum  SCIC_PHY_COUNTER_ID
159f11c7f63SJim Harris  * @brief This enumeration depicts the various pieces of optional
160f11c7f63SJim Harris  *        information that can be retrieved for a specific phy.
161f11c7f63SJim Harris  */
162f11c7f63SJim Harris typedef enum SCIC_PHY_COUNTER_ID
163f11c7f63SJim Harris {
164f11c7f63SJim Harris    /**
165f11c7f63SJim Harris     * This PHY information field tracks the number of frames received.
166f11c7f63SJim Harris     */
167f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_FRAME,
168f11c7f63SJim Harris 
169f11c7f63SJim Harris    /**
170f11c7f63SJim Harris     * This PHY information field tracks the number of frames transmitted.
171f11c7f63SJim Harris     */
172f11c7f63SJim Harris    SCIC_PHY_COUNTER_TRANSMITTED_FRAME,
173f11c7f63SJim Harris 
174f11c7f63SJim Harris    /**
175f11c7f63SJim Harris     * This PHY information field tracks the number of DWORDs received.
176f11c7f63SJim Harris     */
177f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_FRAME_DWORD,
178f11c7f63SJim Harris 
179f11c7f63SJim Harris    /**
180f11c7f63SJim Harris     * This PHY information field tracks the number of DWORDs transmitted.
181f11c7f63SJim Harris     */
182f11c7f63SJim Harris    SCIC_PHY_COUNTER_TRANSMITTED_FRAME_DWORD,
183f11c7f63SJim Harris 
184f11c7f63SJim Harris    /**
185f11c7f63SJim Harris     * This PHY information field tracks the number of times DWORD
186f11c7f63SJim Harris     * synchronization was lost.
187f11c7f63SJim Harris     */
188f11c7f63SJim Harris    SCIC_PHY_COUNTER_LOSS_OF_SYNC_ERROR,
189f11c7f63SJim Harris 
190f11c7f63SJim Harris    /**
191f11c7f63SJim Harris     * This PHY information field tracks the number of received DWORDs with
192f11c7f63SJim Harris     * running disparity errors.
193f11c7f63SJim Harris     */
194f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_DISPARITY_ERROR,
195f11c7f63SJim Harris 
196f11c7f63SJim Harris    /**
197f11c7f63SJim Harris     * This PHY information field tracks the number of received frames with a
198f11c7f63SJim Harris     * CRC error (not including short or truncated frames).
199f11c7f63SJim Harris     */
200f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_FRAME_CRC_ERROR,
201f11c7f63SJim Harris 
202f11c7f63SJim Harris    /**
203f11c7f63SJim Harris     * This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT)
204f11c7f63SJim Harris     * primitives received.
205f11c7f63SJim Harris     */
206f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_DONE_ACK_NAK_TIMEOUT,
207f11c7f63SJim Harris 
208f11c7f63SJim Harris    /**
209f11c7f63SJim Harris     * This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT)
210f11c7f63SJim Harris     * primitives transmitted.
211f11c7f63SJim Harris     */
212f11c7f63SJim Harris    SCIC_PHY_COUNTER_TRANSMITTED_DONE_ACK_NAK_TIMEOUT,
213f11c7f63SJim Harris 
214f11c7f63SJim Harris    /**
215f11c7f63SJim Harris     * This PHY information field tracks the number of times the inactivity
216f11c7f63SJim Harris     * timer for connections on the phy has been utilized.
217f11c7f63SJim Harris     */
218f11c7f63SJim Harris    SCIC_PHY_COUNTER_INACTIVITY_TIMER_EXPIRED,
219f11c7f63SJim Harris 
220f11c7f63SJim Harris    /**
221f11c7f63SJim Harris     * This PHY information field tracks the number of DONE (CREDIT TIMEOUT)
222f11c7f63SJim Harris     * primitives received.
223f11c7f63SJim Harris     */
224f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_DONE_CREDIT_TIMEOUT,
225f11c7f63SJim Harris 
226f11c7f63SJim Harris    /**
227f11c7f63SJim Harris     * This PHY information field tracks the number of DONE (CREDIT TIMEOUT)
228f11c7f63SJim Harris     * primitives transmitted.
229f11c7f63SJim Harris     */
230f11c7f63SJim Harris    SCIC_PHY_COUNTER_TRANSMITTED_DONE_CREDIT_TIMEOUT,
231f11c7f63SJim Harris 
232f11c7f63SJim Harris    /**
233f11c7f63SJim Harris     * This PHY information field tracks the number of CREDIT BLOCKED
234f11c7f63SJim Harris     * primitives received.
235f11c7f63SJim Harris     * @note Depending on remote device implementation, credit blocks
236f11c7f63SJim Harris     *       may occur regularly.
237f11c7f63SJim Harris     */
238f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_CREDIT_BLOCKED,
239f11c7f63SJim Harris 
240f11c7f63SJim Harris    /**
241f11c7f63SJim Harris     * This PHY information field contains the number of short frames
242f11c7f63SJim Harris     * received.  A short frame is simply a frame smaller then what is
243f11c7f63SJim Harris     * allowed by either the SAS or SATA specification.
244f11c7f63SJim Harris     */
245f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_SHORT_FRAME,
246f11c7f63SJim Harris 
247f11c7f63SJim Harris    /**
248f11c7f63SJim Harris     * This PHY information field contains the number of frames received after
249f11c7f63SJim Harris     * credit has been exhausted.
250f11c7f63SJim Harris     */
251f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_FRAME_WITHOUT_CREDIT,
252f11c7f63SJim Harris 
253f11c7f63SJim Harris    /**
254f11c7f63SJim Harris     * This PHY information field contains the number of frames received after
255f11c7f63SJim Harris     * a DONE has been received.
256f11c7f63SJim Harris     */
257f11c7f63SJim Harris    SCIC_PHY_COUNTER_RECEIVED_FRAME_AFTER_DONE,
258f11c7f63SJim Harris 
259f11c7f63SJim Harris    /**
260f11c7f63SJim Harris     * This PHY information field contains the number of times the phy
261f11c7f63SJim Harris     * failed to achieve DWORD synchronization during speed negotiation.
262f11c7f63SJim Harris     */
263f11c7f63SJim Harris    SCIC_PHY_COUNTER_SN_DWORD_SYNC_ERROR
264f11c7f63SJim Harris } SCIC_PHY_COUNTER_ID_T;
265f11c7f63SJim Harris 
266f11c7f63SJim Harris /**
267f11c7f63SJim Harris  * @brief This method will enable the user to retrieve information
268f11c7f63SJim Harris  *        common to all phys, such as: the negotiated link rate,
269f11c7f63SJim Harris  *        the phy id, etc.
270f11c7f63SJim Harris  *
271f11c7f63SJim Harris  * @param[in]  phy This parameter specifies the phy for which to retrieve
272f11c7f63SJim Harris  *             the properties.
273f11c7f63SJim Harris  * @param[out] properties This parameter specifies the properties
274f11c7f63SJim Harris  *             structure into which to copy the requested information.
275f11c7f63SJim Harris  *
276f11c7f63SJim Harris  * @return Indicate if the user specified a valid phy.
277f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the specified phy was valid.
278f11c7f63SJim Harris  * @retval SCI_FAILURE_INVALID_PHY This value is returned if the specified phy
279f11c7f63SJim Harris  *         is not valid.  When this value is returned, no data is copied to the
280f11c7f63SJim Harris  *         properties output parameter.
281f11c7f63SJim Harris  */
282f11c7f63SJim Harris SCI_STATUS scic_phy_get_properties(
283f11c7f63SJim Harris    SCI_PHY_HANDLE_T        phy,
284f11c7f63SJim Harris    SCIC_PHY_PROPERTIES_T * properties
285f11c7f63SJim Harris );
286f11c7f63SJim Harris 
287f11c7f63SJim Harris /**
288f11c7f63SJim Harris  * @brief This method will enable the user to retrieve information
289f11c7f63SJim Harris  *        specific to a SAS phy, such as: the received identify
290f11c7f63SJim Harris  *        address frame, received phy capabilities, etc.
291f11c7f63SJim Harris  *
292f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to
293f11c7f63SJim Harris  *             retrieve properties.
294f11c7f63SJim Harris  * @param[out] properties This parameter specifies the properties
295f11c7f63SJim Harris  *             structure into which to copy the requested information.
296f11c7f63SJim Harris  *
297f11c7f63SJim Harris  * @return This method returns an indication as to whether the SAS
298f11c7f63SJim Harris  *         phy properties were successfully retrieved.
299f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the SAS properties
300f11c7f63SJim Harris  *         are successfully retrieved.
301f11c7f63SJim Harris  * @retval SCI_FAILURE This value is returned if the SAS properties
302f11c7f63SJim Harris  *         are not successfully retrieved (e.g. It's not a SAS Phy).
303f11c7f63SJim Harris  */
304f11c7f63SJim Harris SCI_STATUS scic_sas_phy_get_properties(
305f11c7f63SJim Harris    SCI_PHY_HANDLE_T            phy,
306f11c7f63SJim Harris    SCIC_SAS_PHY_PROPERTIES_T * properties
307f11c7f63SJim Harris );
308f11c7f63SJim Harris 
309f11c7f63SJim Harris /**
310f11c7f63SJim Harris  * @brief This method will enable the user to retrieve information
311b790c193SPedro F. Giffuni  *        specific to a SATA phy, such as: the received signature
312f11c7f63SJim Harris  *        FIS, if a port selector is present, etc.
313f11c7f63SJim Harris  *
314f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to
315f11c7f63SJim Harris  *             retrieve properties.
316f11c7f63SJim Harris  * @param[out] properties This parameter specifies the properties
317f11c7f63SJim Harris  *             structure into which to copy the requested information.
318f11c7f63SJim Harris  *
319f11c7f63SJim Harris  * @return This method returns an indication as to whether the SATA
320f11c7f63SJim Harris  *         phy properties were successfully retrieved.
321f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the SATA properties
322f11c7f63SJim Harris  *         are successfully retrieved.
323f11c7f63SJim Harris  * @retval SCI_FAILURE This value is returned if the SATA properties
324f11c7f63SJim Harris  *         are not successfully retrieved (e.g. It's not a SATA Phy).
325f11c7f63SJim Harris  */
326f11c7f63SJim Harris SCI_STATUS scic_sata_phy_get_properties(
327f11c7f63SJim Harris    SCI_PHY_HANDLE_T             phy,
328f11c7f63SJim Harris    SCIC_SATA_PHY_PROPERTIES_T * properties
329f11c7f63SJim Harris );
330f11c7f63SJim Harris 
331f11c7f63SJim Harris /**
332f11c7f63SJim Harris  * @brief This method allows the SCIC user to instruct the SCIC
333f11c7f63SJim Harris  *        implementation to send the SATA port selection signal.
334f11c7f63SJim Harris  *
335f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to send
336f11c7f63SJim Harris  *             the port selection signal.
337f11c7f63SJim Harris  *
338f11c7f63SJim Harris  * @return An indication of whether the port selection signal was
339f11c7f63SJim Harris  *         successfully executed.
340f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the port selection signal
341f11c7f63SJim Harris  *         was successfully transmitted.
342f11c7f63SJim Harris  */
343f11c7f63SJim Harris SCI_STATUS scic_sata_phy_send_port_selection_signal(
344f11c7f63SJim Harris    SCI_PHY_HANDLE_T  phy
345f11c7f63SJim Harris );
346f11c7f63SJim Harris 
347f11c7f63SJim Harris /**
348f11c7f63SJim Harris  * @brief This method requests the SCI implementation to begin tracking
349f11c7f63SJim Harris  *        information specified by the supplied parameters.
350f11c7f63SJim Harris  *
351f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to enable
352f11c7f63SJim Harris  *             the information type.
353f11c7f63SJim Harris  * @param[in]  counter_id this parameter specifies the information
354f11c7f63SJim Harris  *             type to be enabled.
355f11c7f63SJim Harris  *
356f11c7f63SJim Harris  * @return Indicate if enablement of the information type was successful.
357f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the information type was
358f11c7f63SJim Harris  *         successfully enabled.
359f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value is returned
360f11c7f63SJim Harris  *         if the supplied information type is not supported.
361f11c7f63SJim Harris  */
362f11c7f63SJim Harris SCI_STATUS scic_phy_enable_counter(
363f11c7f63SJim Harris    SCI_PHY_HANDLE_T       phy,
364f11c7f63SJim Harris    SCIC_PHY_COUNTER_ID_T  counter_id
365f11c7f63SJim Harris );
366f11c7f63SJim Harris 
367f11c7f63SJim Harris /**
368f11c7f63SJim Harris  * @brief This method requests the SCI implementation to stop tracking
369f11c7f63SJim Harris  *        information specified by the supplied parameters.
370f11c7f63SJim Harris  *
371f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to disable
372f11c7f63SJim Harris  *             the information type.
373f11c7f63SJim Harris  * @param[in]  counter_id this parameter specifies the information
374f11c7f63SJim Harris  *             type to be disabled.
375f11c7f63SJim Harris  *
376f11c7f63SJim Harris  * @return Indicate if disablement of the information type was successful.
377f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the information type was
378f11c7f63SJim Harris  *         successfully disabled.
379f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value is returned
380f11c7f63SJim Harris  *         if the supplied information type is not supported.
381f11c7f63SJim Harris  */
382f11c7f63SJim Harris SCI_STATUS scic_phy_disable_counter(
383f11c7f63SJim Harris    SCI_PHY_HANDLE_T       phy,
384f11c7f63SJim Harris    SCIC_PHY_COUNTER_ID_T  counter_id
385f11c7f63SJim Harris );
386f11c7f63SJim Harris 
387f11c7f63SJim Harris /**
388f11c7f63SJim Harris  * @brief This method requests the SCI implementation to retrieve
389f11c7f63SJim Harris  *        tracking information specified by the supplied parameters.
390f11c7f63SJim Harris  *
391f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to retrieve
392f11c7f63SJim Harris  *             the information type.
393f11c7f63SJim Harris  * @param[in]  counter_id this parameter specifies the information
394f11c7f63SJim Harris  *             type to be retrieved.
395f11c7f63SJim Harris  * @param[out] data this parameter is a 32-bit pointer to a location
396f11c7f63SJim Harris  *             where the data being retrieved is to be placed.
397f11c7f63SJim Harris  *
398f11c7f63SJim Harris  * @return Indicate if retrieval of the information type was successful.
399f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the information type was
400f11c7f63SJim Harris  *         successfully retrieved.
401f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value is returned
402f11c7f63SJim Harris  *         if the supplied information type is not supported.
403f11c7f63SJim Harris  */
404f11c7f63SJim Harris SCI_STATUS scic_phy_get_counter(
405f11c7f63SJim Harris    SCI_PHY_HANDLE_T        phy,
406f11c7f63SJim Harris    SCIC_PHY_COUNTER_ID_T   counter_id,
407f11c7f63SJim Harris    U32                   * data
408f11c7f63SJim Harris );
409f11c7f63SJim Harris 
410f11c7f63SJim Harris /**
411f11c7f63SJim Harris  * @brief This method requests the SCI implementation to clear (reset)
412f11c7f63SJim Harris  *        tracking information specified by the supplied parameters.
413f11c7f63SJim Harris  *
414f11c7f63SJim Harris  * @param[in]  phy this parameter specifies the phy for which to clear
415f11c7f63SJim Harris  *             the information type.
416f11c7f63SJim Harris  * @param[in]  counter_id this parameter specifies the information
417f11c7f63SJim Harris  *             type to be cleared.
418f11c7f63SJim Harris  *
419f11c7f63SJim Harris  * @return Indicate if clearing of the information type was successful.
420f11c7f63SJim Harris  * @retval SCI_SUCCESS This value is returned if the information type was
421f11c7f63SJim Harris  *         successfully cleared.
422f11c7f63SJim Harris  * @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value is returned
423f11c7f63SJim Harris  *         if the supplied information type is not supported.
424f11c7f63SJim Harris  */
425f11c7f63SJim Harris SCI_STATUS scic_phy_clear_counter(
426f11c7f63SJim Harris    SCI_PHY_HANDLE_T       phy,
427f11c7f63SJim Harris    SCIC_PHY_COUNTER_ID_T  counter_id
428f11c7f63SJim Harris );
429f11c7f63SJim Harris 
430f11c7f63SJim Harris /**
431f11c7f63SJim Harris  * @brief This method will attempt to stop the phy object.
432f11c7f63SJim Harris  *
433f11c7f63SJim Harris  * @param[in] this_phy
434f11c7f63SJim Harris  *
435f11c7f63SJim Harris  * @return SCI_STATUS
436f11c7f63SJim Harris  * @retval SCI_SUCCESS if the phy is going to stop
437f11c7f63SJim Harris  *         SCI_INVALID_STATE if the phy is not in a valid state
438f11c7f63SJim Harris  *         to stop
439f11c7f63SJim Harris  */
440f11c7f63SJim Harris SCI_STATUS scic_phy_stop(
441f11c7f63SJim Harris    SCI_PHY_HANDLE_T       phy
442f11c7f63SJim Harris );
443f11c7f63SJim Harris 
444f11c7f63SJim Harris /**
445f11c7f63SJim Harris  * @brief This method will attempt to start the phy object. This
446f11c7f63SJim Harris  *        request is only valid when the phy is in the stopped
447f11c7f63SJim Harris  *        state
448f11c7f63SJim Harris  *
449f11c7f63SJim Harris  * @param[in] this_phy
450f11c7f63SJim Harris  *
451f11c7f63SJim Harris  * @return SCI_STATUS
452f11c7f63SJim Harris  */
453f11c7f63SJim Harris SCI_STATUS scic_phy_start(
454f11c7f63SJim Harris    SCI_PHY_HANDLE_T       phy
455f11c7f63SJim Harris );
456f11c7f63SJim Harris 
457f11c7f63SJim Harris #ifdef __cplusplus
458f11c7f63SJim Harris }
459f11c7f63SJim Harris #endif // __cplusplus
460f11c7f63SJim Harris 
461f11c7f63SJim Harris #endif // _SCIC_PHY_H_
462f11c7f63SJim Harris 
463