1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 3. SCSI mid layer</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="SCSI Interfaces Guide"><link rel="up" href="index.html" title="SCSI Interfaces Guide"><link rel="prev" href="ch.html" title="ch (SCSI Media Changer)"><link rel="next" href="API-shost-for-each-device.html" title="shost_for_each_device"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. SCSI mid layer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="API-shost-for-each-device.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="mid_layer"></a>Chapter 3. SCSI mid layer</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="mid_layer.html#midlayer_implementation">SCSI midlayer implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="mid_layer.html#scsi_device.h">include/scsi/scsi_device.h</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi.c">drivers/scsi/scsi.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsicam.c">drivers/scsi/scsicam.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_error.c">drivers/scsi/scsi_error.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_devinfo.c">drivers/scsi/scsi_devinfo.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_ioctl.c">drivers/scsi/scsi_ioctl.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_lib.c">drivers/scsi/scsi_lib.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_lib_dma.c">drivers/scsi/scsi_lib_dma.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_module.c">drivers/scsi/scsi_module.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_proc.c">drivers/scsi/scsi_proc.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_netlink.c">drivers/scsi/scsi_netlink.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_scan.c">drivers/scsi/scsi_scan.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_sysctl.c">drivers/scsi/scsi_sysctl.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_sysfs.c">drivers/scsi/scsi_sysfs.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#hosts.c">drivers/scsi/hosts.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#constants.c">drivers/scsi/constants.c</a></span></dt></dl></dd><dt><span class="sect1"><a href="Transport_classes.html">Transport classes</a></span></dt><dd><dl><dt><span class="sect2"><a href="Transport_classes.html#Fibre_Channel_transport">Fibre Channel transport</a></span></dt><dt><span class="sect2"><a href="Transport_classes.html#iSCSI_transport">iSCSI transport class</a></span></dt><dt><span class="sect2"><a href="Transport_classes.html#SAS_transport">Serial Attached SCSI (SAS) transport class</a></span></dt><dt><span class="sect2"><a href="Transport_classes.html#SATA_transport">SATA transport class</a></span></dt><dt><span class="sect2"><a href="Transport_classes.html#SPI_transport">Parallel SCSI (SPI) transport class</a></span></dt><dt><span class="sect2"><a href="Transport_classes.html#SRP_transport">SCSI RDMA (SRP) transport class</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="midlayer_implementation"></a>SCSI midlayer implementation</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="mid_layer.html#scsi_device.h">include/scsi/scsi_device.h</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi.c">drivers/scsi/scsi.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsicam.c">drivers/scsi/scsicam.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_error.c">drivers/scsi/scsi_error.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_devinfo.c">drivers/scsi/scsi_devinfo.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_ioctl.c">drivers/scsi/scsi_ioctl.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_lib.c">drivers/scsi/scsi_lib.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_lib_dma.c">drivers/scsi/scsi_lib_dma.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_module.c">drivers/scsi/scsi_module.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_proc.c">drivers/scsi/scsi_proc.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_netlink.c">drivers/scsi/scsi_netlink.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_scan.c">drivers/scsi/scsi_scan.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_sysctl.c">drivers/scsi/scsi_sysctl.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#scsi_sysfs.c">drivers/scsi/scsi_sysfs.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#hosts.c">drivers/scsi/hosts.c</a></span></dt><dt><span class="sect2"><a href="mid_layer.html#constants.c">drivers/scsi/constants.c</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_device.h"></a>include/scsi/scsi_device.h</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-shost-for-each-device.html"><span class="phrase">shost_for_each_device</span></a></span><span class="refpurpose"> — 
2  iterate over all devices of a host
3 </span></dt><dt><span class="refentrytitle"><a href="API---shost-for-each-device.html"><span class="phrase">__shost_for_each_device</span></a></span><span class="refpurpose"> — 
4     iterate over all devices of a host (UNLOCKED)
5 </span></dt></dl></div><p>
6        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi.c"></a>drivers/scsi/scsi.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-cmd-get-serial.html"><span class="phrase">scsi_cmd_get_serial</span></a></span><span class="refpurpose"> — 
7  Assign a serial number to a command
8 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-change-queue-depth.html"><span class="phrase">scsi_change_queue_depth</span></a></span><span class="refpurpose"> — 
9     change a device's queue depth
10 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-track-queue-full.html"><span class="phrase">scsi_track_queue_full</span></a></span><span class="refpurpose"> — 
11     track QUEUE_FULL events to adjust queue depth
12 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-get-vpd-page.html"><span class="phrase">scsi_get_vpd_page</span></a></span><span class="refpurpose"> — 
13     Get Vital Product Data from a SCSI device
14 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-report-opcode.html"><span class="phrase">scsi_report_opcode</span></a></span><span class="refpurpose"> — 
15     Find out if a given command opcode is supported
16 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-get.html"><span class="phrase">scsi_device_get</span></a></span><span class="refpurpose"> — 
17     get an additional reference to a scsi_device
18 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-put.html"><span class="phrase">scsi_device_put</span></a></span><span class="refpurpose"> — 
19     release a reference to a scsi_device
20 </span></dt><dt><span class="refentrytitle"><a href="API-starget-for-each-device.html"><span class="phrase">starget_for_each_device</span></a></span><span class="refpurpose"> — 
21     helper to walk all devices of a target
22 </span></dt><dt><span class="refentrytitle"><a href="API---starget-for-each-device.html"><span class="phrase">__starget_for_each_device</span></a></span><span class="refpurpose"> — 
23     helper to walk all devices of a target (UNLOCKED)
24 </span></dt><dt><span class="refentrytitle"><a href="API---scsi-device-lookup-by-target.html"><span class="phrase">__scsi_device_lookup_by_target</span></a></span><span class="refpurpose"> — 
25     find a device given the target (UNLOCKED)
26 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-lookup-by-target.html"><span class="phrase">scsi_device_lookup_by_target</span></a></span><span class="refpurpose"> — 
27     find a device given the target
28 </span></dt><dt><span class="refentrytitle"><a href="API---scsi-device-lookup.html"><span class="phrase">__scsi_device_lookup</span></a></span><span class="refpurpose"> — 
29     find a device given the host (UNLOCKED)
30 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-lookup.html"><span class="phrase">scsi_device_lookup</span></a></span><span class="refpurpose"> — 
31     find a device given the host
32 </span></dt></dl></div><p>Main file for the SCSI midlayer.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsicam.c"></a>drivers/scsi/scsicam.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-bios-ptable.html"><span class="phrase">scsi_bios_ptable</span></a></span><span class="refpurpose"> — 
33  Read PC partition table out of first sector of device.
34 </span></dt><dt><span class="refentrytitle"><a href="API-scsicam-bios-param.html"><span class="phrase">scsicam_bios_param</span></a></span><span class="refpurpose"> — 
35     Determine geometry of a disk in cylinders/heads/sectors.
36 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-partsize.html"><span class="phrase">scsi_partsize</span></a></span><span class="refpurpose"> — 
37     Parse cylinders/heads/sectors from PC partition table
38 </span></dt></dl></div><p>
39          <a class="ulink" href="http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf" target="_top">SCSI
40          Common Access Method</a> support functions, for use with
41          HDIO_GETGEO, etc.
42        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_error.c"></a>drivers/scsi/scsi_error.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-schedule-eh.html"><span class="phrase">scsi_schedule_eh</span></a></span><span class="refpurpose"> — 
43  schedule EH for SCSI host
44 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-block-when-processing-errors.html"><span class="phrase">scsi_block_when_processing_errors</span></a></span><span class="refpurpose"> — 
45     Prevent cmds from being queued.
46 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-prep-cmnd.html"><span class="phrase">scsi_eh_prep_cmnd</span></a></span><span class="refpurpose"> — 
47     Save a scsi command info as part of error recovery
48 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-restore-cmnd.html"><span class="phrase">scsi_eh_restore_cmnd</span></a></span><span class="refpurpose"> — 
49     Restore a scsi command info as part of error recovery
50 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-finish-cmd.html"><span class="phrase">scsi_eh_finish_cmd</span></a></span><span class="refpurpose"> — 
51     Handle a cmd that eh is finished with.
52 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-get-sense.html"><span class="phrase">scsi_eh_get_sense</span></a></span><span class="refpurpose"> — 
53     Get device sense data.
54 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-ready-devs.html"><span class="phrase">scsi_eh_ready_devs</span></a></span><span class="refpurpose"> — 
55     check device ready state and recover if not.
56 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-eh-flush-done-q.html"><span class="phrase">scsi_eh_flush_done_q</span></a></span><span class="refpurpose"> — 
57     finish processed commands or retry them.
58 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-ioctl-reset.html"><span class="phrase">scsi_ioctl_reset</span></a></span><span class="refpurpose"> — 
59   </span></dt><dt><span class="refentrytitle"><a href="API-scsi-get-sense-info-fld.html"><span class="phrase">scsi_get_sense_info_fld</span></a></span><span class="refpurpose"> — 
60     get information field from sense data (either fixed or descriptor format)
61 </span></dt></dl></div><p>Common SCSI error/timeout handling routines.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_devinfo.c"></a>drivers/scsi/scsi_devinfo.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-dev-info-list-add.html"><span class="phrase">scsi_dev_info_list_add</span></a></span><span class="refpurpose"> — 
62  add one dev_info list entry.
63 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-dev-info-list-find.html"><span class="phrase">scsi_dev_info_list_find</span></a></span><span class="refpurpose"> — 
64     find a matching dev_info list entry.
65 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-dev-info-list-add-str.html"><span class="phrase">scsi_dev_info_list_add_str</span></a></span><span class="refpurpose"> — 
66     parse dev_list and add to the scsi_dev_info_list.
67 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-get-device-flags.html"><span class="phrase">scsi_get_device_flags</span></a></span><span class="refpurpose"> — 
68     get device specific flags from the dynamic device list.
69 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-exit-devinfo.html"><span class="phrase">scsi_exit_devinfo</span></a></span><span class="refpurpose"> — 
70     remove /proc/scsi/device_info &amp; the scsi_dev_info_list
71 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-init-devinfo.html"><span class="phrase">scsi_init_devinfo</span></a></span><span class="refpurpose"> — 
72     set up the dynamic device list.
73 </span></dt></dl></div><p>
74          Manage scsi_dev_info_list, which tracks blacklisted and whitelisted
75          devices.
76        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_ioctl.c"></a>drivers/scsi/scsi_ioctl.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-ioctl.html"><span class="phrase">scsi_ioctl</span></a></span><span class="refpurpose"> — 
77  Dispatch ioctl to scsi device
78 </span></dt></dl></div><p>
79          Handle ioctl() calls for SCSI devices.
80        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_lib.c"></a>drivers/scsi/scsi_lib.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-execute.html"><span class="phrase">scsi_execute</span></a></span><span class="refpurpose"> — 
81  insert request and wait for the result
82 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-mode-select.html"><span class="phrase">scsi_mode_select</span></a></span><span class="refpurpose"> — 
83     issue a mode select
84 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-mode-sense.html"><span class="phrase">scsi_mode_sense</span></a></span><span class="refpurpose"> — 
85     issue a mode sense, falling back from 10 to six bytes if necessary.
86 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-test-unit-ready.html"><span class="phrase">scsi_test_unit_ready</span></a></span><span class="refpurpose"> — 
87     test if unit is ready
88 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-set-state.html"><span class="phrase">scsi_device_set_state</span></a></span><span class="refpurpose"> — 
89     Take the given device through the device state model.
90 </span></dt><dt><span class="refentrytitle"><a href="API-sdev-evt-send.html"><span class="phrase">sdev_evt_send</span></a></span><span class="refpurpose"> — 
91     send asserted event to uevent thread
92 </span></dt><dt><span class="refentrytitle"><a href="API-sdev-evt-alloc.html"><span class="phrase">sdev_evt_alloc</span></a></span><span class="refpurpose"> — 
93     allocate a new scsi event
94 </span></dt><dt><span class="refentrytitle"><a href="API-sdev-evt-send-simple.html"><span class="phrase">sdev_evt_send_simple</span></a></span><span class="refpurpose"> — 
95     send asserted event to uevent thread
96 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-quiesce.html"><span class="phrase">scsi_device_quiesce</span></a></span><span class="refpurpose"> — 
97     Block user issued commands.
98 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-device-resume.html"><span class="phrase">scsi_device_resume</span></a></span><span class="refpurpose"> — 
99     Restart user issued commands to a quiesced device.
100 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-internal-device-block.html"><span class="phrase">scsi_internal_device_block</span></a></span><span class="refpurpose"> — 
101     internal function to put a device temporarily into the SDEV_BLOCK state
102 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-internal-device-unblock.html"><span class="phrase">scsi_internal_device_unblock</span></a></span><span class="refpurpose"> — 
103     resume a device after a block request
104 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-kmap-atomic-sg.html"><span class="phrase">scsi_kmap_atomic_sg</span></a></span><span class="refpurpose"> — 
105     find and atomically map an sg-elemnt
106 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-kunmap-atomic-sg.html"><span class="phrase">scsi_kunmap_atomic_sg</span></a></span><span class="refpurpose"> — 
107     atomically unmap a virtual address, previously mapped with scsi_kmap_atomic_sg
108 </span></dt></dl></div><p>
109          SCSI queuing library.
110        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_lib_dma.c"></a>drivers/scsi/scsi_lib_dma.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-dma-map.html"><span class="phrase">scsi_dma_map</span></a></span><span class="refpurpose"> — 
111  perform DMA mapping against command's sg lists
112 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-dma-unmap.html"><span class="phrase">scsi_dma_unmap</span></a></span><span class="refpurpose"> — 
113     unmap command's sg lists mapped by scsi_dma_map
114 </span></dt></dl></div><p>
115          SCSI library functions depending on DMA
116          (map and unmap scatter-gather lists).
117        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_module.c"></a>drivers/scsi/scsi_module.c</h3></div></div></div><p>
118          The file drivers/scsi/scsi_module.c contains legacy support for
119          old-style host templates.  It should never be used by any new driver.
120        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_proc.c"></a>drivers/scsi/scsi_proc.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-proc-hostdir-add.html"><span class="phrase">scsi_proc_hostdir_add</span></a></span><span class="refpurpose"> — 
121  Create directory in /proc for a scsi host
122 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-proc-hostdir-rm.html"><span class="phrase">scsi_proc_hostdir_rm</span></a></span><span class="refpurpose"> — 
123     remove directory in /proc for a scsi host
124 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-proc-host-add.html"><span class="phrase">scsi_proc_host_add</span></a></span><span class="refpurpose"> — 
125     Add entry for this host to appropriate /proc dir
126 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-proc-host-rm.html"><span class="phrase">scsi_proc_host_rm</span></a></span><span class="refpurpose"> — 
127     remove this host's entry from /proc
128 </span></dt><dt><span class="refentrytitle"><a href="API-proc-print-scsidevice.html"><span class="phrase">proc_print_scsidevice</span></a></span><span class="refpurpose"> — 
129     return data about this host
130 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-add-single-device.html"><span class="phrase">scsi_add_single_device</span></a></span><span class="refpurpose"> — 
131     Respond to user request to probe for/add device
132 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-remove-single-device.html"><span class="phrase">scsi_remove_single_device</span></a></span><span class="refpurpose"> — 
133     Respond to user request to remove a device
134 </span></dt><dt><span class="refentrytitle"><a href="API-proc-scsi-write.html"><span class="phrase">proc_scsi_write</span></a></span><span class="refpurpose"> — 
135     handle writes to /proc/scsi/scsi
136 </span></dt><dt><span class="refentrytitle"><a href="API-proc-scsi-open.html"><span class="phrase">proc_scsi_open</span></a></span><span class="refpurpose"> — 
137     glue function
138 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-init-procfs.html"><span class="phrase">scsi_init_procfs</span></a></span><span class="refpurpose"> — 
139     create scsi and scsi/scsi in procfs
140 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-exit-procfs.html"><span class="phrase">scsi_exit_procfs</span></a></span><span class="refpurpose"> — 
141     Remove scsi/scsi and scsi from procfs
142 </span></dt></dl></div><p>
143          The functions in this file provide an interface between
144          the PROC file system and the SCSI device drivers
145          It is mainly used for debugging, statistics and to pass
146          information directly to the lowlevel driver.
147
148          I.E. plumbing to manage /proc/scsi/*
149        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_netlink.c"></a>drivers/scsi/scsi_netlink.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-nl-rcv-msg.html"><span class="phrase">scsi_nl_rcv_msg</span></a></span><span class="refpurpose"> — 
150  Receive message handler.
151 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-netlink-init.html"><span class="phrase">scsi_netlink_init</span></a></span><span class="refpurpose"> — 
152     Called by SCSI subsystem to initialize the SCSI transport netlink interface
153 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-netlink-exit.html"><span class="phrase">scsi_netlink_exit</span></a></span><span class="refpurpose"> — 
154     Called by SCSI subsystem to disable the SCSI transport netlink interface
155 </span></dt></dl></div><p>
156          Infrastructure to provide async events from transports to userspace
157          via netlink, using a single NETLINK_SCSITRANSPORT protocol for all
158          transports.
159
160          See <a class="ulink" href="http://marc.info/?l=linux-scsi&m=115507374832500&w=2" target="_top">the
161          original patch submission</a> for more details.
162        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_scan.c"></a>drivers/scsi/scsi_scan.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-complete-async-scans.html"><span class="phrase">scsi_complete_async_scans</span></a></span><span class="refpurpose"> — 
163  Wait for asynchronous scans to complete
164 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-unlock-floptical.html"><span class="phrase">scsi_unlock_floptical</span></a></span><span class="refpurpose"> — 
165     unlock device via a special MODE SENSE command
166 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-alloc-sdev.html"><span class="phrase">scsi_alloc_sdev</span></a></span><span class="refpurpose"> — 
167     allocate and setup a scsi_Device
168 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-target-reap-ref-release.html"><span class="phrase">scsi_target_reap_ref_release</span></a></span><span class="refpurpose"> — 
169     remove target from visibility
170 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-alloc-target.html"><span class="phrase">scsi_alloc_target</span></a></span><span class="refpurpose"> — 
171     allocate a new or find an existing target
172 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-target-reap.html"><span class="phrase">scsi_target_reap</span></a></span><span class="refpurpose"> — 
173     check to see if target is in use and destroy if not
174 </span></dt><dt><span class="refentrytitle"><a href="API-sanitize-inquiry-string.html"><span class="phrase">sanitize_inquiry_string</span></a></span><span class="refpurpose"> — 
175     remove non-graphical chars from an INQUIRY result string
176 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-probe-lun.html"><span class="phrase">scsi_probe_lun</span></a></span><span class="refpurpose"> — 
177     probe a single LUN using a SCSI INQUIRY
178 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-add-lun.html"><span class="phrase">scsi_add_lun</span></a></span><span class="refpurpose"> — 
179     allocate and fully initialze a scsi_device
180 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-inq-str.html"><span class="phrase">scsi_inq_str</span></a></span><span class="refpurpose"> — 
181     print INQUIRY data from min to max index, strip trailing whitespace
182 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-probe-and-add-lun.html"><span class="phrase">scsi_probe_and_add_lun</span></a></span><span class="refpurpose"> — 
183     probe a LUN, if a LUN is found add it
184 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-sequential-lun-scan.html"><span class="phrase">scsi_sequential_lun_scan</span></a></span><span class="refpurpose"> — 
185     sequentially scan a SCSI target
186 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-report-lun-scan.html"><span class="phrase">scsi_report_lun_scan</span></a></span><span class="refpurpose"> — 
187     Scan using SCSI REPORT LUN results
188 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-prep-async-scan.html"><span class="phrase">scsi_prep_async_scan</span></a></span><span class="refpurpose"> — 
189     prepare for an async scan
190 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-finish-async-scan.html"><span class="phrase">scsi_finish_async_scan</span></a></span><span class="refpurpose"> — 
191     asynchronous scan has finished
192 </span></dt></dl></div><p>
193          Scan a host to determine which (if any) devices are attached.
194
195          The general scanning/probing algorithm is as follows, exceptions are
196          made to it depending on device specific flags, compilation options,
197          and global variable (boot or module load time) settings.
198
199          A specific LUN is scanned via an INQUIRY command; if the LUN has a
200          device attached, a scsi_device is allocated and setup for it.
201
202          For every id of every channel on the given host, start by scanning
203          LUN 0.  Skip hosts that don't respond at all to a scan of LUN 0.
204          Otherwise, if LUN 0 has a device attached, allocate and setup a
205          scsi_device for it.  If target is SCSI-3 or up, issue a REPORT LUN,
206          and scan all of the LUNs returned by the REPORT LUN; else,
207          sequentially scan LUNs up until some maximum is reached, or a LUN is
208          seen that cannot have a device attached to it.
209        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_sysctl.c"></a>drivers/scsi/scsi_sysctl.c</h3></div></div></div><p>
210          Set up the sysctl entry: "/dev/scsi/logging_level"
211          (DEV_SCSI_LOGGING_LEVEL) which sets/returns scsi_logging_level.
212        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="scsi_sysfs.c"></a>drivers/scsi/scsi_sysfs.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-remove-device.html"><span class="phrase">scsi_remove_device</span></a></span><span class="refpurpose"> — 
213  unregister a device from the scsi bus
214 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-remove-target.html"><span class="phrase">scsi_remove_target</span></a></span><span class="refpurpose"> — 
215     try to remove a target and all its devices
216 </span></dt></dl></div><p>
217          SCSI sysfs interface routines.
218        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="hosts.c"></a>drivers/scsi/hosts.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-scsi-host-set-state.html"><span class="phrase">scsi_host_set_state</span></a></span><span class="refpurpose"> — 
219  Take the given host through the host state model.
220 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-remove-host.html"><span class="phrase">scsi_remove_host</span></a></span><span class="refpurpose"> — 
221     remove a scsi host
222 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-add-host-with-dma.html"><span class="phrase">scsi_add_host_with_dma</span></a></span><span class="refpurpose"> — 
223     add a scsi host with dma device
224 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-host-alloc.html"><span class="phrase">scsi_host_alloc</span></a></span><span class="refpurpose"> — 
225     register a scsi host adapter instance.
226 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-host-lookup.html"><span class="phrase">scsi_host_lookup</span></a></span><span class="refpurpose"> — 
227     get a reference to a Scsi_Host by host no
228 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-host-get.html"><span class="phrase">scsi_host_get</span></a></span><span class="refpurpose"> — 
229     inc a Scsi_Host ref count
230 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-host-put.html"><span class="phrase">scsi_host_put</span></a></span><span class="refpurpose"> — 
231     dec a Scsi_Host ref count
232 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-queue-work.html"><span class="phrase">scsi_queue_work</span></a></span><span class="refpurpose"> — 
233     Queue work to the Scsi_Host workqueue.
234 </span></dt><dt><span class="refentrytitle"><a href="API-scsi-flush-work.html"><span class="phrase">scsi_flush_work</span></a></span><span class="refpurpose"> — 
235     Flush a Scsi_Host's workqueue.
236 </span></dt></dl></div><p>
237          mid to lowlevel SCSI driver interface
238        </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="constants.c"></a>drivers/scsi/constants.c</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="re92.html">
239   drivers/scsi/constants.c
240  </a></span><span class="refpurpose"> — 
241   Document generation inconsistency
242  </span></dt></dl></div><p>
243          mid to lowlevel SCSI driver interface
244        </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="API-shost-for-each-device.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ch (SCSI Media Changer) </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">shost_for_each_device</span></td></tr></table></div></body></html>
245