diff options
author | Scott Wood <scottwood@freescale.com> | 2013-05-20 18:39:02 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-05-20 18:39:02 (GMT) |
commit | b08bbdbf93d9862b77d41560c1447f37c3954930 (patch) | |
tree | 1defef32b478eead9fbcfc4646900a4122a86172 /drivers/infiniband | |
parent | 84df6e416de47ccca8845e584ef3683ad068b790 (diff) | |
parent | dbf932a9b316d5b29b3e220e5a30e7a165ad2992 (diff) | |
download | linux-fsl-qoriq-b08bbdbf93d9862b77d41560c1447f37c3954930.tar.xz |
Merge tag 'v3.8.13'
This is the 3.8.13 stable release
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 05bfe53..892cd87 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -100,6 +100,16 @@ static int alloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) return 0; } +static int alloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq, int user) +{ + int ret = -ENOSYS; + if (user) + ret = alloc_oc_sq(rdev, sq); + if (ret) + ret = alloc_host_sq(rdev, sq); + return ret; +} + static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, struct c4iw_dev_ucontext *uctx) { @@ -168,18 +178,9 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, goto free_sw_rq; } - if (user) { - ret = alloc_oc_sq(rdev, &wq->sq); - if (ret) - goto free_hwaddr; - - ret = alloc_host_sq(rdev, &wq->sq); - if (ret) - goto free_sq; - } else - ret = alloc_host_sq(rdev, &wq->sq); - if (ret) - goto free_hwaddr; + ret = alloc_sq(rdev, &wq->sq, user); + if (ret) + goto free_hwaddr; memset(wq->sq.queue, 0, wq->sq.memsize); dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); |