|  | @@ -48,6 +48,33 @@ FILE_LICENCE ( GPL2_OR_LATER );
 | 
		
	
		
			
			| 48 | 48 |   *    http://www.datasheetarchive.com/indexdl/Datasheet-028/DSA00494723.pdf
 | 
		
	
		
			
			| 49 | 49 |   */
 | 
		
	
		
			
			| 50 | 50 |  
 | 
		
	
		
			
			|  | 51 | +/******************************************************************************
 | 
		
	
		
			
			|  | 52 | + *
 | 
		
	
		
			
			|  | 53 | + * Debugging
 | 
		
	
		
			
			|  | 54 | + *
 | 
		
	
		
			
			|  | 55 | + ******************************************************************************
 | 
		
	
		
			
			|  | 56 | + */
 | 
		
	
		
			
			|  | 57 | +
 | 
		
	
		
			
			|  | 58 | +/**
 | 
		
	
		
			
			|  | 59 | + * Dump all registers (for debugging)
 | 
		
	
		
			
			|  | 60 | + *
 | 
		
	
		
			
			|  | 61 | + * @v rtl		Realtek device
 | 
		
	
		
			
			|  | 62 | + */
 | 
		
	
		
			
			|  | 63 | +static __attribute__ (( unused )) void realtek_dump ( struct realtek_nic *rtl ){
 | 
		
	
		
			
			|  | 64 | +	uint8_t regs[256];
 | 
		
	
		
			
			|  | 65 | +	unsigned int i;
 | 
		
	
		
			
			|  | 66 | +
 | 
		
	
		
			
			|  | 67 | +	/* Do nothing unless debug output is enabled */
 | 
		
	
		
			
			|  | 68 | +	if ( ! DBG_LOG )
 | 
		
	
		
			
			|  | 69 | +		return;
 | 
		
	
		
			
			|  | 70 | +
 | 
		
	
		
			
			|  | 71 | +	/* Dump registers (via byte accesses; may not work for all registers) */
 | 
		
	
		
			
			|  | 72 | +	for ( i = 0 ; i < sizeof ( regs ) ; i++ )
 | 
		
	
		
			
			|  | 73 | +		regs[i] = readb ( rtl->regs + i );
 | 
		
	
		
			
			|  | 74 | +	DBGC ( rtl, "REALTEK %p register dump:\n", rtl );
 | 
		
	
		
			
			|  | 75 | +	DBGC_HDA ( rtl, 0, regs, sizeof ( regs ) );
 | 
		
	
		
			
			|  | 76 | +}
 | 
		
	
		
			
			|  | 77 | +
 | 
		
	
		
			
			| 51 | 78 |  /******************************************************************************
 | 
		
	
		
			
			| 52 | 79 |   *
 | 
		
	
		
			
			| 53 | 80 |   * EEPROM interface
 |