release/src-rt/linux/linux-2.6/drivers/net/cxgb3/t3_hw.c
/**
 *	t3_mdio_change_bits - modify the value of a PHY register
 *	@phy: the PHY to operate on
 *	@mmd: the device address
 *	@reg: the register address
 *	@clear: what part of the register value to mask off
 *	@set: what part of the register value to set
 *
 *	Changes the value of a PHY register by applying a mask to its current
 *	value and ORing the result with a new value.
 */


Changes the value of a PHY register by applying a mask to its current
value and ORing the result with a new value.
Changes the value of a PHY register by applying a mask to its current value and ORing the result with a new value .
int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear,
			unsigned int set)
{
	int ret;
	unsigned int val;
	ret = mdio_read(phy, mmd, reg, &val);
	if (!ret) {
		val &= ~clear;
		ret = mdio_write(phy, mmd, reg, val | set);
	}
	return ret;
}
int t3_mdio_change_bits ( struct cphy * phy , int mmd , int reg , unsigned int clear , unsigned int set ) { int ret ; unsigned int val ; ret = mdio_read ( phy , mmd , reg , & val ) ; if ( ! ret ) { val &= ~ clear ; ret = mdio_write ( phy , mmd , reg , val | set ) ; } return ret ; }
t3_mdio_change_bits - modify the value of a PHY register
      @phy: the PHY to operate on
      @mmd: the device address
      @reg: the register address
      @clear: what part of the register value to mask off
      @set: what part of the register value to set
t3_mdio_change_bits - modify the value of a PHY register @phy : the PHY to operate on @mmd : the device address @reg : the register address @clear : what part of the register value to mask off @set : what part of the register value to set