IB/srp: Suppress superfluous error messages

Keep track of the connection state.  Only report QP errors while
connected.  Only invoke ib_send_cm_dreq() when connected so that
invoking srp_disconnect_target() after having received a DREQ does not
cause an error message to be printed.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Bart Van Assche
2011-12-25 12:18:12 +00:00
committed by Roland Dreier
parent 4f0af69799
commit 294c875a65
2 changed files with 31 additions and 8 deletions

View File

@@ -163,6 +163,7 @@ struct srp_target_port {
int path_query_id;
u32 rq_tmo_jiffies;
bool connected;
struct ib_cm_id *cm_id;