@@ -2764,6 +2764,70 @@ typedef enum _sai_port_stat_t
2764
2764
2765
2765
} sai_port_stat_t ;
2766
2766
2767
+ /**
2768
+ * @brief Port interruption IDs in get_port_interrupts_status() call
2769
+ */
2770
+ typedef enum _sai_port_interrupt_t
2771
+ {
2772
+ /** PCS Rx FIFO Empty Interrupt */
2773
+ SAI_PORT_INTERRUPT_PCS_RX_FIFO_EMPTY ,
2774
+
2775
+ /** PCS Rx FIFO Full Interrupt */
2776
+ SAI_PORT_INTERRUPT_PCS_RX_FIFO_FULL ,
2777
+
2778
+ /** PCS Tx PPM FIFO Overflow Interrupt */
2779
+ SAI_PORT_INTERRUPT_PCS_RX_FIFO_OVERFLOW ,
2780
+
2781
+ /** PCS Tx PPM FIFO Underflow Interrupt */
2782
+ SAI_PORT_INTERRUPT_PCS_RX_FIFO_UNDERFLOW ,
2783
+
2784
+ /** PCS Tx PPM FIFO Overrun Interrupt */
2785
+ SAI_PORT_INTERRUPT_PCS_TX_FIFO_OVERRUN ,
2786
+
2787
+ /** Edge of the Local Fault Condition on Tx Path Interrupt */
2788
+ SAI_PORT_INTERRUPT_PCS_RX_LOCAL_FAULT ,
2789
+
2790
+ /** Edge of the Local Fault Condition on Rx Path Interrupt */
2791
+ SAI_PORT_INTERRUPT_PCS_TX_LOCAL_FAULT ,
2792
+
2793
+ /** Edge of the Remote Fault Condition on Tx Path Interrupt */
2794
+ SAI_PORT_INTERRUPT_PCS_RX_REMOTE_FAULT ,
2795
+
2796
+ /** Edge of the Remote Fault Condition on Rx Path Interrupt */
2797
+ SAI_PORT_INTERRUPT_PCS_TX_REMOTE_FAULT ,
2798
+
2799
+ /** Edge of the 4 Local Fault Condition on Tx Path Interrupt */
2800
+ SAI_PORT_INTERRUPT_PCS_TX_4LOCAL_FAULT ,
2801
+
2802
+ /** Edge of the 4 Remote Fault Condition on Tx Path Interrupt */
2803
+ SAI_PORT_INTERRUPT_PCS_TX_4REMOTE_FAULT ,
2804
+
2805
+ /** PCS Tx PPM FIFO Push back Interrupt */
2806
+ SAI_PORT_INTERRUPT_PCS_TX_FIFO_PUSHBACK ,
2807
+
2808
+ /** PCS Tx PPM FIFO Stop Write Interrupt */
2809
+ SAI_PORT_INTERRUPT_PCS_TX_FIFO_STOPWRITE ,
2810
+
2811
+ /** PCS Tx LPI Received Interrupt */
2812
+ SAI_PORT_INTERRUPT_PCS_LPI_TX ,
2813
+
2814
+ /** PCS Tx LPI Received Interrupt */
2815
+ SAI_PORT_INTERRUPT_PCS_LPI_RX ,
2816
+
2817
+ /** PCS Tx PPM FIFO Very High Water Interrupt */
2818
+ SAI_PORT_INTERRUPT_PCS_VERY_HIGH ,
2819
+
2820
+ /** High BER Change Interrupt */
2821
+ SAI_PORT_INTERRUPT_HIGH_BER_CHANGE ,
2822
+
2823
+ /** Packet CRC Check Error Interrupt */
2824
+ SAI_PORT_INTERRUPT_PKT_CRC_ERROR ,
2825
+
2826
+ /** Link Change Interrupt */
2827
+ SAI_PORT_INTERRUPT_LINK_CHANGE ,
2828
+
2829
+ } sai_port_interrupt_t ;
2830
+
2767
2831
/**
2768
2832
* @brief Create port
2769
2833
*
@@ -2874,6 +2938,24 @@ typedef sai_status_t (*sai_clear_port_stats_fn)(
2874
2938
typedef sai_status_t (* sai_clear_port_all_stats_fn )(
2875
2939
_In_ sai_object_id_t port_id );
2876
2940
2941
+ /**
2942
+ * @brief Get port interruptions status.
2943
+ *
2944
+ * This API is clear-on-read, the interruption status should be reset after the read.
2945
+ *
2946
+ * @param[in] port_id Port id
2947
+ * @param[in] count Number of interruptions ids in the array
2948
+ * @param[in] interrupt_ids Specifies the array of interrupts ids
2949
+ * @param[out] stats Array of resulting interruptions status.
2950
+ *
2951
+ * @return #SAI_STATUS_SUCCESS on success, failure status code on error
2952
+ */
2953
+ typedef sai_status_t (* sai_get_port_interrupts_status_fn )(
2954
+ _In_ sai_object_id_t port_id ,
2955
+ _In_ uint32_t count ,
2956
+ _In_ const sai_interrupt_id_t * interrupt_ids ,
2957
+ _Out_ bool * stats );
2958
+
2877
2959
/**
2878
2960
* @brief Port state change notification
2879
2961
*
@@ -3485,6 +3567,7 @@ typedef struct _sai_port_api_t
3485
3567
sai_get_port_stats_ext_fn get_port_stats_ext ;
3486
3568
sai_clear_port_stats_fn clear_port_stats ;
3487
3569
sai_clear_port_all_stats_fn clear_port_all_stats ;
3570
+ sai_get_port_interrupts_status_fn get_port_interrupts_status ;
3488
3571
sai_create_port_pool_fn create_port_pool ;
3489
3572
sai_remove_port_pool_fn remove_port_pool ;
3490
3573
sai_set_port_pool_attribute_fn set_port_pool_attribute ;
0 commit comments