xref: /OK3568_Linux_fs/kernel/Documentation/scsi/scsi.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun============================
4*4882a593SmuzhiyunSCSI subsystem documentation
5*4882a593Smuzhiyun============================
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThe Linux Documentation Project (LDP) maintains a document describing
8*4882a593Smuzhiyunthe SCSI subsystem in the Linux kernel (lk) 2.4 series. See:
9*4882a593Smuzhiyunhttp://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single
10*4882a593Smuzhiyunand multiple page HTML renderings as well as postscript and pdf.
11*4882a593SmuzhiyunIt can also be found at:
12*4882a593Smuzhiyunhttp://web.archive.org/web/%2E/http://www.torque.net/scsi/SCSI-2.4-HOWTO
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunNotes on using modules in the SCSI subsystem
15*4882a593Smuzhiyun============================================
16*4882a593SmuzhiyunThe scsi support in the linux kernel can be modularized in a number of
17*4882a593Smuzhiyundifferent ways depending upon the needs of the end user.  To understand
18*4882a593Smuzhiyunyour options, we should first define a few terms.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunThe scsi-core (also known as the "mid level") contains the core of scsi
21*4882a593Smuzhiyunsupport.  Without it you can do nothing with any of the other scsi drivers.
22*4882a593SmuzhiyunThe scsi core support can be a module (scsi_mod.o), or it can be built into
23*4882a593Smuzhiyunthe kernel. If the core is a module, it must be the first scsi module
24*4882a593Smuzhiyunloaded, and if you unload the modules, it will have to be the last one
25*4882a593Smuzhiyununloaded.  In practice the modprobe and rmmod commands (and "autoclean")
26*4882a593Smuzhiyunwill enforce the correct ordering of loading and unloading modules in
27*4882a593Smuzhiyunthe SCSI subsystem.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunThe individual upper and lower level drivers can be loaded in any order
30*4882a593Smuzhiyunonce the scsi core is present in the kernel (either compiled in or loaded
31*4882a593Smuzhiyunas a module).  The disk driver (sd_mod.o), cdrom driver (sr_mod.o),
32*4882a593Smuzhiyuntape driver [1]_ (st.o) and scsi generics driver (sg.o) represent the upper
33*4882a593Smuzhiyunlevel drivers to support the various assorted devices which can be
34*4882a593Smuzhiyuncontrolled.  You can for example load the tape driver to use the tape drive,
35*4882a593Smuzhiyunand then unload it once you have no further need for the driver (and release
36*4882a593Smuzhiyunthe associated memory).
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunThe lower level drivers are the ones that support the individual cards that
39*4882a593Smuzhiyunare supported for the hardware platform that you are running under. Those
40*4882a593Smuzhiyunindividual cards are often called Host Bus Adapters (HBAs). For example the
41*4882a593Smuzhiyunaic7xxx.o driver is used to control all recent SCSI controller cards from
42*4882a593SmuzhiyunAdaptec. Almost all lower level drivers can be built either as modules or
43*4882a593Smuzhiyunbuilt into the kernel.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun.. [1] There is a variant of the st driver for controlling OnStream tape
46*4882a593Smuzhiyun       devices. Its module name is osst.o .
47*4882a593Smuzhiyun
48