Skip to content

Commit d2f4084

Browse files
rddunlapmartinkpetersen
authored andcommitted
scsi: scsi_scan: Add kernel-doc for exported function
Add kernel-doc for scsi_add_device() since it is exported. This allows it to be part of the SCSI driver-api docbook. Signed-off-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] CC: James E.J. Bottomley <[email protected]> CC: Martin K. Petersen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 39d2112 commit d2f4084

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/scsi/scsi_scan.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,24 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
16341634
}
16351635
EXPORT_SYMBOL(__scsi_add_device);
16361636

1637+
/**
1638+
* scsi_add_device - creates a new SCSI (LU) instance
1639+
* @host: the &Scsi_Host instance where the device is located
1640+
* @channel: target channel number (rarely other than %0)
1641+
* @target: target id number
1642+
* @lun: LUN of target device
1643+
*
1644+
* Probe for a specific LUN and add it if found.
1645+
*
1646+
* Notes: This call is usually performed internally during a SCSI
1647+
* bus scan when an HBA is added (i.e. scsi_scan_host()). So it
1648+
* should only be called if the HBA becomes aware of a new SCSI
1649+
* device (LU) after scsi_scan_host() has completed. If successful
1650+
* this call can lead to sdev_init() and sdev_configure() callbacks
1651+
* into the LLD.
1652+
*
1653+
* Return: %0 on success or negative error code on failure
1654+
*/
16371655
int scsi_add_device(struct Scsi_Host *host, uint channel,
16381656
uint target, u64 lun)
16391657
{
@@ -2025,6 +2043,8 @@ static void do_scan_async(void *_data, async_cookie_t c)
20252043
/**
20262044
* scsi_scan_host - scan the given adapter
20272045
* @shost: adapter to scan
2046+
*
2047+
* Notes: Should be called after scsi_add_host()
20282048
**/
20292049
void scsi_scan_host(struct Scsi_Host *shost)
20302050
{

0 commit comments

Comments
 (0)