|
@@ -868,3 +868,22 @@ error:
|
|
|
beiscsi_cmd_q_destroy(ctrl, NULL, QTYPE_SGL);
|
|
|
return status;
|
|
|
}
|
|
|
+
|
|
|
+int beiscsi_cmd_reset_function(struct beiscsi_hba *phba)
|
|
|
+{
|
|
|
+ struct be_ctrl_info *ctrl = &phba->ctrl;
|
|
|
+ struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem);
|
|
|
+ struct be_post_sgl_pages_req *req = embedded_payload(wrb);
|
|
|
+ int status;
|
|
|
+
|
|
|
+ spin_lock(&ctrl->mbox_lock);
|
|
|
+
|
|
|
+ req = embedded_payload(wrb);
|
|
|
+ be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);
|
|
|
+ be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
|
|
|
+ OPCODE_COMMON_FUNCTION_RESET, sizeof(*req));
|
|
|
+ status = be_mbox_notify_wait(phba);
|
|
|
+
|
|
|
+ spin_unlock(&ctrl->mbox_lock);
|
|
|
+ return status;
|
|
|
+}
|