aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2014-10-30 09:46:55 -0400
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:32:02 -0500
commit205619f2f82434aebc5eb21c97fe22eb7b393293 (patch)
tree9a46520d1c8b0088cf994462dd42a218dd39ca64 /drivers/infiniband
parent394c595ee8c3256db7200a3dedbf2d1811ca0b40 (diff)
IB/srp: Remove stale connection retry mechanism
Attempting to connect three times may be insufficient after an initiator system tries to relogin, especially if the relogin attempt occurs before the SRP target service ID has been registered. Since the srp_daemon retries a failed login attempt anyway, remove the stale connection retry mechanism. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 819ebc9e7c8b..e07a04a91273 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -904,7 +904,6 @@ static void srp_rport_delete(struct srp_rport *rport)
904 904
905static int srp_connect_target(struct srp_target_port *target) 905static int srp_connect_target(struct srp_target_port *target)
906{ 906{
907 int retries = 3;
908 int ret; 907 int ret;
909 908
910 WARN_ON_ONCE(target->connected); 909 WARN_ON_ONCE(target->connected);
@@ -945,19 +944,10 @@ static int srp_connect_target(struct srp_target_port *target)
945 break; 944 break;
946 945
947 case SRP_STALE_CONN: 946 case SRP_STALE_CONN:
948 /* Our current CM id was stale, and is now in timewait.
949 * Try to reconnect with a new one.
950 */
951 if (!retries-- || srp_new_cm_id(target)) {
952 shost_printk(KERN_ERR, target->scsi_host, PFX
953 "giving up on stale connection\n");
954 target->status = -ECONNRESET;
955 return target->status;
956 }
957
958 shost_printk(KERN_ERR, target->scsi_host, PFX 947 shost_printk(KERN_ERR, target->scsi_host, PFX
959 "retrying stale connection\n"); 948 "giving up on stale connection\n");
960 break; 949 target->status = -ECONNRESET;
950 return target->status;
961 951
962 default: 952 default:
963 return target->status; 953 return target->status;