---
name: "srp_reconnect_rport"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/srp_reconnect_rport"
---

# srp\_reconnect\_rport(9)

reconnect to an SRP target port

## NAME

srp\_reconnect\_rport - reconnect to an SRP target port

## SYNOPSIS

**int srp\_reconnect\_rport(struct srp\_rport \*** *rport***);**

## ARGUMENTS

*rport*

SRP target port.

## DESCRIPTION

Blocks SCSI command queueing before invoking **reconnect** such that **queuecommand** won't be invoked concurrently with **reconnect** from outside the SCSI EH. This is important since a **reconnect** implementation may reallocate resources needed by **queuecommand**.

## NOTES

\- This function neither waits until outstanding requests have finished nor tries to abort these. It is the responsibility of the **reconnect** function to finish outstanding commands before reconnecting to the target port. - It is the responsibility of the caller to ensure that the resources reallocated by the **reconnect** function won't be used while this function is in progress. One possible strategy is to invoke this function from the context of the SCSI EH thread only. Another possible strategy is to lock the rport mutex inside each SCSI LLD callback that can be invoked by the SCSI EH (the scsi\_host\_template.eh\_\*() functions and also the scsi\_host\_template.**queuecommand** function).

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
