diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 18:29:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 18:29:48 -0400 |
commit | e0fd9affeb64088eff407dfc98bbd3a5c17ea479 (patch) | |
tree | 94ee7e3410fffb305aa6901053b85245686444a2 /drivers/infiniband/hw/cxgb4 | |
parent | 3d15b798eafd3b6b3cc25f20747008ab9401a57f (diff) | |
parent | ea9627c800e99a902e2668ac8e6377f02d6f720a (diff) |
Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull InfiniBand/RDMA changes from Roland Dreier:
- XRC transport fixes
- Fix DHCP on IPoIB
- mlx4 preparations for flow steering
- iSER fixes
- miscellaneous other fixes
* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (23 commits)
IB/iser: Add support for iser CM REQ additional info
IB/iser: Return error to upper layers on EAGAIN registration failures
IB/iser: Move informational messages from error to info level
IB/iser: Add module version
mlx4_core: Expose a few helpers to fill DMFS HW strucutures
mlx4_core: Directly expose fields of DMFS HW rule control segment
mlx4_core: Change a few DMFS fields names to match firmare spec
mlx4: Match DMFS promiscuous field names to firmware spec
mlx4_core: Move DMFS HW structs to common header file
IB/mlx4: Set link type for RAW PACKET QPs in the QP context
IB/mlx4: Disable VLAN stripping for RAW PACKET QPs
mlx4_core: Reduce warning message for SRQ_LIMIT event to debug level
RDMA/iwcm: Don't touch cmid after dropping reference
IB/qib: Correct qib_verbs_register_sysfs() error handling
IB/ipath: Correct ipath_verbs_register_sysfs() error handling
RDMA/cxgb4: Fix SQ allocation when on-chip SQ is disabled
SRPT: Fix odd use of WARN_ON()
IPoIB: Fix ipoib_hard_header() return value
RDMA: Rename random32() to prandom_u32()
RDMA/cxgb3: Fix uninitialized variable
...
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5b059e2d80cc..232040447e8a 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -111,6 +111,16 @@ static int alloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq) | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int alloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq, int user) | ||
115 | { | ||
116 | int ret = -ENOSYS; | ||
117 | if (user) | ||
118 | ret = alloc_oc_sq(rdev, sq); | ||
119 | if (ret) | ||
120 | ret = alloc_host_sq(rdev, sq); | ||
121 | return ret; | ||
122 | } | ||
123 | |||
114 | static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, | 124 | static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, |
115 | struct c4iw_dev_ucontext *uctx) | 125 | struct c4iw_dev_ucontext *uctx) |
116 | { | 126 | { |
@@ -179,15 +189,9 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, | |||
179 | goto free_sw_rq; | 189 | goto free_sw_rq; |
180 | } | 190 | } |
181 | 191 | ||
182 | if (user) { | 192 | ret = alloc_sq(rdev, &wq->sq, user); |
183 | if (alloc_oc_sq(rdev, &wq->sq) && alloc_host_sq(rdev, &wq->sq)) | 193 | if (ret) |
184 | goto free_hwaddr; | 194 | goto free_hwaddr; |
185 | } else { | ||
186 | ret = alloc_host_sq(rdev, &wq->sq); | ||
187 | if (ret) | ||
188 | goto free_hwaddr; | ||
189 | } | ||
190 | |||
191 | memset(wq->sq.queue, 0, wq->sq.memsize); | 195 | memset(wq->sq.queue, 0, wq->sq.memsize); |
192 | dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); | 196 | dma_unmap_addr_set(&wq->sq, mapping, wq->sq.dma_addr); |
193 | 197 | ||