Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | ============================ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | SCSI subsystem documentation |
| 5 | ============================ |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 6 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | The Linux Documentation Project (LDP) maintains a document describing |
| 8 | the SCSI subsystem in the Linux kernel (lk) 2.4 series. See: |
| 9 | http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single |
| 10 | and multiple page HTML renderings as well as postscript and pdf. |
Justin P. Mattock | 0ea6e61 | 2010-07-23 20:51:24 -0700 | [diff] [blame] | 11 | It can also be found at: |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 12 | http://web.archive.org/web/%2E/http://www.torque.net/scsi/SCSI-2.4-HOWTO |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
| 14 | Notes on using modules in the SCSI subsystem |
| 15 | ============================================ |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 16 | The scsi support in the linux kernel can be modularized in a number of |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | different ways depending upon the needs of the end user. To understand |
| 18 | your options, we should first define a few terms. |
| 19 | |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 20 | The scsi-core (also known as the "mid level") contains the core of scsi |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | support. Without it you can do nothing with any of the other scsi drivers. |
| 22 | The scsi core support can be a module (scsi_mod.o), or it can be built into |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 23 | the kernel. If the core is a module, it must be the first scsi module |
| 24 | loaded, and if you unload the modules, it will have to be the last one |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | unloaded. In practice the modprobe and rmmod commands (and "autoclean") |
| 26 | will enforce the correct ordering of loading and unloading modules in |
| 27 | the SCSI subsystem. |
| 28 | |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 29 | The individual upper and lower level drivers can be loaded in any order |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | once the scsi core is present in the kernel (either compiled in or loaded |
| 31 | as a module). The disk driver (sd_mod.o), cdrom driver (sr_mod.o), |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 32 | tape driver [1]_ (st.o) and scsi generics driver (sg.o) represent the upper |
| 33 | level drivers to support the various assorted devices which can be |
| 34 | controlled. You can for example load the tape driver to use the tape drive, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | and then unload it once you have no further need for the driver (and release |
| 36 | the associated memory). |
| 37 | |
| 38 | The lower level drivers are the ones that support the individual cards that |
| 39 | are supported for the hardware platform that you are running under. Those |
| 40 | individual cards are often called Host Bus Adapters (HBAs). For example the |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 41 | aic7xxx.o driver is used to control all recent SCSI controller cards from |
| 42 | Adaptec. Almost all lower level drivers can be built either as modules or |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | built into the kernel. |
| 44 | |
Mauro Carvalho Chehab | b7223d9 | 2020-03-02 09:16:06 +0100 | [diff] [blame] | 45 | .. [1] There is a variant of the st driver for controlling OnStream tape |
| 46 | devices. Its module name is osst.o . |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |