/* Clear session state */
srp->state = 0;
- /* Increment retry count */
- srp->retry_count++;
-
- /* If we have reached the retry limit, permanently abort the
- * session.
- */
+ /* If we have reached the retry limit, report the failure */
if ( srp->retry_count >= SRP_MAX_RETRIES ) {
- srp->instant_rc = rc;
srp_scsi_done ( srp, rc );
return;
}
- /* Otherwise, try to reopen the connection */
+ /* Otherwise, increment the retry count and try to reopen the
+ * connection
+ */
+ srp->retry_count++;
srp_login ( srp );
}
struct srp_device *srp =
container_of ( scsi->backend, struct srp_device, refcnt );
- /* Return instant failure, if we have already aborted the session */
- if ( srp->instant_rc )
- return srp->instant_rc;
-
/* Store SCSI command */
if ( srp->command ) {
DBGC ( srp, "SRP %p cannot handle concurrent SCSI commands\n",
unsigned int state;
/** Retry counter */
unsigned int retry_count;
- /** Instant return status code
- *
- * Used to avoid retrying the connection on every new SCSI
- * command after the retry count has been exceeded.
- */
- int instant_rc;
/** Current SCSI command */
struct scsi_command *command;