aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/qib/qib.h3
-rw-r--r--drivers/infiniband/hw/qib/qib_tx.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h
index 3593983df7ba..e67dba40d52e 100644
--- a/drivers/infiniband/hw/qib/qib.h
+++ b/drivers/infiniband/hw/qib/qib.h
@@ -326,6 +326,9 @@ struct qib_verbs_txreq {
326 326
327#define QIB_DEFAULT_MTU 4096 327#define QIB_DEFAULT_MTU 4096
328 328
329/* max number of IB ports supported per HCA */
330#define QIB_MAX_IB_PORTS 2
331
329/* 332/*
330 * Possible IB config parameters for f_get/set_ib_table() 333 * Possible IB config parameters for f_get/set_ib_table()
331 */ 334 */
diff --git a/drivers/infiniband/hw/qib/qib_tx.c b/drivers/infiniband/hw/qib/qib_tx.c
index af30232b6831..7f36454c225e 100644
--- a/drivers/infiniband/hw/qib/qib_tx.c
+++ b/drivers/infiniband/hw/qib/qib_tx.c
@@ -170,7 +170,7 @@ static int find_ctxt(struct qib_devdata *dd, unsigned bufn)
170void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask, 170void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
171 unsigned cnt) 171 unsigned cnt)
172{ 172{
173 struct qib_pportdata *ppd, *pppd[dd->num_pports]; 173 struct qib_pportdata *ppd, *pppd[QIB_MAX_IB_PORTS];
174 unsigned i; 174 unsigned i;
175 unsigned long flags; 175 unsigned long flags;
176 176