Skip to content

Commit a0c25d6

Browse files
Merge patch series "scsi: documentation: clean up docs and fix kernel-doc"
Randy Dunlap <[email protected]> says: Clean up some SCSI doc files and fix kernel-doc in 6 header files in include/scsi/. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
2 parents eab302e + a2530eb commit a0c25d6

File tree

8 files changed

+47
-35
lines changed

8 files changed

+47
-35
lines changed

Documentation/driver-api/scsi.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ Although the old parallel (fast/wide/ultra) SCSI bus has largely fallen
2020
out of use, the SCSI command set is more widely used than ever to
2121
communicate with devices over a number of different busses.
2222

23-
The `SCSI protocol <http://www.t10.org/scsi-3.htm>`__ is a big-endian
23+
The `SCSI protocol <https://www.t10.org/scsi-3.htm>`__ is a big-endian
2424
peer-to-peer packet based protocol. SCSI commands are 6, 10, 12, or 16
2525
bytes long, often followed by an associated data payload.
2626

2727
SCSI commands can be transported over just about any kind of bus, and
2828
are the default protocol for storage devices attached to USB, SATA, SAS,
2929
Fibre Channel, FireWire, and ATAPI devices. SCSI packets are also
3030
commonly exchanged over Infiniband,
31-
`I2O <http://i2o.shadowconnect.com/faq.php>`__, TCP/IP
32-
(`iSCSI <https://en.wikipedia.org/wiki/ISCSI>`__), even `Parallel
31+
TCP/IP (`iSCSI <https://en.wikipedia.org/wiki/ISCSI>`__), even `Parallel
3332
ports <http://cyberelk.net/tim/parport/parscsi.html>`__.
3433

3534
Design of the Linux SCSI subsystem
@@ -170,9 +169,9 @@ drivers/scsi/scsi_netlink.c
170169

171170
Infrastructure to provide async events from transports to userspace via
172171
netlink, using a single NETLINK_SCSITRANSPORT protocol for all
173-
transports. See `the original patch
174-
submission <http://marc.info/?l=linux-scsi&m=115507374832500&w=2>`__ for
175-
more details.
172+
transports. See `the original patch submission
173+
<https://lore.kernel.org/linux-scsi/[email protected]/>`__
174+
for more details.
176175

177176
.. kernel-doc:: drivers/scsi/scsi_netlink.c
178177
:internal:
@@ -328,11 +327,11 @@ the ordinary is seen.
328327
To be more realistic, the simulated devices have the transport
329328
attributes of SAS disks.
330329

331-
For documentation see http://sg.danny.cz/sg/sdebug26.html
330+
For documentation see http://sg.danny.cz/sg/scsi_debug.html
332331

333332
todo
334333
~~~~
335334

336335
Parallel (fast/wide/ultra) SCSI, USB, SATA, SAS, Fibre Channel,
337-
FireWire, ATAPI devices, Infiniband, I2O, Parallel ports,
336+
FireWire, ATAPI devices, Infiniband, Parallel ports,
338337
netlink...

Documentation/scsi/scsi_mid_low_api.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ This version of the document roughly matches linux kernel version 2.6.8 .
4242
Documentation
4343
=============
4444
There is a SCSI documentation directory within the kernel source tree,
45-
typically Documentation/scsi . Most documents are in plain
46-
(i.e. ASCII) text. This file is named scsi_mid_low_api.txt and can be
45+
typically Documentation/scsi . Most documents are in reStructuredText
46+
format. This file is named scsi_mid_low_api.rst and can be
4747
found in that directory. A more recent copy of this document may be found
48-
at http://web.archive.org/web/20070107183357rn_1/sg.torque.net/scsi/.
49-
Many LLDs are documented there (e.g. aic7xxx.txt). The SCSI mid-level is
50-
briefly described in scsi.txt which contains a url to a document
51-
describing the SCSI subsystem in the lk 2.4 series. Two upper level
52-
drivers have documents in that directory: st.txt (SCSI tape driver) and
53-
scsi-generic.txt (for the sg driver).
54-
55-
Some documentation (or urls) for LLDs may be found in the C source code
56-
or in the same directory as the C source code. For example to find a url
48+
at https://docs.kernel.org/scsi/scsi_mid_low_api.html. Many LLDs are
49+
documented in Documentation/scsi (e.g. aic7xxx.rst). The SCSI mid-level is
50+
briefly described in scsi.rst which contains a URL to a document describing
51+
the SCSI subsystem in the Linux Kernel 2.4 series. Two upper level
52+
drivers have documents in that directory: st.rst (SCSI tape driver) and
53+
scsi-generic.rst (for the sg driver).
54+
55+
Some documentation (or URLs) for LLDs may be found in the C source code
56+
or in the same directory as the C source code. For example to find a URL
5757
about the USB mass storage driver see the
5858
/usr/src/linux/drivers/usb/storage directory.
5959

include/scsi/iser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct iser_cm_hdr {
6363
* @rsvd: reserved
6464
* @write_stag: write rkey
6565
* @write_va: write virtual address
66-
* @reaf_stag: read rkey
66+
* @read_stag: read rkey
6767
* @read_va: read virtual address
6868
*/
6969
struct iser_ctrl {

include/scsi/libfcoe.h

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ struct fcoe_ctlr {
157157

158158
/**
159159
* fcoe_ctlr_priv() - Return the private data from a fcoe_ctlr
160-
* @cltr: The fcoe_ctlr whose private data will be returned
160+
* @ctlr: The fcoe_ctlr whose private data will be returned
161+
*
162+
* Returns: pointer to the private data
161163
*/
162164
static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr)
163165
{
@@ -174,7 +176,6 @@ static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr)
174176
* struct fcoe_fcf - Fibre-Channel Forwarder
175177
* @list: list linkage
176178
* @event_work: Work for FC Transport actions queue
177-
* @event: The event to be processed
178179
* @fip: The controller that the FCF was discovered on
179180
* @fcf_dev: The associated fcoe_fcf_device instance
180181
* @time: system time (jiffies) when an advertisement was last received
@@ -188,6 +189,7 @@ static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr)
188189
* @flogi_sent: current FLOGI sent to this FCF
189190
* @flags: flags received from advertisement
190191
* @fka_period: keep-alive period, in jiffies
192+
* @fd_flags: no need for FKA from ENode
191193
*
192194
* A Fibre-Channel Forwarder (FCF) is the entity on the Ethernet that
193195
* passes FCoE frames on to an FC fabric. This structure represents
@@ -222,6 +224,7 @@ struct fcoe_fcf {
222224

223225
/**
224226
* struct fcoe_rport - VN2VN remote port
227+
* @rdata: libfc remote port private data
225228
* @time: time of create or last beacon packet received from node
226229
* @fcoe_len: max FCoE frame size, not including VLAN or Ethernet headers
227230
* @flags: flags from probe or claim
@@ -266,8 +269,10 @@ void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *);
266269
void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev);
267270

268271
/**
269-
* is_fip_mode() - returns true if FIP mode selected.
272+
* is_fip_mode() - test if FIP mode selected.
270273
* @fip: FCoE controller.
274+
*
275+
* Returns: %true if FIP mode is selected
271276
*/
272277
static inline bool is_fip_mode(struct fcoe_ctlr *fip)
273278
{
@@ -318,9 +323,10 @@ struct fcoe_transport {
318323
* @kthread: The thread context (used by bnx2fc)
319324
* @work: The work item (used by fcoe)
320325
* @fcoe_rx_list: The queue of pending packets to process
321-
* @page: The memory page for calculating frame trailer CRCs
326+
* @crc_eof_page: The memory page for calculating frame trailer CRCs
322327
* @crc_eof_offset: The offset into the CRC page pointing to available
323328
* memory for a new trailer
329+
* @lock: local lock for members of this struct
324330
*/
325331
struct fcoe_percpu_s {
326332
struct task_struct *kthread;
@@ -343,7 +349,8 @@ struct fcoe_percpu_s {
343349
* @timer: The queue timer
344350
* @destroy_work: Handle for work context
345351
* (to prevent RTNL deadlocks)
346-
* @data_srt_addr: Source address for data
352+
* @data_src_addr: Source address for data
353+
* @get_netdev: function that returns a &net_device from @lport
347354
*
348355
* An instance of this structure is to be allocated along with the
349356
* Scsi_Host and libfc fc_lport structures.
@@ -364,6 +371,8 @@ struct fcoe_port {
364371
/**
365372
* fcoe_get_netdev() - Return the net device associated with a local port
366373
* @lport: The local port to get the net device from
374+
*
375+
* Returns: the &net_device associated with this @lport
367376
*/
368377
static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport)
369378
{
@@ -383,8 +392,10 @@ void fcoe_fcf_get_selected(struct fcoe_fcf_device *);
383392
void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *);
384393

385394
/**
386-
* struct netdev_list
387-
* A mapping from netdevice to fcoe_transport
395+
* struct fcoe_netdev_mapping - A mapping from &net_device to &fcoe_transport
396+
* @list: list linkage of the mappings
397+
* @netdev: the &net_device
398+
* @ft: the fcoe_transport associated with @netdev
388399
*/
389400
struct fcoe_netdev_mapping {
390401
struct list_head list;

include/scsi/scsi.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static inline int scsi_is_wlun(u64 lun)
6969
* @status: the status passed up from the driver (including host and
7070
* driver components)
7171
*
72-
* This returns true if the status code is SAM_STAT_CHECK_CONDITION.
72+
* Returns: %true if the status code is SAM_STAT_CHECK_CONDITION.
7373
*/
7474
static inline int scsi_status_is_check_condition(int status)
7575
{
@@ -189,12 +189,13 @@ enum scsi_disposition {
189189
/* Used to obtain the PCI location of a device */
190190
#define SCSI_IOCTL_GET_PCI 0x5387
191191

192-
/** scsi_status_is_good - check the status return.
192+
/**
193+
* scsi_status_is_good - check the status return.
193194
*
194195
* @status: the status passed up from the driver (including host and
195196
* driver components)
196197
*
197-
* This returns true for known good conditions that may be treated as
198+
* Returns: %true for known good conditions that may be treated as
198199
* command completed normally
199200
*/
200201
static inline bool scsi_status_is_good(int status)

include/scsi/scsi_cmnd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ static inline u8 get_host_byte(struct scsi_cmnd *cmd)
353353

354354
/**
355355
* scsi_msg_to_host_byte() - translate message byte
356+
* @cmd: the SCSI command
357+
* @msg: the SCSI parallel message byte to translate
356358
*
357359
* Translate the SCSI parallel message byte to a matching
358360
* host byte setting. A message of COMMAND_COMPLETE indicates

include/scsi/scsi_transport_fc.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,9 @@ struct fc_function_template {
770770
/**
771771
* fc_remote_port_chkready - called to validate the remote port state
772772
* prior to initiating io to the port.
773-
*
774-
* Returns a scsi result code that can be returned by the LLDD.
775-
*
776773
* @rport: remote port to be checked
774+
*
775+
* Returns: a scsi result code that can be returned by the LLDD.
777776
**/
778777
static inline int
779778
fc_remote_port_chkready(struct fc_rport *rport)

include/scsi/scsi_transport_srp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct srp_rport {
7474
};
7575

7676
/**
77-
* struct srp_function_template
77+
* struct srp_function_template - template for SRP initiator drivers
7878
*
7979
* Fields that are only relevant for SRP initiator drivers:
8080
* @has_rport_state: Whether or not to create the state, fast_io_fail_tmo and
@@ -124,7 +124,7 @@ enum scsi_timeout_action srp_timed_out(struct scsi_cmnd *scmd);
124124
* srp_chkready() - evaluate the transport layer state before I/O
125125
* @rport: SRP target port pointer.
126126
*
127-
* Returns a SCSI result code that can be returned by the LLD queuecommand()
127+
* Returns: a SCSI result code that can be returned by the LLD queuecommand()
128128
* implementation. The role of this function is similar to that of
129129
* fc_remote_port_chkready().
130130
*/

0 commit comments

Comments
 (0)