cnic: Refactor and fix cnic_ready_to_close().
authorMichael Chan <mchan@broadcom.com>
Tue, 15 Jun 2010 08:57:02 +0000 (08:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jun 2010 21:23:37 +0000 (14:23 -0700)
commit943189f1d564e69201f7d71e77f5608a701e3e55
tree4fd0bf3864af8a117e0b99f31af17a4aa61b36a7
parenta1e621bf6d03621de207cd416f6a21969dd0601c
cnic: Refactor and fix cnic_ready_to_close().

Combine RESET_RECEIVED and RESET_COMP logic and fix race condition
between these 2 events and cnic_cm_close().  In particular, we need
to (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) before we
update csk->state.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <waie@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cnic.c