FreeBSD/sys/dev/qlxgb/qla_hw.c
/*
 * Name: qla_set_max_mtu
 * Function:
 *	Sets the maximum transfer unit size for the specified rcv context.
 */
qla_set_max_mtu
Function:
Sets the maximum transfer unit size for the specified rcv context.
qla_set_max_mtu Function : Sets the maximum transfer unit size for the specified rcv context .
int
qla_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id)
{
	qla_cdrp_t	cdrp;
	device_t	dev;
	dev = ha->pci_dev;
	bzero(&cdrp, sizeof(qla_cdrp_t));
	cdrp.cmd = Q8_CMD_SET_MTU;
	cdrp.cmd_arg1 = (uint32_t)cntxt_id;
	cdrp.cmd_arg2 = mtu;
	if (qla_issue_cmd(ha, &cdrp)) {
		device_printf(dev, "%s: Q8_CMD_RD_MAX_MTU failed\n", __func__);
		return (-1);
	} else {
		ha->hw.max_mtu = cdrp.rsp_arg1;
	}
	return 0;
}
int qla_set_max_mtu ( qla_host_t * ha , uint32_t mtu , uint16_t cntxt_id ) { qla_cdrp_t cdrp ; device_t dev ; dev = ha -> pci_dev ; bzero ( & cdrp , sizeof ( qla_cdrp_t ) ) ; cdrp . cmd = Q8_CMD_SET_MTU ; cdrp . cmd_arg1 = ( uint32_t ) cntxt_id ; cdrp . cmd_arg2 = mtu ; if ( qla_issue_cmd ( ha , & cdrp ) ) { device_printf ( dev , " \n " , __func__ ) ; return ( -1 ) ; } else { ha -> hw . max_mtu = cdrp . rsp_arg1 ; } return 0 ; }
Name: qla_set_max_mtu
 Function:
      Sets the maximum transfer unit size for the specified rcv context.
Name : qla_set_max_mtu Function : Sets the maximum transfer unit size for the specified rcv context .