Commit c1e89ae4 authored by Tomer Tayar's avatar Tomer Tayar Committed by Oded Gabbay
Browse files

accel/habanalabs/gaudi2: check extended errors according to PCIe addr_dec interrupt info



The FW interrupt info for a PCIe addr_dec event is set correctly, so
check for either global errors or razwi according to the indications
there.

Signed-off-by: default avatarTomer Tayar <ttayar@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Reviewed-by: default avatarCarl Vanderlip <quic_carlv@quicinc.com>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 7159813c
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -8983,9 +8983,6 @@ static int gaudi2_print_pcie_addr_dec_info(struct hl_device *hdev, u16 event_typ
	u32 error_count = 0;
	int i;

	gaudi2_print_event(hdev, event_type, true,
		"intr_cause_data: %#llx", intr_cause_data);

	for (i = 0 ; i < GAUDI2_NUM_OF_PCIE_ADDR_DEC_ERR_CAUSE ; i++) {
		if (!(intr_cause_data & BIT_ULL(i)))
			continue;
@@ -8994,14 +8991,15 @@ static int gaudi2_print_pcie_addr_dec_info(struct hl_device *hdev, u16 event_typ
			"err cause: %s", gaudi2_pcie_addr_dec_error_cause[i]);
		error_count++;

		/*
		 * Always check for LBW and HBW additional info as the indication itself is
		 * sometimes missing
		 */
	}

		switch (intr_cause_data & BIT_ULL(i)) {
		case PCIE_WRAP_PCIE_IC_SEI_INTR_IND_AXI_LBW_ERR_INTR_MASK:
			hl_check_for_glbl_errors(hdev);
			break;
		case PCIE_WRAP_PCIE_IC_SEI_INTR_IND_BAD_ACCESS_INTR_MASK:
			gaudi2_print_pcie_mstr_rr_mstr_if_razwi_info(hdev, event_mask);
			break;
		}
	}

	return error_count;
}