Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255469
b: refs/heads/master
c: 101c40c
h: refs/heads/master
i:
  255467: 800637a
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 9, 2011
1 parent 3d0d620 commit 20c72bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93736656138e6d2f39f19c1d68f9ef81cfc9dd66
refs/heads/master: 101c40c8cb0d10c30f423805f9f5b7a75956832d
14 changes: 11 additions & 3 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3767,7 +3767,13 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
break;

case L4_KCQE_OPCODE_VALUE_CLOSE_RECEIVED:
cnic_cm_upcall(cp, csk, opcode);
/* after we already sent CLOSE_REQ */
if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags) &&
!test_bit(SK_F_OFFLD_COMPLETE, &csk->flags) &&
csk->state == L4_KCQE_OPCODE_VALUE_CLOSE_COMP)
cp->close_conn(csk, L4_KCQE_OPCODE_VALUE_RESET_COMP);
else
cnic_cm_upcall(cp, csk, opcode);
break;
}
csk_put(csk);
Expand Down Expand Up @@ -3821,12 +3827,14 @@ static int cnic_ready_to_close(struct cnic_sock *csk, u32 opcode)
}

/* 1. If event opcode matches the expected event in csk->state
* 2. If the expected event is CLOSE_COMP, we accept any event
* 2. If the expected event is CLOSE_COMP or RESET_COMP, we accept any
* event
* 3. If the expected event is 0, meaning the connection was never
* never established, we accept the opcode from cm_abort.
*/
if (opcode == csk->state || csk->state == 0 ||
csk->state == L4_KCQE_OPCODE_VALUE_CLOSE_COMP) {
csk->state == L4_KCQE_OPCODE_VALUE_CLOSE_COMP ||
csk->state == L4_KCQE_OPCODE_VALUE_RESET_COMP) {
if (!test_and_set_bit(SK_F_CLOSING, &csk->flags)) {
if (csk->state == 0)
csk->state = opcode;
Expand Down

0 comments on commit 20c72bf

Please sign in to comment.