FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/*
 * Write a value to a register and check that the write completed.  These
 * writes normally complete in a cycle or two, so one read should suffice.
 * The very first read exists to flush the posted write to the device.
 */
Write a value to a register and check that the write completed.  These
writes normally complete in a cycle or two, so one read should suffice.
The very first read exists to flush the posted write to the device.
Write a value to a register and check that the write completed . These writes normally complete in a cycle or two so one read should suffice . The very first read exists to flush the posted write to the device .
static int wrreg_wait(adapter_t *adapter, unsigned int addr, u32 val)
{
	t3_write_reg(adapter,	addr, val);
	(void) t3_read_reg(adapter, addr);                   
	if (!(t3_read_reg(adapter, addr) & F_BUSY))
		return 0;
	CH_ERR(adapter, "write to MC7 register 0x%x timed out\n", addr);
	return -EIO;
}
static int wrreg_wait ( adapter_t * adapter , unsigned int addr , u32 val ) { t3_write_reg ( adapter , addr , val ) ; ( void ) t3_read_reg ( adapter , addr ) ; if ( ! ( t3_read_reg ( adapter , addr ) & F_BUSY ) ) return 0 ; CH_ERR ( adapter , " \n " , addr ) ; return - EIO ; }
Write a value to a register and check that the write completed.
Write a value to a register and check that the write completed .
/* flush */