aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib.h')
-rw-r--r--drivers/infiniband/hw/qib/qib.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h
index 7e62f4137148..cbe577151457 100644
--- a/drivers/infiniband/hw/qib/qib.h
+++ b/drivers/infiniband/hw/qib/qib.h
@@ -1,8 +1,8 @@
1#ifndef _QIB_KERNEL_H 1#ifndef _QIB_KERNEL_H
2#define _QIB_KERNEL_H 2#define _QIB_KERNEL_H
3/* 3/*
4 * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation. 4 * Copyright (c) 2012 Intel Corporation. All rights reserved.
5 * All rights reserved. 5 * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved.
6 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 6 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
7 * 7 *
8 * This software is available to you under a choice of one of two 8 * This software is available to you under a choice of one of two
@@ -544,6 +544,7 @@ struct qib_pportdata {
544 544
545 /* read mostly */ 545 /* read mostly */
546 struct qib_sdma_desc *sdma_descq; 546 struct qib_sdma_desc *sdma_descq;
547 struct workqueue_struct *qib_wq;
547 struct qib_sdma_state sdma_state; 548 struct qib_sdma_state sdma_state;
548 dma_addr_t sdma_descq_phys; 549 dma_addr_t sdma_descq_phys;
549 volatile __le64 *sdma_head_dma; /* DMA'ed by chip */ 550 volatile __le64 *sdma_head_dma; /* DMA'ed by chip */
@@ -1267,6 +1268,11 @@ int qib_sdma_verbs_send(struct qib_pportdata *, struct qib_sge_state *,
1267/* ppd->sdma_lock should be locked before calling this. */ 1268/* ppd->sdma_lock should be locked before calling this. */
1268int qib_sdma_make_progress(struct qib_pportdata *dd); 1269int qib_sdma_make_progress(struct qib_pportdata *dd);
1269 1270
1271static inline int qib_sdma_empty(const struct qib_pportdata *ppd)
1272{
1273 return ppd->sdma_descq_added == ppd->sdma_descq_removed;
1274}
1275
1270/* must be called under qib_sdma_lock */ 1276/* must be called under qib_sdma_lock */
1271static inline u16 qib_sdma_descq_freecnt(const struct qib_pportdata *ppd) 1277static inline u16 qib_sdma_descq_freecnt(const struct qib_pportdata *ppd)
1272{ 1278{