Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202955
b: refs/heads/master
c: 943189f
h: refs/heads/master
i:
  202953: 010a69f
  202951: 0172125
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 15, 2010
1 parent 6e8295d commit 11d24e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: a1e621bf6d03621de207cd416f6a21969dd0601c
refs/heads/master: 943189f1d564e69201f7d71e77f5608a701e3e55
26 changes: 10 additions & 16 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3198,25 +3198,19 @@ static int cnic_cm_alloc_mem(struct cnic_dev *dev)

static int cnic_ready_to_close(struct cnic_sock *csk, u32 opcode)
{
if (opcode == L4_KCQE_OPCODE_VALUE_RESET_RECEIVED) {
if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags))
csk->state = opcode;
}
if ((opcode == csk->state) ||
(opcode == L4_KCQE_OPCODE_VALUE_RESET_RECEIVED &&
csk->state == L4_KCQE_OPCODE_VALUE_CLOSE_COMP)) {
if (!test_and_set_bit(SK_F_CLOSING, &csk->flags))
return 1;
if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) {
/* Unsolicited RESET_COMP or RESET_RECEIVED */
opcode = L4_KCQE_OPCODE_VALUE_RESET_RECEIVED;
csk->state = opcode;
}
/* 57710+ only workaround to handle unsolicited RESET_COMP
* which will be treated like a RESET RCVD notification
* which triggers the clean up procedure

/* 1. If event opcode matches the expected event in csk->state
* 2. If the expected event is CLOSE_COMP, we accept any event
*/
else if (opcode == L4_KCQE_OPCODE_VALUE_RESET_COMP) {
if (!test_and_set_bit(SK_F_CLOSING, &csk->flags)) {
csk->state = L4_KCQE_OPCODE_VALUE_RESET_RECEIVED;
if (opcode == csk->state ||
csk->state == L4_KCQE_OPCODE_VALUE_CLOSE_COMP) {
if (!test_and_set_bit(SK_F_CLOSING, &csk->flags))
return 1;
}
}
return 0;
}
Expand Down

0 comments on commit 11d24e3

Please sign in to comment.