FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_read_indirect - read indirectly addressed registers
 *	@adap: the adapter
 *	@addr_reg: register holding the indirect address
 *	@data_reg: register holding the value of the indirect register
 *	@vals: where the read register values are stored
 *	@start_idx: index of first indirect register to read
 *	@nregs: how many indirect registers to read
 *
 *	Reads registers that are accessed indirectly through an address/data
 *	register pair.
 */


Reads registers that are accessed indirectly through an address/data
register pair.
Reads registers that are accessed indirectly through an address / data register pair .
static void t3_read_indirect(adapter_t *adap, unsigned int addr_reg,
		      unsigned int data_reg, u32 *vals, unsigned int nregs,
		      unsigned int start_idx)
{
	while (nregs--) {
		t3_write_reg(adap, addr_reg, start_idx);
		*vals++ = t3_read_reg(adap, data_reg);
		start_idx++;
	}
}
static void t3_read_indirect ( adapter_t * adap , unsigned int addr_reg , unsigned int data_reg , u32 * vals , unsigned int nregs , unsigned int start_idx ) { while ( nregs -- ) { t3_write_reg ( adap , addr_reg , start_idx ) ; * vals ++ = t3_read_reg ( adap , data_reg ) ; start_idx ++ ; } }
t3_read_indirect - read indirectly addressed registers
      @adap: the adapter
      @addr_reg: register holding the indirect address
      @data_reg: register holding the value of the indirect register
      @vals: where the read register values are stored
      @start_idx: index of first indirect register to read
      @nregs: how many indirect registers to read
t3_read_indirect - read indirectly addressed registers @adap : the adapter @addr_reg : register holding the indirect address @data_reg : register holding the value of the indirect register @vals : where the read register values are stored @start_idx : index of first indirect register to read @nregs : how many indirect registers to read