aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-05-18 07:24:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-21 13:10:05 -0400
commitb14524edc36d494d75c760743cc9435ef4c12a2f (patch)
tree13081d05fe69267e67b2186027efaebf361cc428 /drivers/infiniband
parentc1ab680046ba170050e91ec49577699de1a24e1a (diff)
IB/srp: Fix reconnection failure handling
commit a44074f14ba1ea0747ea737026eb929b81993dc3 upstream. Although it is possible to let SRP I/O continue if a reconnect results in a reduction of the number of channels, the current code does not handle this scenario correctly. Instead of making the reconnect code more complex, consider this as a reconnection failure. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index c418d1fde1ed..75c01b27bd0b 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1243,11 +1243,8 @@ static int srp_rport_reconnect(struct srp_rport *rport)
1243 1243
1244 for (i = 0; i < target->ch_count; i++) { 1244 for (i = 0; i < target->ch_count; i++) {
1245 ch = &target->ch[i]; 1245 ch = &target->ch[i];
1246 if (ret || !ch->target) { 1246 if (ret || !ch->target)
1247 if (i > 1)
1248 ret = 0;
1249 break; 1247 break;
1250 }
1251 ret = srp_connect_ch(ch, multich); 1248 ret = srp_connect_ch(ch, multich);
1252 multich = true; 1249 multich = true;
1253 } 1250 }