FreeBSD/sys/dev/etherswitch/arswitch/arswitch_reg.c
/*
 * XXX NOTE:
 *
 * This may not work for AR7240 series embedded switches -
 * the per-PHY register space doesn't seem to be exposed.
 *
 * In that instance, it may be required to speak via
 * the internal switch PHY MDIO bus indirection.
 */
XXX NOTE:
This may not work for AR7240 series embedded switches
the per-PHY register space doesn't seem to be exposed.

In that instance, it may be required to speak via
the internal switch PHY MDIO bus indirection.
XXX NOTE : This may not work for AR7240 series embedded switches the per - PHY register space doesn ' t seem to be exposed . In that instance it may be required to speak via the internal switch PHY MDIO bus indirection .
void
arswitch_writedbg(device_t dev, int phy, uint16_t dbg_addr,
    uint16_t dbg_data)
{
	(void) MDIO_WRITEREG(device_get_parent(dev), phy,
	    MII_ATH_DBG_ADDR, dbg_addr);
	(void) MDIO_WRITEREG(device_get_parent(dev), phy,
	    MII_ATH_DBG_DATA, dbg_data);
}
void arswitch_writedbg ( device_t dev , int phy , uint16_t dbg_addr , uint16_t dbg_data ) { ( void ) MDIO_WRITEREG ( device_get_parent ( dev ) , phy , MII_ATH_DBG_ADDR , dbg_addr ) ; ( void ) MDIO_WRITEREG ( device_get_parent ( dev ) , phy , MII_ATH_DBG_DATA , dbg_data ) ; }
XXX NOTE:
 This may not work for AR7240 series embedded switches
 the per-PHY register space doesn't seem to be exposed.
XXX NOTE : This may not work for AR7240 series embedded switches the per - PHY register space doesn ' t seem to be exposed .