FreeBSD/sys/dev/nxge/xgehal/xgehal-device.c
/*
 * __hal_device_tti_set
 * @ring: The post_qid of the FIFO.
 * @channel: HAL channel the FIFO.
 *
 * This function stores the TTI value associated for the MSI and
 * also unmasks this particular TTI in the tti_mask register.
 */
hal_device_tti_set
@ring: The post_qid of the FIFO.
@channel: HAL channel the FIFO.

This function stores the TTI value associated for the MSI and
also unmasks this particular TTI in the tti_mask register.
hal_device_tti_set @ring : The post_qid of the FIFO . @channel : HAL channel the FIFO . This function stores the TTI value associated for the MSI and also unmasks this particular TTI in the tti_mask register .
static void __hal_device_tti_set(int fifo_qid, xge_hal_channel_t *channel)
{
	xge_hal_device_t *hldev = (xge_hal_device_t*)channel->devh;
	xge_hal_pci_bar0_t *bar0 = (xge_hal_pci_bar0_t *)hldev->bar0;
	u64 val64;
	if (hldev->config.intr_mode == XGE_HAL_INTR_MODE_MSI ||
	    hldev->config.intr_mode == XGE_HAL_INTR_MODE_MSIX)
	    channel->tti = (u8)fifo_qid;
	val64 = xge_os_pio_mem_read64(hldev->pdev, hldev->regh0,
	            &bar0->tx_traffic_mask);
	val64 &= ~BIT(fifo_qid);
	xge_os_pio_mem_write64(hldev->pdev,
	            hldev->regh0, val64,
	            &bar0->tx_traffic_mask);
}
static void __hal_device_tti_set ( int fifo_qid , xge_hal_channel_t * channel ) { xge_hal_device_t * hldev = ( xge_hal_device_t * ) channel -> devh ; xge_hal_pci_bar0_t * bar0 = ( xge_hal_pci_bar0_t * ) hldev -> bar0 ; u64 val64 ; if ( hldev -> config . intr_mode == XGE_HAL_INTR_MODE_MSI || hldev -> config . intr_mode == XGE_HAL_INTR_MODE_MSIX ) channel -> tti = ( u8 ) fifo_qid ; val64 = xge_os_pio_mem_read64 ( hldev -> pdev , hldev -> regh0 , & bar0 -> tx_traffic_mask ) ; val64 &= ~ BIT ( fifo_qid ) ; xge_os_pio_mem_write64 ( hldev -> pdev , hldev -> regh0 , val64 , & bar0 -> tx_traffic_mask ) ; }
__hal_device_tti_set
 @ring: The post_qid of the FIFO.
__hal_device_tti_set @ring : The post_qid of the FIFO .