2 #include "qed_dev_api.h"
6 int qed_selftest_memory(struct qed_dev *cdev)
10 for_each_hwfn(cdev, i) {
11 rc = qed_sp_heartbeat_ramrod(&cdev->hwfns[i]);
19 int qed_selftest_interrupt(struct qed_dev *cdev)
23 for_each_hwfn(cdev, i) {
24 rc = qed_sp_heartbeat_ramrod(&cdev->hwfns[i]);
32 int qed_selftest_register(struct qed_dev *cdev)
34 struct qed_hwfn *p_hwfn;
35 struct qed_ptt *p_ptt;
38 /* although performed by MCP, this test is per engine */
39 for_each_hwfn(cdev, i) {
40 p_hwfn = &cdev->hwfns[i];
41 p_ptt = qed_ptt_acquire(p_hwfn);
43 DP_ERR(p_hwfn, "failed to acquire ptt\n");
46 rc = qed_mcp_bist_register_test(p_hwfn, p_ptt);
47 qed_ptt_release(p_hwfn, p_ptt);
55 int qed_selftest_clock(struct qed_dev *cdev)
57 struct qed_hwfn *p_hwfn;
58 struct qed_ptt *p_ptt;
61 /* although performed by MCP, this test is per engine */
62 for_each_hwfn(cdev, i) {
63 p_hwfn = &cdev->hwfns[i];
64 p_ptt = qed_ptt_acquire(p_hwfn);
66 DP_ERR(p_hwfn, "failed to acquire ptt\n");
69 rc = qed_mcp_bist_clock_test(p_hwfn, p_ptt);
70 qed_ptt_release(p_hwfn, p_ptt);