Commit 205619f2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Christoph Hellwig

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: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 394c595e
...@@ -904,7 +904,6 @@ static void srp_rport_delete(struct srp_rport *rport) ...@@ -904,7 +904,6 @@ static void srp_rport_delete(struct srp_rport *rport)
static int srp_connect_target(struct srp_target_port *target) static int srp_connect_target(struct srp_target_port *target)
{ {
int retries = 3;
int ret; int ret;
WARN_ON_ONCE(target->connected); WARN_ON_ONCE(target->connected);
...@@ -945,19 +944,10 @@ static int srp_connect_target(struct srp_target_port *target) ...@@ -945,19 +944,10 @@ static int srp_connect_target(struct srp_target_port *target)
break; break;
case SRP_STALE_CONN: case SRP_STALE_CONN:
/* Our current CM id was stale, and is now in timewait.
* Try to reconnect with a new one.
*/
if (!retries-- || srp_new_cm_id(target)) {
shost_printk(KERN_ERR, target->scsi_host, PFX shost_printk(KERN_ERR, target->scsi_host, PFX
"giving up on stale connection\n"); "giving up on stale connection\n");
target->status = -ECONNRESET; target->status = -ECONNRESET;
return target->status; return target->status;
}
shost_printk(KERN_ERR, target->scsi_host, PFX
"retrying stale connection\n");
break;
default: default:
return target->status; return target->status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment