FreeBSD/sys/dev/utopia/idtphy.c
/*
 * Set the chip to reflect the current state in utopia.
 * Assume, that the chip has been reset.
 */
Set the chip to reflect the current state in utopia.
Assume, that the chip has been reset.
Set the chip to reflect the current state in utopia . Assume that the chip has been reset .
static int
idt77155_set_chip(struct utopia *utp)
{
	int err = 0;
	err |= idt77155_set_sdh(utp, utp->state & UTP_ST_SDH);
	err |= idt77155_set_unass(utp, utp->state & UTP_ST_UNASS);
	err |= idt77155_set_loopback(utp, utp->loopback);
	err |= idt77155_update_carrier(utp);
	err |= UTP_WRITEREG(utp, IDTPHY_REGO_INT,
	    IDTPHY_REGM_INT_RXSOHI, IDTPHY_REGM_INT_RXSOHI);
	err |= UTP_WRITEREG(utp, IDTPHY_REGO_RSOC,
	    IDTPHY_REGM_RSOC_LOSI, IDTPHY_REGM_RSOC_LOSI);
	return (err ? EIO : 0);
}
static int idt77155_set_chip ( struct utopia * utp ) { int err = 0 ; err |= idt77155_set_sdh ( utp , utp -> state & UTP_ST_SDH ) ; err |= idt77155_set_unass ( utp , utp -> state & UTP_ST_UNASS ) ; err |= idt77155_set_loopback ( utp , utp -> loopback ) ; err |= idt77155_update_carrier ( utp ) ; err |= UTP_WRITEREG ( utp , IDTPHY_REGO_INT , IDTPHY_REGM_INT_RXSOHI , IDTPHY_REGM_INT_RXSOHI ) ; err |= UTP_WRITEREG ( utp , IDTPHY_REGO_RSOC , IDTPHY_REGM_RSOC_LOSI , IDTPHY_REGM_RSOC_LOSI ) ; return ( err ? EIO : 0 ) ; }
Set the chip to reflect the current state in utopia.
Set the chip to reflect the current state in utopia .
/* set sonet/sdh */ /* unassigned or idle cells */ /* loopback */ /* update carrier state */ /* enable interrupts on LOS */