/* Sets a register field specified by the supplied mask to the given value.  */
void t3_set_reg_field(struct adapter *adapter, unsigned int addr, u32 mask, u32 val)
/* Sets a register field specified by the supplied mask to the given value.  */
void t3_set_reg_field(struct adapter *adapter, unsigned int addr, u32 mask, u32 val)
{
	u32 v = t3_read_reg(adapter, addr) & ~mask;
	t3_write_reg(adapter, addr, v | val);
	t3_read_reg(adapter, addr);
}