FreeBSD/sys/dev/cxgb/common/cxgb_aq100x.c
/*
 * Return value is temperature in celcius, 0xffff for error or don't know.
 */
Return value is temperature in celcius, 0xffff for error or don't know.
Return value is temperature in celcius 0xffff for error or don ' t know .
static int
aq100x_temperature(struct cphy *phy)
{
	unsigned int v;
	if (mdio_read(phy, MDIO_DEV_VEND1, AQ_THERMAL2, &v) ||
	    v == 0xffff || (v & 1) != 1)
		return (0xffff);
	if (mdio_read(phy, MDIO_DEV_VEND1, AQ_THERMAL1, &v))
		return (0xffff);
	return ((int)((signed char)(v >> 8)));
}
static int aq100x_temperature ( struct cphy * phy ) { unsigned int v ; if ( mdio_read ( phy , MDIO_DEV_VEND1 , AQ_THERMAL2 , & v ) || v == 0xffff || ( v & 1 ) != 1 ) return ( 0xffff ) ; if ( mdio_read ( phy , MDIO_DEV_VEND1 , AQ_THERMAL1 , & v ) ) return ( 0xffff ) ; return ( ( int ) ( ( signed char ) ( v >> 8 ) ) ) ; }
Return value is temperature in celcius, 0xffff for error or don't know.
Return value is temperature in celcius 0xffff for error or don ' t know .