Commit 9919d5bd authored by Vipul Pandya's avatar Vipul Pandya Committed by David S. Miller

RDMA/cxgb4: Fix onchip queue support for T5

T5 adapter does not support onchip queue memory. Present logic fails to
allocate QP for T5 and returns an error. Also, if module parameter ocqp_support
is zero then we are unable to allocate QP which should not be the case. Ideally
if ocqp_support parameter is 0 or onchip queue support is disable then host QP
should be allocated before returning an error.
Signed-off-by: default avatarVipul Pandya <vipul@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b174d94
...@@ -140,7 +140,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, ...@@ -140,7 +140,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
int wr_len; int wr_len;
struct c4iw_wr_wait wr_wait; struct c4iw_wr_wait wr_wait;
struct sk_buff *skb; struct sk_buff *skb;
int ret; int ret = 0;
int eqsize; int eqsize;
wq->sq.qid = c4iw_get_qpid(rdev, uctx); wq->sq.qid = c4iw_get_qpid(rdev, uctx);
...@@ -180,17 +180,14 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, ...@@ -180,17 +180,14 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
} }
if (user) { if (user) {
ret = alloc_oc_sq(rdev, &wq->sq); if (alloc_oc_sq(rdev, &wq->sq) && alloc_host_sq(rdev, &wq->sq))
if (ret)
goto free_hwaddr; goto free_hwaddr;
} else {
ret = alloc_host_sq(rdev, &wq->sq);
if (ret)
goto free_sq;
} else
ret = alloc_host_sq(rdev, &wq->sq); ret = alloc_host_sq(rdev, &wq->sq);
if (ret) if (ret)
goto free_hwaddr; goto free_hwaddr;
}
memset(wq->sq.queue, 0, wq->sq.memsize); memset(wq->sq.queue, 0, wq->sq.memsize);
dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment