FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_read_vpd - reads the stream of bytes containing a vpd structure
 *	@adapter: the adapter
 *	@vpd: contains a buffer that would hold the stream of bytes
 *
 *	Reads the vpd structure starting at vpd->offset into vpd->data,
 *	the length of the byte stream to read is vpd->len.
 */
reads the stream of bytes containing a vpd structure
@adapter: the adapter
@vpd: contains a buffer that would hold the stream of bytes

Reads the vpd structure starting at vpd->offset into vpd->data,
the length of the byte stream to read is vpd->len.
reads the stream of bytes containing a vpd structure @adapter : the adapter @vpd : contains a buffer that would hold the stream of bytes Reads the vpd structure starting at vpd - > offset into vpd - > data the length of the byte stream to read is vpd - > len .
int t3_read_vpd(adapter_t *adapter, struct generic_vpd *vpd)
{
	u32 i, ret;
	for (i = 0; i < vpd->len; i += 4) {
		ret = t3_seeprom_read(adapter, vpd->offset + i,
				      (u32 *) &(vpd->data[i]));
		if (ret)
			return ret;
	}
	return 0;
}
int t3_read_vpd ( adapter_t * adapter , struct generic_vpd * vpd ) { u32 i , ret ; for ( i = 0 ; i < vpd -> len ; i += 4 ) { ret = t3_seeprom_read ( adapter , vpd -> offset + i , ( u32 * ) & ( vpd -> data [ i ] ) ) ; if ( ret ) return ret ; } return 0 ; }
t3_read_vpd - reads the stream of bytes containing a vpd structure
      @adapter: the adapter
      @vpd: contains a buffer that would hold the stream of bytes
t3_read_vpd - reads the stream of bytes containing a vpd structure @adapter : the adapter @vpd : contains a buffer that would hold the stream of bytes