提交 6e0dda0c 编写于 作者: M Michael Chan 提交者: David S. Miller

cnic: Convert ctx_flags to bit fields

so that we can additional bit definitions without requiring a spinlock.
Signed-off-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6e0dc643
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册