mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	Introduced igc_diag.c and igc_diag.h, these files have the diagnostics functionality of igc driver. For the time being these files are being used by ethtool self-test callbacks. Which mean that eeprom, registers and link self-tests for ethtool were implemented. Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com> Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			909 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			909 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0 */
 | 
						|
/* Copyright (c)  2020 Intel Corporation */
 | 
						|
 | 
						|
bool igc_reg_test(struct igc_adapter *adapter, u64 *data);
 | 
						|
bool igc_eeprom_test(struct igc_adapter *adapter, u64 *data);
 | 
						|
bool igc_link_test(struct igc_adapter *adapter, u64 *data);
 | 
						|
 | 
						|
struct igc_reg_test {
 | 
						|
	u16 reg;
 | 
						|
	u8 array_len;
 | 
						|
	u8 test_type;
 | 
						|
	u32 mask;
 | 
						|
	u32 write;
 | 
						|
};
 | 
						|
 | 
						|
/* In the hardware, registers are laid out either singly, in arrays
 | 
						|
 * spaced 0x40 bytes apart, or in contiguous tables.  We assume
 | 
						|
 * most tests take place on arrays or single registers (handled
 | 
						|
 * as a single-element array) and special-case the tables.
 | 
						|
 * Table tests are always pattern tests.
 | 
						|
 *
 | 
						|
 * We also make provision for some required setup steps by specifying
 | 
						|
 * registers to be written without any read-back testing.
 | 
						|
 */
 | 
						|
 | 
						|
#define PATTERN_TEST	1
 | 
						|
#define SET_READ_TEST	2
 | 
						|
#define TABLE32_TEST	3
 | 
						|
#define TABLE64_TEST_LO	4
 | 
						|
#define TABLE64_TEST_HI	5
 |