← Documents Documentation/scsi/scsi.rst GitHub 원문 ↗

Linux 6.18.37 · SCSI

SCSI subsystem 문서와 module 사용

SCSI core, 상위·하위 driver의 역할과 module load·unload 순서를 설명합니다.

Source pathDocumentation/scsi/scsi.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

scsi.rst:1-44

SCSI core, 상위·하위 driver의 역할과 module load·unload 순서를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

LDP의 Linux 2.4 SCSI 문서

1-11

Linux Documentation Project(LDP)는 Linux kernel 2.4 계열의 SCSI subsystem을 설명하는 `https://www.tldp.org/HOWTO/SCSI-2.4-HOWTO`를 유지한다. LDP는 single-page·multi-page HTML과 PostScript, PDF rendering을 제공한다.

.. SPDX-License-Identifier: GPL-2.0

============================
SCSI subsystem documentation
============================

The Linux Documentation Project (LDP) maintains a document describing
the SCSI subsystem in the Linux kernel (lk) 2.4 series. See:
https://www.tldp.org/HOWTO/SCSI-2.4-HOWTO . The LDP has single
and multiple page HTML renderings as well as postscript and pdf.

scsi-core module의 load·unload 순서

12-26

Linux의 SCSI 지원은 사용자의 필요에 따라 여러 방식으로 module화할 수 있다. `scsi-core` 또는 mid level은 SCSI 지원의 핵심이며 이것 없이는 다른 SCSI driver를 사용할 수 없다.

SCSI core는 `scsi_mod.o` module 또는 kernel 내장으로 구성할 수 있다. Module이면 가장 먼저 load하고 가장 나중에 unload해야 한다. 실제로 `modprobe`와 `rmmod`가 SCSI subsystem module의 올바른 load·unload 순서를 강제한다.

SCSI module 순서
scsi_mod.o load상위·하위 driver load와 사용상위·하위 driver unloadscsi_mod.o unload

Core가 상·하위 driver보다 오래 살아 있어야 한다.

Notes on using modules in the SCSI subsystem
============================================
The SCSI support in the Linux kernel can be modularized in a number of
different ways depending upon the needs of the end user.  To understand
your options, we should first define a few terms.

The scsi-core (also known as the "mid level") contains the core of SCSI
support.  Without it you can do nothing with any of the other SCSI drivers.
The SCSI core support can be a module (scsi_mod.o), or it can be built into
the kernel. If the core is a module, it must be the first SCSI module
loaded, and if you unload the modules, it will have to be the last one
unloaded.  In practice the modprobe and rmmod commands
will enforce the correct ordering of loading and unloading modules in
the SCSI subsystem.

상위 계층과 HBA 하위 계층 driver

27-42

SCSI core가 kernel에 존재하면 개별 상위·하위 계층 driver는 어느 순서로든 load할 수 있다. 상위 계층은 disk용 `sd_mod.o`, CD-ROM용 `sr_mod.o`, tape용 `st.o`, generic용 `sg.o`다. 필요한 동안만 tape driver를 load하고 더는 쓰지 않을 때 unload해 관련 memory를 반환할 수 있다.

하위 계층 driver는 실행 platform의 개별 controller card, 즉 Host Bus Adapter(HBA)를 지원한다. 예를 들어 `aic7xxx.o`는 당시의 최신 Adaptec SCSI controller card를 제어한다. 거의 모든 하위 계층 driver는 module 또는 kernel 내장으로 build할 수 있다.

SCSI driver layer
계층역할
Core / mid levelscsi_mod.oSCSI 공통 핵심
Uppersd_mod.o, sr_mod.o, st.o, sg.o장치 유형별 interface
Loweraic7xxx.o 등HBA controller 제어

Core 주위의 상·하위 driver 역할이다.

The individual upper and lower level drivers can be loaded in any order
once the SCSI core is present in the kernel (either compiled in or loaded
as a module).  The disk driver (sd_mod.o), CD-ROM driver (sr_mod.o),
tape driver [1]_ (st.o) and SCSI generics driver (sg.o) represent the upper
level drivers to support the various assorted devices which can be
controlled.  You can for example load the tape driver to use the tape drive,
and then unload it once you have no further need for the driver (and release
the associated memory).

The lower level drivers are the ones that support the individual cards that
are supported for the hardware platform that you are running under. Those
individual cards are often called Host Bus Adapters (HBAs). For example the
aic7xxx.o driver is used to control all recent SCSI controller cards from
Adaptec. Almost all lower level drivers can be built either as modules or
built into the kernel.

OnStream tape용 st variant

43-44

OnStream tape 장치를 제어하는 `st` variant가 있으며 module 이름은 `osst.o`다.

.. [1] There is a variant of the st driver for controlling OnStream tape
       devices. Its module name is osst.o .