diff options
author | Michael Chan <mchan@broadcom.com> | 2010-10-13 10:06:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-14 13:45:53 -0400 |
commit | 6e0dda0c467d6c66d64c146170ea35399ec34c15 (patch) | |
tree | e8416565ec89a1e805cb5357c812fd2845f4b1fc | |
parent | 6e0dc64384298b29ac17de7362b7d6d2ef588304 (diff) |
cnic: Convert ctx_flags to bit fields
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>
-rw-r--r-- | drivers/net/cnic.c | 4 | ||||
-rw-r--r-- | drivers/net/cnic.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 0fab7203ffbd..311b2e6620d6 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -1721,7 +1721,7 @@ static int cnic_bnx2x_iscsi_destroy(struct cnic_dev *dev, struct kwqe *kwqe) | |||
1721 | struct kcqe *cqes[1]; | 1721 | struct kcqe *cqes[1]; |
1722 | u32 hw_cid, type; | 1722 | u32 hw_cid, type; |
1723 | 1723 | ||
1724 | if (!(ctx->ctx_flags & CTX_FL_OFFLD_START)) | 1724 | if (!test_bit(CTX_FL_OFFLD_START, &ctx->ctx_flags)) |
1725 | goto skip_cfc_delete; | 1725 | goto skip_cfc_delete; |
1726 | 1726 | ||
1727 | while (!time_after(jiffies, ctx->timestamp + (2 * HZ))) | 1727 | while (!time_after(jiffies, ctx->timestamp + (2 * HZ))) |
@@ -1943,7 +1943,7 @@ static int cnic_bnx2x_connect(struct cnic_dev *dev, struct kwqe *wqes[], | |||
1943 | ret = cnic_submit_kwqe_16(dev, L5CM_RAMROD_CMD_ID_TCP_CONNECT, | 1943 | ret = cnic_submit_kwqe_16(dev, L5CM_RAMROD_CMD_ID_TCP_CONNECT, |
1944 | kwqe1->cid, ISCSI_CONNECTION_TYPE, &l5_data); | 1944 | kwqe1->cid, ISCSI_CONNECTION_TYPE, &l5_data); |
1945 | if (!ret) | 1945 | if (!ret) |
1946 | ctx->ctx_flags |= CTX_FL_OFFLD_START; | 1946 | set_bit(CTX_FL_OFFLD_START, &ctx->ctx_flags); |
1947 | 1947 | ||
1948 | return ret; | 1948 | return ret; |
1949 | } | 1949 | } |
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 676d008509c6..9907cc24807a 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h | |||
@@ -168,8 +168,8 @@ struct cnic_context { | |||
168 | wait_queue_head_t waitq; | 168 | wait_queue_head_t waitq; |
169 | int wait_cond; | 169 | int wait_cond; |
170 | unsigned long timestamp; | 170 | unsigned long timestamp; |
171 | u32 ctx_flags; | 171 | unsigned long ctx_flags; |
172 | #define CTX_FL_OFFLD_START 0x00000001 | 172 | #define CTX_FL_OFFLD_START 0 |
173 | u8 ulp_proto_id; | 173 | u8 ulp_proto_id; |
174 | union { | 174 | union { |
175 | struct cnic_iscsi *iscsi; | 175 | struct cnic_iscsi *iscsi; |