Re: [PATCH] iwch_create_cq off by one error



Acked-by: Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx>


Jon Mason wrote:
The cxbg3 driver is unnecessarily decreasing the number of cq entries
by one when creating a cq. This will cause an error of not having as
many cqs as requested by the user, if the user requests a power of 2
cq length.

Thanks,
Jon

Signed-off-by: Jon Mason <jon@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index f0c7775..800ef6d 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -188,7 +188,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve
return ERR_PTR(-ENOMEM);
}
chp->rhp = rhp;
- chp->ibcq.cqe = (1 << chp->cq.size_log2) - 1;
+ chp->ibcq.cqe = 1 << chp->cq.size_log2;
spin_lock_init(&chp->lock);
atomic_set(&chp->refcnt, 1);
init_waitqueue_head(&chp->wait);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: FAQ/FAQ notes site makeover
    ... The maintainer's task would be very greatly simplified thereby, because the number of requests would be greatly reduced thereby. ... A FAQ maintainer must be selected as one of sufficient experience and judgement to be able to tell when there is, or will be, a general consensus among the /cognoscenti/ in favour of a particular change. ... The article may have become inadequate because of changed browser circumstances, or may always have been inadequate; the article may be inadequately written, or the user may just be obtuse. ...
    (comp.lang.javascript)
  • Re: LanMan98 and Windows XP
    ... Dave Higton wrote: ... of networking. ... Where's the FAQ and who maintains it? ... requests from this computer, ...
    (comp.sys.acorn.networking)
  • Re: How do I make an Image visible?
    ... required until the FAQ maintainer eventually removes the recommendation from ... One of the three people you refer to has also said that in the lack of a better book that it was recommended not as a "good book" but as the "least bad book". ... The requests for changes where the changes were given, rather than alluded to, were changed. ...
    (comp.lang.javascript)
  • Re: Web site not available
    ... ASP.NET will detect its presence and any requests for any/all ... asp.net faq: http://asp.net.do/faq/ ... I have a site created by asp net, due to the weekend construction, this ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: I have Solutions - Statistical Inference Casella & Berger
    ... Anna Maria wrote: ... I am looking for The solutions to Casella Berger Statistical Inference. ... These requests have REALLY slowed down since I stated posting ... "Answers to FAQ on Casella & Berger Solutions Manual". ...
    (sci.stat.math)