diff options
author | Eddie Wai <waie@broadcom.com> | 2010-02-24 14:42:04 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:10:12 -0800 |
commit | a9736c086cc6221659e498f0855152c32dbc1396 (patch) | |
tree | 59a48584f0af70bdbb5b338ba3d47cf9ed230618 /drivers/net/cnic.c | |
parent | c85a26189660e1cfd1f50989468313c544487950 (diff) |
cnic: Finetune iSCSI connection set up.
Initialize IP ID and handle some additional connection errors.
Signed-off-by: Eddie Wai <waie@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 6aecef930fa..0fe83717967 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c @@ -2507,7 +2507,7 @@ static int cnic_cm_offload_pg(struct cnic_sock *csk) l4kwqe->sa5 = dev->mac_addr[5]; l4kwqe->etype = ETH_P_IP; - l4kwqe->ipid_count = DEF_IPID_COUNT; + l4kwqe->ipid_start = DEF_IPID_START; l4kwqe->host_opaque = csk->l5_cid; if (csk->vlan_id) { @@ -3046,6 +3046,14 @@ static void cnic_cm_process_offld_pg(struct cnic_dev *dev, struct l4_kcq *kcqe) clear_bit(SK_F_OFFLD_SCHED, &csk->flags); goto done; } + /* Possible PG kcqe status: SUCCESS, OFFLOADED_PG, or CTX_ALLOC_FAIL */ + if (kcqe->status == L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL) { + clear_bit(SK_F_OFFLD_SCHED, &csk->flags); + cnic_cm_upcall(cp, csk, + L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE); + goto done; + } + csk->pg_cid = kcqe->pg_cid; set_bit(SK_F_PG_OFFLD_COMPLETE, &csk->flags); cnic_cm_conn_req(csk); @@ -3083,6 +3091,13 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe) } switch (opcode) { + case L5CM_RAMROD_CMD_ID_TCP_CONNECT: + if (l4kcqe->status != 0) { + clear_bit(SK_F_OFFLD_SCHED, &csk->flags); + cnic_cm_upcall(cp, csk, + L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE); + } + break; case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE: if (l4kcqe->status == 0) set_bit(SK_F_OFFLD_COMPLETE, &csk->flags); |