diff options
author | Alexander Schmidt <alexs@linux.vnet.ibm.com> | 2008-09-20 23:05:21 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-09-20 23:05:21 -0400 |
commit | b9012e0a4255c93e1d81f1ccee591de6414b5955 (patch) | |
tree | f96df62a968eab98722256251914070fa7bb0c2c /drivers/infiniband/hw/ehca/ehca_classes.h | |
parent | 9824b8f11373b0df806c135a342da9319ef1d893 (diff) |
IB/ehca: Generate flush status CQ entries
When a QP goes into error state, it is required that CQ entries with a
flush error status are delivered to the application for any
outstanding work requests. eHCA does not do this in hardware, so this
patch adds software flush CQE generation to the ehca driver.
Whenever a QP gets into error state, it is added to the QP error list
of its respective CQ. If the error QP list of a CQ is not empty,
poll_cq() generates flush CQEs before polling the actual CQ.
Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_classes.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_classes.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 1ab919f836a8..5d7b7855afb9 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h | |||
@@ -164,6 +164,13 @@ struct ehca_qmap_entry { | |||
164 | u16 reported; | 164 | u16 reported; |
165 | }; | 165 | }; |
166 | 166 | ||
167 | struct ehca_queue_map { | ||
168 | struct ehca_qmap_entry *map; | ||
169 | unsigned int entries; | ||
170 | unsigned int tail; | ||
171 | unsigned int left_to_poll; | ||
172 | }; | ||
173 | |||
167 | struct ehca_qp { | 174 | struct ehca_qp { |
168 | union { | 175 | union { |
169 | struct ib_qp ib_qp; | 176 | struct ib_qp ib_qp; |
@@ -173,8 +180,9 @@ struct ehca_qp { | |||
173 | enum ehca_ext_qp_type ext_type; | 180 | enum ehca_ext_qp_type ext_type; |
174 | enum ib_qp_state state; | 181 | enum ib_qp_state state; |
175 | struct ipz_queue ipz_squeue; | 182 | struct ipz_queue ipz_squeue; |
176 | struct ehca_qmap_entry *sq_map; | 183 | struct ehca_queue_map sq_map; |
177 | struct ipz_queue ipz_rqueue; | 184 | struct ipz_queue ipz_rqueue; |
185 | struct ehca_queue_map rq_map; | ||
178 | struct h_galpas galpas; | 186 | struct h_galpas galpas; |
179 | u32 qkey; | 187 | u32 qkey; |
180 | u32 real_qp_num; | 188 | u32 real_qp_num; |
@@ -204,6 +212,8 @@ struct ehca_qp { | |||
204 | atomic_t nr_events; /* events seen */ | 212 | atomic_t nr_events; /* events seen */ |
205 | wait_queue_head_t wait_completion; | 213 | wait_queue_head_t wait_completion; |
206 | int mig_armed; | 214 | int mig_armed; |
215 | struct list_head sq_err_node; | ||
216 | struct list_head rq_err_node; | ||
207 | }; | 217 | }; |
208 | 218 | ||
209 | #define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ) | 219 | #define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ) |
@@ -233,6 +243,8 @@ struct ehca_cq { | |||
233 | /* mmap counter for resources mapped into user space */ | 243 | /* mmap counter for resources mapped into user space */ |
234 | u32 mm_count_queue; | 244 | u32 mm_count_queue; |
235 | u32 mm_count_galpa; | 245 | u32 mm_count_galpa; |
246 | struct list_head sqp_err_list; | ||
247 | struct list_head rqp_err_list; | ||
236 | }; | 248 | }; |
237 | 249 | ||
238 | enum ehca_mr_flag { | 250 | enum ehca_mr_flag { |