src/dpdk/drivers/net/cxgbe/base/t4_hw.c
static int t4_wait_dev_ready(struct adapter *adapter)
{
	u32 whoami;

	whoami = t4_read_reg(adapter, A_PL_WHOAMI);

	if (whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS)
		return 0;

	msleep(500);
	whoami = t4_read_reg(adapter, A_PL_WHOAMI);
	if (whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS)
		return 0;

	dev_err(adapter, "Device didn't become ready for access, whoami = %#x\n",
		whoami);
	return -EIO;
}
/**
 * t4_wait_dev_ready - wait till to reads of registers work
 *
 * Right after the device is RESET is can take a small amount of time
 * for it to respond to register reads.  Until then, all reads will
 * return either 0xff...ff or 0xee...ee.  Return an error if reads
 * don't work within a reasonable time frame.
 */
wait till to reads of registers work
Right after the device is RESET is can take a small amount of time
for it to respond to register reads.  Until then, all reads will
return either 0xff...ff or 0xee...ee.  Return an error if reads
don't work within a reasonable time frame.
wait till to reads of registers work Right after the device is RESET is can take a small amount of time for it to respond to register reads . Until then all reads will return either 0xff ... ff or 0xee ... ee . Return an error if reads don ' t work within a reasonable time frame .
static int t4_wait_dev_ready(struct adapter *adapter)
{
	u32 whoami;
	whoami = t4_read_reg(adapter, A_PL_WHOAMI);
	if (whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS)
		return 0;
	msleep(500);
	whoami = t4_read_reg(adapter, A_PL_WHOAMI);
	if (whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS)
		return 0;
	dev_err(adapter, "Device didn't become ready for access, whoami = %#x\n",
		whoami);
	return -EIO;
}
static int t4_wait_dev_ready ( struct adapter * adapter ) { u32 whoami ; whoami = t4_read_reg ( adapter , A_PL_WHOAMI ) ; if ( whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS ) return 0 ; msleep ( 500 ) ; whoami = t4_read_reg ( adapter , A_PL_WHOAMI ) ; if ( whoami != 0xffffffff && whoami != X_CIM_PF_NOACCESS ) return 0 ; dev_err ( adapter , " \n " , whoami ) ; return - EIO ; }
t4_wait_dev_ready - wait till to reads of registers work
 Right after the device is RESET is can take a small amount of time
 for it to respond to register reads.
t4_wait_dev_ready - wait till to reads of registers work Right after the device is RESET is can take a small amount of time for it to respond to register reads .