FreeBSD/sys/dev/qlxgb/qla_hw.c
/*
 * Name: qla_get_max_tx_cntxts
 * Function: Returns the maximum number of Transmit Contexts supported.
 */
qla_get_max_tx_cntxts
Function: Returns the maximum number of Transmit Contexts supported.
qla_get_max_tx_cntxts Function : Returns the maximum number of Transmit Contexts supported .
static int
qla_get_max_tx_cntxts(qla_host_t *ha)
{
	qla_cdrp_t	cdrp;
	device_t	dev;
	dev = ha->pci_dev;
	bzero(&cdrp, sizeof(qla_cdrp_t));
	cdrp.cmd = Q8_CMD_RD_MAX_TX_CNTXT;
	if (qla_issue_cmd(ha, &cdrp)) {
		device_printf(dev, "%s: Q8_CMD_RD_MAX_TX_CNTXT failed\n",
			__func__);
		return (-1);
	} else {
		ha->hw.max_xmt_cntxts = cdrp.rsp_arg1;
		QL_DPRINT2((dev, "%s: max_xmt_cntxts 0x%08x\n",
			__func__, ha->hw.max_xmt_cntxts));
	}
	return 0;
}
static int qla_get_max_tx_cntxts ( qla_host_t * ha ) { qla_cdrp_t cdrp ; device_t dev ; dev = ha -> pci_dev ; bzero ( & cdrp , sizeof ( qla_cdrp_t ) ) ; cdrp . cmd = Q8_CMD_RD_MAX_TX_CNTXT ; if ( qla_issue_cmd ( ha , & cdrp ) ) { device_printf ( dev , " \n " , __func__ ) ; return ( -1 ) ; } else { ha -> hw . max_xmt_cntxts = cdrp . rsp_arg1 ; QL_DPRINT2 ( ( dev , " \n " , __func__ , ha -> hw . max_xmt_cntxts ) ) ; } return 0 ; }
Name: qla_get_max_tx_cntxts
 Function: Returns the maximum number of Transmit Contexts supported.
Name : qla_get_max_tx_cntxts Function : Returns the maximum number of Transmit Contexts supported .