Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-block.git] / include / linux / hisi_acc_qm.h
index be3aedaa96dc146e3f39b72f85a200f367625c25..a7d54d4d41fdb1df9f1e179a4a6ae41ac52b0044 100644 (file)
@@ -122,7 +122,6 @@ enum qp_state {
 };
 
 enum qm_hw_ver {
-       QM_HW_UNKNOWN = -1,
        QM_HW_V1 = 0x20,
        QM_HW_V2 = 0x21,
        QM_HW_V3 = 0x30,
@@ -272,6 +271,20 @@ struct hisi_qm_poll_data {
        u16 *qp_finish_id;
 };
 
+/**
+ * struct qm_err_isolate
+ * @isolate_lock: protects device error log
+ * @err_threshold: user config error threshold which triggers isolation
+ * @is_isolate: device isolation state
+ * @uacce_hw_errs: index into qm device error list
+ */
+struct qm_err_isolate {
+       struct mutex isolate_lock;
+       u32 err_threshold;
+       bool is_isolate;
+       struct list_head qm_hw_errs;
+};
+
 struct hisi_qm {
        enum qm_hw_ver ver;
        enum qm_fun_type fun_type;
@@ -309,7 +322,8 @@ struct hisi_qm {
        const struct hisi_qm_err_ini *err_ini;
        struct hisi_qm_err_info err_info;
        struct hisi_qm_err_status err_status;
-       unsigned long misc_ctl; /* driver removing and reset sched */
+       /* driver removing and reset sched */
+       unsigned long misc_ctl;
        /* Device capability bit */
        unsigned long caps;
 
@@ -332,7 +346,6 @@ struct hisi_qm {
 
        const char *algs;
        bool use_sva;
-       bool is_frozen;
 
        resource_size_t phys_base;
        resource_size_t db_phys_base;
@@ -341,6 +354,7 @@ struct hisi_qm {
        struct qm_shaper_factor *factor;
        u32 mb_qos;
        u32 type_rate;
+       struct qm_err_isolate isolate_data;
 };
 
 struct hisi_qp_status {