diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/t4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index c0221eec881..16f26ab2930 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h +++ b/drivers/infiniband/hw/cxgb4/t4.h | |||
@@ -62,6 +62,10 @@ struct t4_status_page { | |||
62 | __be16 pidx; | 62 | __be16 pidx; |
63 | u8 qp_err; /* flit 1 - sw owns */ | 63 | u8 qp_err; /* flit 1 - sw owns */ |
64 | u8 db_off; | 64 | u8 db_off; |
65 | u8 pad; | ||
66 | u16 host_wq_pidx; | ||
67 | u16 host_cidx; | ||
68 | u16 host_pidx; | ||
65 | }; | 69 | }; |
66 | 70 | ||
67 | #define T4_EQ_ENTRY_SIZE 64 | 71 | #define T4_EQ_ENTRY_SIZE 64 |
@@ -375,6 +379,16 @@ static inline void t4_rq_consume(struct t4_wq *wq) | |||
375 | wq->rq.cidx = 0; | 379 | wq->rq.cidx = 0; |
376 | } | 380 | } |
377 | 381 | ||
382 | static inline u16 t4_rq_host_wq_pidx(struct t4_wq *wq) | ||
383 | { | ||
384 | return wq->rq.queue[wq->rq.size].status.host_wq_pidx; | ||
385 | } | ||
386 | |||
387 | static inline u16 t4_rq_wq_size(struct t4_wq *wq) | ||
388 | { | ||
389 | return wq->rq.size * T4_RQ_NUM_SLOTS; | ||
390 | } | ||
391 | |||
378 | static inline int t4_sq_onchip(struct t4_sq *sq) | 392 | static inline int t4_sq_onchip(struct t4_sq *sq) |
379 | { | 393 | { |
380 | return sq->flags & T4_SQ_ONCHIP; | 394 | return sq->flags & T4_SQ_ONCHIP; |
@@ -412,6 +426,16 @@ static inline void t4_sq_consume(struct t4_wq *wq) | |||
412 | wq->sq.cidx = 0; | 426 | wq->sq.cidx = 0; |
413 | } | 427 | } |
414 | 428 | ||
429 | static inline u16 t4_sq_host_wq_pidx(struct t4_wq *wq) | ||
430 | { | ||
431 | return wq->sq.queue[wq->sq.size].status.host_wq_pidx; | ||
432 | } | ||
433 | |||
434 | static inline u16 t4_sq_wq_size(struct t4_wq *wq) | ||
435 | { | ||
436 | return wq->sq.size * T4_SQ_NUM_SLOTS; | ||
437 | } | ||
438 | |||
415 | static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc) | 439 | static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc) |
416 | { | 440 | { |
417 | wmb(); | 441 | wmb(); |