]> err.no Git - linux-2.6/commitdiff
RDMA/cxgb3: Fix the T3A workaround checks
authorSteve Wise <swise@opengridcomputing.com>
Thu, 24 Jan 2008 22:30:16 +0000 (16:30 -0600)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:17:47 +0000 (14:17 -0800)
Correctly work around T3A issues by checking "hwtype != T3A" instead of
"hwtype == T3B".  This will be needed for new hardware types.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/iwch_cm.c
drivers/infiniband/hw/cxgb3/iwch_provider.c

index 26b8c0e1cfd7cee9bce7fc2f7fc7f77ddcc80536..03c5ff62889a25c60b01e54afcefc44f89c503de 100644 (file)
@@ -179,7 +179,7 @@ int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq)
        setup.size = 1UL << cq->size_log2;
        setup.credits = 65535;
        setup.credit_thres = 1;
-       if (rdev_p->t3cdev_p->type == T3B)
+       if (rdev_p->t3cdev_p->type != T3A)
                setup.ovfl_mode = 0;
        else
                setup.ovfl_mode = 1;
index 20ba372dd182268bb5614c8c62f4dd9992445fb3..f8cb0fe748c37d61f798076c465b062c3e05e73b 100644 (file)
@@ -1118,7 +1118,7 @@ static int act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
             status2errno(rpl->status));
        connect_reply_upcall(ep, status2errno(rpl->status));
        state_set(&ep->com, DEAD);
-       if (ep->com.tdev->type == T3B && act_open_has_tid(rpl->status))
+       if (ep->com.tdev->type != T3A && act_open_has_tid(rpl->status))
                release_tid(ep->com.tdev, GET_TID(rpl), NULL);
        cxgb3_free_atid(ep->com.tdev, ep->atid);
        dst_release(ep->dst);
@@ -1249,7 +1249,7 @@ static void reject_cr(struct t3cdev *tdev, u32 hwtid, __be32 peer_ip,
        skb_trim(skb, sizeof(struct cpl_tid_release));
        skb_get(skb);
 
-       if (tdev->type == T3B)
+       if (tdev->type != T3A)
                release_tid(tdev, hwtid, skb);
        else {
                struct cpl_pass_accept_rpl *rpl;
index 69b1204e05f05b6c672a0bfb0fbc3d6f56fa74bb..df1838f8f94d9b59b700fa1212fb622b5f1e3811 100644 (file)
@@ -646,7 +646,7 @@ static struct ib_mr *iwch_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
        if (err)
                goto err;
 
-       if (udata && t3b_device(rhp)) {
+       if (udata && !t3a_device(rhp)) {
                uresp.pbl_addr = (mhp->attr.pbl_addr -
                                 rhp->rdev.rnic_info.pbl_base) >> 3;
                PDBG("%s user resp pbl_addr 0x%x\n", __FUNCTION__,