Message ID | 20101025143859.GA8420@mtldesk30 (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c index 7cd34e9..24bf440 100644 --- a/drivers/net/mlx4/cq.c +++ b/drivers/net/mlx4/cq.c @@ -149,6 +149,13 @@ int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq, cq_context = mailbox->buf; memset(cq_context, 0, sizeof *cq_context); + + if (count | period) { + if (!count) + count = 0xffff; + else if (!period) + period = 0xffff; + } cq_context->cq_max_count = cpu_to_be16(count); cq_context->cq_period = cpu_to_be16(period);