FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_read_rss - read the contents of the RSS tables
 *	@adapter: the adapter
 *	@lkup: holds the contents of the RSS lookup table
 *	@map: holds the contents of the RSS map table
 *
 *	Reads the contents of the receive packet steering tables.
 */
read the contents of the RSS tables
@adapter: the adapter
@lkup: holds the contents of the RSS lookup table
@map: holds the contents of the RSS map table

Reads the contents of the receive packet steering tables.
read the contents of the RSS tables @adapter : the adapter @lkup : holds the contents of the RSS lookup table @map : holds the contents of the RSS map table Reads the contents of the receive packet steering tables .
int t3_read_rss(adapter_t *adapter, u8 *lkup, u16 *map)
{
	int i;
	u32 val;
	if (lkup)
		for (i = 0; i < RSS_TABLE_SIZE; ++i) {
			t3_write_reg(adapter, A_TP_RSS_LKP_TABLE,
				     0xffff0000 | i);
			val = t3_read_reg(adapter, A_TP_RSS_LKP_TABLE);
			if (!(val & 0x80000000))
				return -EAGAIN;
			*lkup++ = (u8)val;
			*lkup++ = (u8)(val >> 8);
		}
	if (map)
		for (i = 0; i < RSS_TABLE_SIZE; ++i) {
			t3_write_reg(adapter, A_TP_RSS_MAP_TABLE,
				     0xffff0000 | i);
			val = t3_read_reg(adapter, A_TP_RSS_MAP_TABLE);
			if (!(val & 0x80000000))
				return -EAGAIN;
			*map++ = (u16)val;
		}
	return 0;
}
int t3_read_rss ( adapter_t * adapter , u8 * lkup , u16 * map ) { int i ; u32 val ; if ( lkup ) for ( i = 0 ; i < RSS_TABLE_SIZE ; ++ i ) { t3_write_reg ( adapter , A_TP_RSS_LKP_TABLE , 0xffff0000 | i ) ; val = t3_read_reg ( adapter , A_TP_RSS_LKP_TABLE ) ; if ( ! ( val & 0x80000000 ) ) return - EAGAIN ; * lkup ++ = ( u8 ) val ; * lkup ++ = ( u8 ) ( val >> 8 ) ; } if ( map ) for ( i = 0 ; i < RSS_TABLE_SIZE ; ++ i ) { t3_write_reg ( adapter , A_TP_RSS_MAP_TABLE , 0xffff0000 | i ) ; val = t3_read_reg ( adapter , A_TP_RSS_MAP_TABLE ) ; if ( ! ( val & 0x80000000 ) ) return - EAGAIN ; * map ++ = ( u16 ) val ; } return 0 ; }
t3_read_rss - read the contents of the RSS tables
      @adapter: the adapter
      @lkup: holds the contents of the RSS lookup table
      @map: holds the contents of the RSS map table
t3_read_rss - read the contents of the RSS tables @adapter : the adapter @lkup : holds the contents of the RSS lookup table @map : holds the contents of the RSS map table