FreeBSD/sys/dev/nxge/xgehal/xgehal-mgmt.c
/*
 * __hal_update_ring_bump - Update the ring bump counter for the
 * particular channel.
 * @hldev: HAL device handle.
 * @queue: the queue who's data is to be collected.
 * @chinfo: pointer to the statistics structure of the given channel.
 * Usage: See xge_hal_aux_stats_hal_read{}
 */
Update the ring bump counter for the
particular channel.
@hldev: HAL device handle.
@queue: the queue who's data is to be collected.
@chinfo: pointer to the statistics structure of the given channel.
Update the ring bump counter for the particular channel . @hldev : HAL device handle . @queue : the queue who ' s data is to be collected . @chinfo : pointer to the statistics structure of the given channel .
static void
__hal_update_ring_bump(xge_hal_device_t *hldev, int queue,
	xge_hal_stats_channel_info_t *chinfo)
{
	xge_hal_pci_bar0_t *bar0 = (xge_hal_pci_bar0_t *)hldev->bar0;
	u64 rbc = 0;
	int reg = (queue / 4);
	void * addr;
	addr = (reg == 1)? (&bar0->ring_bump_counter2) :
	    (&bar0->ring_bump_counter1);
	rbc = xge_os_pio_mem_read64(hldev->pdev, hldev->regh0, addr);
	chinfo->ring_bump_cnt = XGE_HAL_RING_BUMP_CNT(queue, rbc);
}
static void __hal_update_ring_bump ( xge_hal_device_t * hldev , int queue , xge_hal_stats_channel_info_t * chinfo ) { xge_hal_pci_bar0_t * bar0 = ( xge_hal_pci_bar0_t * ) hldev -> bar0 ; u64 rbc = 0 ; int reg = ( queue / 4 ) ; void * addr ; addr = ( reg == 1 ) ? ( & bar0 -> ring_bump_counter2 ) : ( & bar0 -> ring_bump_counter1 ) ; rbc = xge_os_pio_mem_read64 ( hldev -> pdev , hldev -> regh0 , addr ) ; chinfo -> ring_bump_cnt = XGE_HAL_RING_BUMP_CNT ( queue , rbc ) ; }
__hal_update_ring_bump - Update the ring bump counter for the
 particular channel.
__hal_update_ring_bump - Update the ring bump counter for the particular channel .