FreeBSD/sys/dev/nxge/xgehal/xgehal-device.c
/*
 * __hal_device_handle_rxxgxs - Handle RxXGXS interrupt reason
 * @hldev: HAL device handle.
 * @reason: interrupt reason
 */
Handle RxXGXS interrupt reason
@hldev: HAL device handle.
@reason: interrupt reason
Handle RxXGXS interrupt reason @hldev : HAL device handle . @reason : interrupt reason
xge_hal_status_e
__hal_device_handle_rxxgxs(xge_hal_device_t *hldev, u64 reason)
{
	xge_hal_pci_bar0_t *isrbar0 =
	        (xge_hal_pci_bar0_t *)(void *)hldev->isrbar0;
	u64 val64, temp64;
	val64 = xge_os_pio_mem_read64(hldev->pdev, hldev->regh0,
	            &isrbar0->xgxs_int_status);
	if (!(val64 & XGE_HAL_XGXS_INT_STATUS_RXGXS))
	    return XGE_HAL_OK;
	val64 = xge_os_pio_mem_read64(hldev->pdev, hldev->regh0,
	            &isrbar0->xgxs_rxgxs_err_reg);
	xge_os_pio_mem_write64(hldev->pdev, hldev->regh0,
	            val64, &isrbar0->xgxs_rxgxs_err_reg);
	hldev->stats.sw_dev_info_stats.xgxs_rxgxs_err_cnt++;
	temp64 = XGE_HAL_RXGXS_ESTORE_OFLOW|XGE_HAL_RXGXS_RX_SM_ERR;
	if (val64 & temp64) {
	    xge_hal_device_reset(hldev);
	    xge_hal_device_enable(hldev);
	    xge_hal_device_intr_enable(hldev);
	}
	return XGE_HAL_OK;
}
xge_hal_status_e __hal_device_handle_rxxgxs ( xge_hal_device_t * hldev , u64 reason ) { xge_hal_pci_bar0_t * isrbar0 = ( xge_hal_pci_bar0_t * ) ( void * ) hldev -> isrbar0 ; u64 val64 , temp64 ; val64 = xge_os_pio_mem_read64 ( hldev -> pdev , hldev -> regh0 , & isrbar0 -> xgxs_int_status ) ; if ( ! ( val64 & XGE_HAL_XGXS_INT_STATUS_RXGXS ) ) return XGE_HAL_OK ; val64 = xge_os_pio_mem_read64 ( hldev -> pdev , hldev -> regh0 , & isrbar0 -> xgxs_rxgxs_err_reg ) ; xge_os_pio_mem_write64 ( hldev -> pdev , hldev -> regh0 , val64 , & isrbar0 -> xgxs_rxgxs_err_reg ) ; hldev -> stats . sw_dev_info_stats . xgxs_rxgxs_err_cnt ++ ; temp64 = XGE_HAL_RXGXS_ESTORE_OFLOW | XGE_HAL_RXGXS_RX_SM_ERR ; if ( val64 & temp64 ) { xge_hal_device_reset ( hldev ) ; xge_hal_device_enable ( hldev ) ; xge_hal_device_intr_enable ( hldev ) ; } return XGE_HAL_OK ; }
__hal_device_handle_rxxgxs - Handle RxXGXS interrupt reason
 @hldev: HAL device handle.
__hal_device_handle_rxxgxs - Handle RxXGXS interrupt reason @hldev : HAL device handle .