FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/**
 *	t4_restart_aneg - restart autonegotiation
 *	@adap: the adapter
 *	@mbox: mbox to use for the FW command
 *	@port: the port id
 *
 *	Restarts autonegotiation for the selected port.
 */
restart autonegotiation
@adap: the adapter
@mbox: mbox to use for the FW command
@port: the port id

Restarts autonegotiation for the selected port.
restart autonegotiation @adap : the adapter @mbox : mbox to use for the FW command @port : the port id Restarts autonegotiation for the selected port .
int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port)
{
	struct fw_port_cmd c;
	memset(&c, 0, sizeof(c));
	c.op_to_portid = cpu_to_be32(V_FW_CMD_OP(FW_PORT_CMD) |
				     F_FW_CMD_REQUEST | F_FW_CMD_EXEC |
				     V_FW_PORT_CMD_PORTID(port));
	c.action_to_len16 =
		cpu_to_be32(V_FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) |
			    FW_LEN16(c));
	c.u.l1cfg.rcap = cpu_to_be32(FW_PORT_CAP_ANEG);
	return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
}
int t4_restart_aneg ( struct adapter * adap , unsigned int mbox , unsigned int port ) { struct fw_port_cmd c ; memset ( & c , 0 , sizeof ( c ) ) ; c . op_to_portid = cpu_to_be32 ( V_FW_CMD_OP ( FW_PORT_CMD ) | F_FW_CMD_REQUEST | F_FW_CMD_EXEC | V_FW_PORT_CMD_PORTID ( port ) ) ; c . action_to_len16 = cpu_to_be32 ( V_FW_PORT_CMD_ACTION ( FW_PORT_ACTION_L1_CFG ) | FW_LEN16 ( c ) ) ; c . u . l1cfg . rcap = cpu_to_be32 ( FW_PORT_CAP_ANEG ) ; return t4_wr_mbox ( adap , mbox , & c , sizeof ( c ) , NULL ) ; }
t4_restart_aneg - restart autonegotiation
      @adap: the adapter
      @mbox: mbox to use for the FW command
      @port: the port id
t4_restart_aneg - restart autonegotiation @adap : the adapter @mbox : mbox to use for the FW command @port : the port id