]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cnic: Convert ctx_flags to bit fields
authorMichael Chan <mchan@broadcom.com>
Wed, 13 Oct 2010 14:06:45 +0000 (14:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Oct 2010 17:45:53 +0000 (10:45 -0700)
so that we can additional bit definitions without requiring a spinlock.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cnic.c
drivers/net/cnic.h

index 0fab7203ffbd61a131929d18e82d85453a3f8e17..311b2e6620d6104b4b51aee62d567ad358cf2316 100644 (file)
@@ -1721,7 +1721,7 @@ static int cnic_bnx2x_iscsi_destroy(struct cnic_dev *dev, struct kwqe *kwqe)
        struct kcqe *cqes[1];
        u32 hw_cid, type;
 
-       if (!(ctx->ctx_flags & CTX_FL_OFFLD_START))
+       if (!test_bit(CTX_FL_OFFLD_START, &ctx->ctx_flags))
                goto skip_cfc_delete;
 
        while (!time_after(jiffies, ctx->timestamp + (2 * HZ)))
@@ -1943,7 +1943,7 @@ static int cnic_bnx2x_connect(struct cnic_dev *dev, struct kwqe *wqes[],
        ret = cnic_submit_kwqe_16(dev, L5CM_RAMROD_CMD_ID_TCP_CONNECT,
                        kwqe1->cid, ISCSI_CONNECTION_TYPE, &l5_data);
        if (!ret)
-               ctx->ctx_flags |= CTX_FL_OFFLD_START;
+               set_bit(CTX_FL_OFFLD_START, &ctx->ctx_flags);
 
        return ret;
 }
index 676d008509c69b5b4dccff4a3d96ea7bb763f6bb..9907cc24807aa18cee66b68f519b42487afecc0a 100644 (file)
@@ -168,8 +168,8 @@ struct cnic_context {
        wait_queue_head_t       waitq;
        int                     wait_cond;
        unsigned long           timestamp;
-       u32                     ctx_flags;
-#define        CTX_FL_OFFLD_START      0x00000001
+       unsigned long           ctx_flags;
+#define        CTX_FL_OFFLD_START      0
        u8                      ulp_proto_id;
        union {
                struct cnic_iscsi       *iscsi;