2 #include "qed_dev_api.h"
5 #include "qed_selftest.h"
7 int qed_selftest_memory(struct qed_dev *cdev)
11 for_each_hwfn(cdev, i) {
12 rc = qed_sp_heartbeat_ramrod(&cdev->hwfns[i]);
20 int qed_selftest_interrupt(struct qed_dev *cdev)
24 for_each_hwfn(cdev, i) {
25 rc = qed_sp_heartbeat_ramrod(&cdev->hwfns[i]);
33 int qed_selftest_register(struct qed_dev *cdev)
35 struct qed_hwfn *p_hwfn;
36 struct qed_ptt *p_ptt;
39 /* although performed by MCP, this test is per engine */
40 for_each_hwfn(cdev, i) {
41 p_hwfn = &cdev->hwfns[i];
42 p_ptt = qed_ptt_acquire(p_hwfn);
44 DP_ERR(p_hwfn, "failed to acquire ptt\n");
47 rc = qed_mcp_bist_register_test(p_hwfn, p_ptt);
48 qed_ptt_release(p_hwfn, p_ptt);
56 int qed_selftest_clock(struct qed_dev *cdev)
58 struct qed_hwfn *p_hwfn;
59 struct qed_ptt *p_ptt;
62 /* although performed by MCP, this test is per engine */
63 for_each_hwfn(cdev, i) {
64 p_hwfn = &cdev->hwfns[i];
65 p_ptt = qed_ptt_acquire(p_hwfn);
67 DP_ERR(p_hwfn, "failed to acquire ptt\n");
70 rc = qed_mcp_bist_clock_test(p_hwfn, p_ptt);
71 qed_ptt_release(p_hwfn, p_ptt);