|  | @@ -216,3 +216,133 @@ marvel_print_po7_uncrr_sym(u64 uncrr_sym, u64 valid_mask)
 | 
	
		
			
				|  |  |  		       err_print_prefix);
 | 
	
		
			
				|  |  |  	if (uncrr_sym & IO7__PO7_UNCRR_SYM__CDT_OVF_TO__NBK) 
 | 
	
		
			
				|  |  |  		printk("%s       NBK Credit Timeout or Overflow\n",
 | 
	
		
			
				|  |  | +		       err_print_prefix);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__READIO) 
 | 
	
		
			
				|  |  | +		printk("%s       Read I/O Buffer Overflow\n", 
 | 
	
		
			
				|  |  | +		       err_print_prefix);
 | 
	
		
			
				|  |  | +	if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__WRITEIO) 
 | 
	
		
			
				|  |  | +		printk("%s       Write I/O Buffer Overflow\n", 
 | 
	
		
			
				|  |  | +		       err_print_prefix);
 | 
	
		
			
				|  |  | +	if (uncrr_sym & IO7__PO7_UNCRR_SYM__OVF__FWD) 
 | 
	
		
			
				|  |  | +		printk("%s       FWD Buffer Overflow\n", 
 | 
	
		
			
				|  |  | +		       err_print_prefix);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if ((scratch = EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__VICTIM_SP))) {
 | 
	
		
			
				|  |  | +		int lost = scratch & (1UL << 4);
 | 
	
		
			
				|  |  | +		scratch &= ~lost;
 | 
	
		
			
				|  |  | +		for (i = 0; i < 8; i++, scratch >>= 1) {
 | 
	
		
			
				|  |  | +			if (!(scratch & 1))
 | 
	
		
			
				|  |  | +				continue;
 | 
	
		
			
				|  |  | +			printk("%s        Error Response sent to %s",
 | 
	
		
			
				|  |  | +			       err_print_prefix, port_names[i]);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if (lost)
 | 
	
		
			
				|  |  | +			printk("%s        Lost Error sent somewhere else\n",
 | 
	
		
			
				|  |  | +			       err_print_prefix);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	if ((scratch = EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__DETECT_SP))) {
 | 
	
		
			
				|  |  | +		for (i = 0; i < 8; i++, scratch >>= 1) {
 | 
	
		
			
				|  |  | +			if (!(scratch & 1))
 | 
	
		
			
				|  |  | +				continue;
 | 
	
		
			
				|  |  | +			printk("%s        Error Reported by %s",
 | 
	
		
			
				|  |  | +			       err_print_prefix, port_names[i]);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (EXTRACT(valid_mask, IO7__PO7_UNCRR_SYM__STRV_VTR)) {
 | 
	
		
			
				|  |  | +		char starvation_message[80];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		scratch = EXTRACT(uncrr_sym, IO7__PO7_UNCRR_SYM__STRV_VTR);
 | 
	
		
			
				|  |  | +		if (scratch & IO7__STRV_VTR__IS_MSI) 
 | 
	
		
			
				|  |  | +			sprintf(starvation_message, 
 | 
	
		
			
				|  |  | +				"MSI Interrupt 0x%x",
 | 
	
		
			
				|  |  | +				EXTRACT(scratch, IO7__STRV_VTR__MSI__INTNUM));
 | 
	
		
			
				|  |  | +		else
 | 
	
		
			
				|  |  | +			sprintf(starvation_message,
 | 
	
		
			
				|  |  | +				"LSI INT%c for Bus:Slot (%d:%d)\n",
 | 
	
		
			
				|  |  | +				'A' + EXTRACT(scratch, 
 | 
	
		
			
				|  |  | +					      IO7__STRV_VTR__LSI__INTX),
 | 
	
		
			
				|  |  | +				EXTRACT(scratch, IO7__STRV_VTR__LSI__BUS),
 | 
	
		
			
				|  |  | +				EXTRACT(scratch, IO7__STRV_VTR__LSI__SLOT));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		printk("%s        Starvation Int Trigger By: %s\n",
 | 
	
		
			
				|  |  | +		       err_print_prefix, starvation_message);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static void
 | 
	
		
			
				|  |  | +marvel_print_po7_ugbge_sym(u64 ugbge_sym)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	char opcode_str[10];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__S	(6)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_PKT_OFF__M	(0xfffffffful)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_OPCODE__S	(40)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_OPCODE__M	(0xff)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_SRC_PORT__S	(48)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_SRC_PORT__M	(0xf)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_DEST_PID__S	(52)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__UPH_DEST_PID__M	(0x7ff)
 | 
	
		
			
				|  |  | +#define IO7__PO7_UGBGE_SYM__VALID		(1UL << 63)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (!(ugbge_sym & IO7__PO7_UGBGE_SYM__VALID))
 | 
	
		
			
				|  |  | +		return;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	switch(EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE)) {
 | 
	
		
			
				|  |  | +	case 0x51:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "Wr32");
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	case 0x50:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "WrQW");
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	case 0x54:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "WrIPR");
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	case 0xD8:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "Victim");
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	case 0xC5:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "BlkIO");
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	default:
 | 
	
		
			
				|  |  | +		sprintf(opcode_str, "0x%llx\n",
 | 
	
		
			
				|  |  | +			EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE));
 | 
	
		
			
				|  |  | +		break;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	printk("%s      Up Hose Garbage Symptom:\n"
 | 
	
		
			
				|  |  | +	       "%s        Source Port: %lld - Dest PID: %lld - OpCode: %s\n",
 | 
	
		
			
				|  |  | +	       err_print_prefix,
 | 
	
		
			
				|  |  | +	       err_print_prefix, 
 | 
	
		
			
				|  |  | +	       EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_SRC_PORT),
 | 
	
		
			
				|  |  | +	       EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_DEST_PID),
 | 
	
		
			
				|  |  | +	       opcode_str);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (0xC5 != EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_OPCODE))
 | 
	
		
			
				|  |  | +		printk("%s        Packet Offset 0x%08llx\n",
 | 
	
		
			
				|  |  | +		       err_print_prefix,
 | 
	
		
			
				|  |  | +		       EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_PKT_OFF));
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static void
 | 
	
		
			
				|  |  | +marvel_print_po7_err_sum(struct ev7_pal_io_subpacket *io)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	u64	uncrr_sym_valid = 0;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_SBE		(1UL << 32)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_SBE2	(1UL << 33)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_PIO_WBYTE	(1UL << 34)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_CSR_NXM	(1UL << 35)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_RPID_ACV	(1UL << 36)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_RSP_NXM	(1UL << 37)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_ERR_RESP	(1UL << 38)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_CLK_DERR	(1UL << 39)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_DAT_DBE	(1UL << 40)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__CR_DAT_GRBG	(1UL << 41)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__MAF_TO		(1UL << 42)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__UGBGE		(1UL << 43)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__UN_MAF_LOST	(1UL << 44)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__UN_PKT_OVF	(1UL << 45)
 | 
	
		
			
				|  |  | +#define IO7__PO7_ERRSUM__UN_CDT_OVF	(1UL << 46)
 |