netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/4] cnic: Return error code in cnic_cm_close() if unsuccessful.
@ 2010-06-15 18:57 Michael Chan
  2010-06-15 18:57 ` [PATCH net-next 2/4] cnic: Refactor code in cnic_cm_process_kcqe() Michael Chan
  2010-06-15 21:24 ` [PATCH net-next 1/4] cnic: Return error code in cnic_cm_close() if unsuccessful David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Chan @ 2010-06-15 18:57 UTC (permalink / raw)
  To: davem; +Cc: netdev

So that bnx2i can handle the error condition immediately and not have to
wait for timeout.

Signed-off-by: Michael Chan <mchan@broadcom.com.
Signed-off-by: Eddie Wai <waie@broadcom.com>
---
 drivers/net/cnic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 908d89a..b20e11c 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -3026,6 +3026,8 @@ static int cnic_cm_close(struct cnic_sock *csk)
 	if (cnic_close_prep(csk)) {
 		csk->state = L4_KCQE_OPCODE_VALUE_CLOSE_COMP;
 		return cnic_cm_close_req(csk);
+	} else {
+		return -EALREADY;
 	}
 	return 0;
 }
-- 
1.6.4.GIT



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-06-15 21:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 18:57 [PATCH net-next 1/4] cnic: Return error code in cnic_cm_close() if unsuccessful Michael Chan
2010-06-15 18:57 ` [PATCH net-next 2/4] cnic: Refactor code in cnic_cm_process_kcqe() Michael Chan
2010-06-15 18:57   ` [PATCH net-next 3/4] cnic: Refactor and fix cnic_ready_to_close() Michael Chan
2010-06-15 18:57     ` [PATCH net-next 4/4] cnic: Fix cnic_cm_abort() error handling Michael Chan
2010-06-15 21:24       ` David Miller
2010-06-15 21:24     ` [PATCH net-next 3/4] cnic: Refactor and fix cnic_ready_to_close() David Miller
2010-06-15 21:24   ` [PATCH net-next 2/4] cnic: Refactor code in cnic_cm_process_kcqe() David Miller
2010-06-15 21:24 ` [PATCH net-next 1/4] cnic: Return error code in cnic_cm_close() if unsuccessful David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).