diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-10-30 22:16:56 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-10-30 22:16:56 +0200 |
commit | f1e095f1d206b81b44160f41278ce5c78641e9b7 (patch) | |
tree | bd293d46d2d3e4cdf435a22ddb2877c6ba1b8acc /drivers/infiniband/hw/cxgb3/cxio_wr.h | |
parent | telephony: fix return value (diff) | |
parent | Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify (diff) | |
download | linux-dev-f1e095f1d206b81b44160f41278ce5c78641e9b7.tar.xz linux-dev-f1e095f1d206b81b44160f41278ce5c78641e9b7.zip |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/cxio_wr.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/cxio_wr.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/cxio_wr.h b/drivers/infiniband/hw/cxgb3/cxio_wr.h index e5ddb63e7d23..4bb997aa39d0 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_wr.h +++ b/drivers/infiniband/hw/cxgb3/cxio_wr.h @@ -728,6 +728,22 @@ struct t3_cq { #define CQ_VLD_ENTRY(ptr,size_log2,cqe) (Q_GENBIT(ptr,size_log2) == \ CQE_GENBIT(*cqe)) +struct t3_cq_status_page { + u32 cq_err; +}; + +static inline int cxio_cq_in_error(struct t3_cq *cq) +{ + return ((struct t3_cq_status_page *) + &cq->queue[1 << cq->size_log2])->cq_err; +} + +static inline void cxio_set_cq_in_error(struct t3_cq *cq) +{ + ((struct t3_cq_status_page *) + &cq->queue[1 << cq->size_log2])->cq_err = 1; +} + static inline void cxio_set_wq_in_error(struct t3_wq *wq) { wq->queue->wq_in_err.err |= 1; |