Skip to content

Commit c6503be

Browse files
aloktiwamartinkpetersen
authored andcommitted
scsi: fc_transport: docs: Add documentation for FC Remote Ports
This patch updates the scsi_fc_transport.rst documentation by replacing the outdated << To Be Supplied >> placeholder under the "FC Remote Ports (rports)" section with a detailed explanation of remote port functionality in the Fibre Channel (FC) transport class. The new documentation covers: - What rports are and their role in FC-based SCSI communication - Their representation in sysfs (/sys/class/fc_remote_ports/) - Common sysfs attributes such as (port_id, port_name, node_name, and port_state). - Their typical lifecycle (creation and removal) - Guidance for driver developers on using fc_remote_port_add() and fc_remote_port_delete() This change improves the completeness and usefulness of the FC transport documentation for developers and users interacting with Fibre Channel drivers in the Linux SCSI subsystem Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://lore.kernel.org/r/20250607162304.1765430-1-alok.a.tiwari@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 8b0b146 commit c6503be

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

Documentation/scsi/scsi_fc_transport.rst

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,40 @@ This file is found at Documentation/scsi/scsi_fc_transport.rst
3030

3131
FC Remote Ports (rports)
3232
========================
33-
<< To Be Supplied >>
33+
34+
In the Fibre Channel (FC) subsystem, a remote port (rport) refers to a
35+
remote Fibre Channel node that the local port can communicate with.
36+
These are typically storage targets (e.g., arrays, tapes) that respond
37+
to SCSI commands over FC transport.
38+
39+
In Linux, rports are managed by the FC transport class and are
40+
represented in sysfs under:
41+
42+
/sys/class/fc_remote_ports/
43+
44+
Each rport directory contains attributes describing the remote port,
45+
such as port ID, node name, port state, and link speed.
46+
47+
rports are typically created by the FC transport when a new device is
48+
discovered during a fabric login or scan, and they persist until the
49+
device is removed or the link is lost.
50+
51+
Common attributes:
52+
- node_name: World Wide Node Name (WWNN).
53+
- port_name: World Wide Port Name (WWPN).
54+
- port_id: FC address of the remote port.
55+
- roles: Indicates if the port is an initiator, target, or both.
56+
- port_state: Shows the current operational state.
57+
58+
After discovering a remote port, the driver typically populates a
59+
fc_rport_identifiers structure and invokes fc_remote_port_add() to
60+
create and register the remote port with the SCSI subsystem via the
61+
Fibre Channel (FC) transport class.
62+
63+
rports are also visible via sysfs as children of the FC host adapter.
64+
65+
For developers: use fc_remote_port_add() and fc_remote_port_delete() when
66+
implementing a driver that interacts with the FC transport class.
3467

3568

3669
FC Virtual Ports (vports)

0 commit comments

Comments
 (0)