FreeBSD/sys/dev/qlxgb/qla_hw.c
/*
 * Name: qla_config_intr_coalesce
 * Function: Configure Interrupt Coalescing.
 */
qla_config_intr_coalesce
Function: Configure Interrupt Coalescing.
qla_config_intr_coalesce Function : Configure Interrupt Coalescing .
static int
qla_config_intr_coalesce(qla_host_t *ha, uint16_t cntxt_id, int tenable)
{
	qla_fw_cds_config_intr_coalesc_t intr_coalesce;
	int ret;
	bzero(&intr_coalesce, sizeof(qla_fw_cds_config_intr_coalesc_t));
	intr_coalesce.hdr.cmd = Q8_FWCD_CNTRL_REQ;
	intr_coalesce.hdr.opcode = Q8_FWCD_OPCODE_CONFIG_INTR_COALESCING;
	intr_coalesce.hdr.cntxt_id = cntxt_id;
	intr_coalesce.flags = 0x04;
	intr_coalesce.max_rcv_pkts = 256;
	intr_coalesce.max_rcv_usecs = 3;
	intr_coalesce.max_snd_pkts = 64;
	intr_coalesce.max_snd_usecs = 4;
	if (tenable) {
		intr_coalesce.usecs_to = 1000; 
		intr_coalesce.timer_type = Q8_FWCMD_INTR_COALESC_TIMER_PERIODIC;
		intr_coalesce.sds_ring_bitmask =
			Q8_FWCMD_INTR_COALESC_SDS_RING_0;
	}
	ret = qla_fw_cmd(ha, &intr_coalesce,
			sizeof(qla_fw_cds_config_intr_coalesc_t));
	return ret;
}
static int qla_config_intr_coalesce ( qla_host_t * ha , uint16_t cntxt_id , int tenable ) { qla_fw_cds_config_intr_coalesc_t intr_coalesce ; int ret ; bzero ( & intr_coalesce , sizeof ( qla_fw_cds_config_intr_coalesc_t ) ) ; intr_coalesce . hdr . cmd = Q8_FWCD_CNTRL_REQ ; intr_coalesce . hdr . opcode = Q8_FWCD_OPCODE_CONFIG_INTR_COALESCING ; intr_coalesce . hdr . cntxt_id = cntxt_id ; intr_coalesce . flags = 0x04 ; intr_coalesce . max_rcv_pkts = 256 ; intr_coalesce . max_rcv_usecs = 3 ; intr_coalesce . max_snd_pkts = 64 ; intr_coalesce . max_snd_usecs = 4 ; if ( tenable ) { intr_coalesce . usecs_to = 1000 ; intr_coalesce . timer_type = Q8_FWCMD_INTR_COALESC_TIMER_PERIODIC ; intr_coalesce . sds_ring_bitmask = Q8_FWCMD_INTR_COALESC_SDS_RING_0 ; } ret = qla_fw_cmd ( ha , & intr_coalesce , sizeof ( qla_fw_cds_config_intr_coalesc_t ) ) ; return ret ; }
Name: qla_config_intr_coalesce
 Function: Configure Interrupt Coalescing.
Name : qla_config_intr_coalesce Function : Configure Interrupt Coalescing .
/* 1 millisecond */