Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fc_remote_port_delete(9) [suse man page]

FC_REMOTE_PORT_DELET(9) 					  SCSI mid layer					   FC_REMOTE_PORT_DELET(9)

NAME
fc_remote_port_delete - notifies the fc transport that a remote port is no longer in existence. SYNOPSIS
void fc_remote_port_delete(struct fc_rport * rport); ARGUMENTS
rport The remote port that no longer exists DESCRIPTION
The LLDD calls this routine to notify the transport that a remote port is no longer part of the topology. Note: Although a port may no longer be part of the topology, it may persist in the remote ports displayed by the fc_host. We do this under 2 conditions: 1) If the port was a scsi target, we delay its deletion by "blocking" it. This allows the port to temporarily disappear, then reappear without disrupting the SCSI device tree attached to it. During the "blocked" period the port will still exist. 2) If the port was a scsi target and disappears for longer than we expect, we'll delete the port and the tear down the SCSI device tree attached to it. However, we want to semi-persist the target id assigned to that port if it eventually does exist. The port structure will remain (although with minimal information) so that the target id bindings remails. If the remote port is not an FCP Target, it will be fully torn down and deallocated, including the fc_remote_port class device. If the remote port is an FCP Target, the port will be placed in a temporary blocked state. From the LLDD's perspective, the rport no longer exists. From the SCSI midlayer's perspective, the SCSI target exists, but all sdevs on it are blocked from further I/O. The following is then expected. If the remote port does not return (signaled by a LLDD call to fc_remote_port_add) within the dev_loss_tmo timeout, then the scsi target is removed - killing all outstanding i/o and removing the scsi devices attached ot it. The port structure will be marked Not Present and be partially cleared, leaving only enough information to recognize the remote port relative to the scsi target id binding if it later appears. The port will remain as long as there is a valid binding (e.g. until the user changes the binding type or unloads the scsi host with the binding). If the remote port returns within the dev_loss_tmo value (and matches according to the target id binding type), the port structure will be reused. If it is no longer a SCSI target, the target will be torn down. If it continues to be a SCSI target, then the target will be unblocked (allowing i/o to be resumed), and a scan will be activated to ensure that all luns are detected. Called from normal process context only - cannot be called from interrupt. NOTES
This routine assumes no locks are held on entry. AUTHORS
James Bottomley <James.Bottomley@hansenpartnership.com> Author. Rob Landley <rob@landley.net> Author. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 FC_REMOTE_PORT_DELET(9)

Check Out this Related Man Page

scsi_transport(9F)                                         Kernel Functions for Drivers                                         scsi_transport(9F)

NAME
scsi_transport - request by a SCSI target driver to start a command SYNOPSIS
#include <sys/scsi/scsi.h> int scsi_transport(struct scsi_pkt *pkt); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
pkt Pointer to a scsi_pkt(9S) structure. DESCRIPTION
Target drivers use scsi_transport() to request the host adapter driver to transport a command to the SCSI target device specified by pkt. The target driver must obtain resources for the packet using scsi_init_pkt(9F) prior to calling this function. The packet may be initial- ized using one of the makecom(9F) functions. scsi_transport() does not wait for the SCSI command to complete. See scsi_poll(9F) for a description of polled SCSI commands. Upon completion of the SCSI command the host adapter calls the completion routine provided by the target driver in the pkt_comp member of the scsi_pkt pointed to by pkt. RETURN VALUES
scsi_transport() returns: TRAN_ACCEPT The packet was accepted by the transport layer. TRAN_BUSY The packet could not be accepted because there was already a packet in progress for this target/lun, the host adapter queue was full, or the target device queue was full. TRAN_BADPKT The DMA count in the packet exceeded the DMA engine's maximum DMA size. TRAN_FATAL_ERROR A fatal error has occurred in the transport layer. CONTEXT
scsi_transport() can be called from user or interrupt context. EXAMPLES
Example 1: Using scsi_transport() if ((status = scsi_transport(rqpkt)) != TRAN_ACCEPT) { scsi_log(devp, sd_label, CE_WARN, "transport of request sense pkt fails (0x%x) ", status); } SEE ALSO
tran_start(9E), makecom(9F), scsi_init_pkt(9F), scsi_pktalloc(9F), scsi_poll(9F), scsi_pkt(9S) Writing Device Drivers SunOS 5.10 30 Aug 1995 scsi_transport(9F)
Man Page