diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:32:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:32:31 -0500 |
commit | e69381b4175ba162229646f6753ff1d87c24d468 (patch) | |
tree | ac4c03f6a0a1a0426832aa4f5c3b7732080c51cc /drivers/infiniband/hw/amso1100/c2_qp.c | |
parent | 238ccbb050a243e935bb3fc679c2e4bbff7004aa (diff) | |
parent | 14f369d1d61e7ac6578c54ca9ce3caaf4072412c (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (45 commits)
RDMA/cxgb3: Fix error paths in post_send and post_recv
RDMA/nes: Fix stale ARP issue
RDMA/nes: FIN during MPA startup causes timeout
RDMA/nes: Free kmap() resources
RDMA/nes: Check for zero STag
RDMA/nes: Fix Xansation test crash on cm_node ref_count
RDMA/nes: Abnormal listener exit causes loopback node crash
RDMA/nes: Fix crash in nes_accept()
RDMA/nes: Resource not freed for REJECTed connections
RDMA/nes: MPA request/response error checking
RDMA/nes: Fix query of ORD values
RDMA/nes: Fix MAX_CM_BUFFER define
RDMA/nes: Pass correct size to ioremap_nocache()
RDMA/nes: Update copyright and branding string
RDMA/nes: Add max_cqe check to nes_create_cq()
RDMA/nes: Clean up struct nes_qp
RDMA/nes: Implement IB_SIGNAL_ALL_WR as an iWARP extension
RDMA/nes: Add additional SFP+ PHY uC status check and PHY reset
RDMA/nes: Correct fast memory registration implementation
IB/ehca: Fix error paths in post_send and post_recv
...
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2_qp.c')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_qp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index a6d89440ad2c..ad518868df77 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
@@ -798,8 +798,10 @@ int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
798 | u8 actual_sge_count; | 798 | u8 actual_sge_count; |
799 | u32 msg_size; | 799 | u32 msg_size; |
800 | 800 | ||
801 | if (qp->state > IB_QPS_RTS) | 801 | if (qp->state > IB_QPS_RTS) { |
802 | return -EINVAL; | 802 | err = -EINVAL; |
803 | goto out; | ||
804 | } | ||
803 | 805 | ||
804 | while (ib_wr) { | 806 | while (ib_wr) { |
805 | 807 | ||
@@ -930,6 +932,7 @@ int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
930 | ib_wr = ib_wr->next; | 932 | ib_wr = ib_wr->next; |
931 | } | 933 | } |
932 | 934 | ||
935 | out: | ||
933 | if (err) | 936 | if (err) |
934 | *bad_wr = ib_wr; | 937 | *bad_wr = ib_wr; |
935 | return err; | 938 | return err; |
@@ -944,8 +947,10 @@ int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, | |||
944 | unsigned long lock_flags; | 947 | unsigned long lock_flags; |
945 | int err = 0; | 948 | int err = 0; |
946 | 949 | ||
947 | if (qp->state > IB_QPS_RTS) | 950 | if (qp->state > IB_QPS_RTS) { |
948 | return -EINVAL; | 951 | err = -EINVAL; |
952 | goto out; | ||
953 | } | ||
949 | 954 | ||
950 | /* | 955 | /* |
951 | * Try and post each work request | 956 | * Try and post each work request |
@@ -998,6 +1003,7 @@ int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, | |||
998 | ib_wr = ib_wr->next; | 1003 | ib_wr = ib_wr->next; |
999 | } | 1004 | } |
1000 | 1005 | ||
1006 | out: | ||
1001 | if (err) | 1007 | if (err) |
1002 | *bad_wr = ib_wr; | 1008 | *bad_wr = ib_wr; |
1003 | return err; | 1009 | return err; |