aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-11-03 14:30:39 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:40 -0500
commiteb44820c28bc9a042e1157b41c677018a8fdfc74 (patch)
treede027b3cd40533488805ef7ee8156f077cd2b7e5 /drivers/scsi/scsi_scan.c
parent3f48985823001c89c9bd5c5e57cc07530578dfcc (diff)
[SCSI] Add Documentation and integrate into docbook build
Add Documentation/DocBook/scsi_midlayer.tmpl, add to Makefile, and update lots of kerneldoc comments in drivers/scsi/*. Updated with comments from Stefan Richter, Stephen M. Cameron, James Bottomley and Randy Dunlap. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 40ea71cd2ca6..7e8b2045ccfa 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -221,6 +221,9 @@ static void scsi_unlock_floptical(struct scsi_device *sdev,
221 221
222/** 222/**
223 * scsi_alloc_sdev - allocate and setup a scsi_Device 223 * scsi_alloc_sdev - allocate and setup a scsi_Device
224 * @starget: which target to allocate a &scsi_device for
225 * @lun: which lun
226 * @hostdata: usually NULL and set by ->slave_alloc instead
224 * 227 *
225 * Description: 228 * Description:
226 * Allocate, initialize for io, and return a pointer to a scsi_Device. 229 * Allocate, initialize for io, and return a pointer to a scsi_Device.
@@ -472,7 +475,6 @@ static void scsi_target_reap_usercontext(struct work_struct *work)
472 475
473/** 476/**
474 * scsi_target_reap - check to see if target is in use and destroy if not 477 * scsi_target_reap - check to see if target is in use and destroy if not
475 *
476 * @starget: target to be checked 478 * @starget: target to be checked
477 * 479 *
478 * This is used after removing a LUN or doing a last put of the target 480 * This is used after removing a LUN or doing a last put of the target
@@ -928,8 +930,7 @@ static inline void scsi_destroy_sdev(struct scsi_device *sdev)
928 930
929#ifdef CONFIG_SCSI_LOGGING 931#ifdef CONFIG_SCSI_LOGGING
930/** 932/**
931 * scsi_inq_str - print INQUIRY data from min to max index, 933 * scsi_inq_str - print INQUIRY data from min to max index, strip trailing whitespace
932 * strip trailing whitespace
933 * @buf: Output buffer with at least end-first+1 bytes of space 934 * @buf: Output buffer with at least end-first+1 bytes of space
934 * @inq: Inquiry buffer (input) 935 * @inq: Inquiry buffer (input)
935 * @first: Offset of string into inq 936 * @first: Offset of string into inq
@@ -957,9 +958,10 @@ static unsigned char *scsi_inq_str(unsigned char *buf, unsigned char *inq,
957 * scsi_probe_and_add_lun - probe a LUN, if a LUN is found add it 958 * scsi_probe_and_add_lun - probe a LUN, if a LUN is found add it
958 * @starget: pointer to target device structure 959 * @starget: pointer to target device structure
959 * @lun: LUN of target device 960 * @lun: LUN of target device
960 * @sdevscan: probe the LUN corresponding to this scsi_device
961 * @sdevnew: store the value of any new scsi_device allocated
962 * @bflagsp: store bflags here if not NULL 961 * @bflagsp: store bflags here if not NULL
962 * @sdevp: probe the LUN corresponding to this scsi_device
963 * @rescan: if nonzero skip some code only needed on first scan
964 * @hostdata: passed to scsi_alloc_sdev()
963 * 965 *
964 * Description: 966 * Description:
965 * Call scsi_probe_lun, if a LUN with an attached device is found, 967 * Call scsi_probe_lun, if a LUN with an attached device is found,
@@ -1110,6 +1112,8 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
1110 * scsi_sequential_lun_scan - sequentially scan a SCSI target 1112 * scsi_sequential_lun_scan - sequentially scan a SCSI target
1111 * @starget: pointer to target structure to scan 1113 * @starget: pointer to target structure to scan
1112 * @bflags: black/white list flag for LUN 0 1114 * @bflags: black/white list flag for LUN 0
1115 * @scsi_level: Which version of the standard does this device adhere to
1116 * @rescan: passed to scsi_probe_add_lun()
1113 * 1117 *
1114 * Description: 1118 * Description:
1115 * Generally, scan from LUN 1 (LUN 0 is assumed to already have been 1119 * Generally, scan from LUN 1 (LUN 0 is assumed to already have been
@@ -1220,7 +1224,7 @@ EXPORT_SYMBOL(scsilun_to_int);
1220 1224
1221/** 1225/**
1222 * int_to_scsilun: reverts an int into a scsi_lun 1226 * int_to_scsilun: reverts an int into a scsi_lun
1223 * @int: integer to be reverted 1227 * @lun: integer to be reverted
1224 * @scsilun: struct scsi_lun to be set. 1228 * @scsilun: struct scsi_lun to be set.
1225 * 1229 *
1226 * Description: 1230 * Description:
@@ -1252,18 +1256,22 @@ EXPORT_SYMBOL(int_to_scsilun);
1252 1256
1253/** 1257/**
1254 * scsi_report_lun_scan - Scan using SCSI REPORT LUN results 1258 * scsi_report_lun_scan - Scan using SCSI REPORT LUN results
1255 * @sdevscan: scan the host, channel, and id of this scsi_device 1259 * @starget: which target
1260 * @bflags: Zero or a mix of BLIST_NOLUN, BLIST_REPORTLUN2, or BLIST_NOREPORTLUN
1261 * @rescan: nonzero if we can skip code only needed on first scan
1256 * 1262 *
1257 * Description: 1263 * Description:
1258 * If @sdevscan is for a SCSI-3 or up device, send a REPORT LUN 1264 * Fast scanning for modern (SCSI-3) devices by sending a REPORT LUN command.
1259 * command, and scan the resulting list of LUNs by calling 1265 * Scan the resulting list of LUNs by calling scsi_probe_and_add_lun.
1260 * scsi_probe_and_add_lun.
1261 * 1266 *
1262 * Modifies sdevscan->lun. 1267 * If BLINK_REPORTLUN2 is set, scan a target that supports more than 8
1268 * LUNs even if it's older than SCSI-3.
1269 * If BLIST_NOREPORTLUN is set, return 1 always.
1270 * If BLIST_NOLUN is set, return 0 always.
1263 * 1271 *
1264 * Return: 1272 * Return:
1265 * 0: scan completed (or no memory, so further scanning is futile) 1273 * 0: scan completed (or no memory, so further scanning is futile)
1266 * 1: no report lun scan, or not configured 1274 * 1: could not scan with REPORT LUN
1267 **/ 1275 **/
1268static int scsi_report_lun_scan(struct scsi_target *starget, int bflags, 1276static int scsi_report_lun_scan(struct scsi_target *starget, int bflags,
1269 int rescan) 1277 int rescan)