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

Linux 6.18.37 · SCSI

SCSI Generic(sg) 드라이버

SCSI Generic driver의 세 major version, 설명서·utility 위치와 kernel별 version 대응을 정리합니다.

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

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

1. 요약·해설

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

요약·해설

scsi-generic.rst:1-107

SCSI Generic driver의 세 major version, 설명서·utility 위치와 kernel별 version 대응을 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ========================
4 SCSI Generic (sg) driver
5 ========================
6
7 20020126
8
9 Introduction
10 ============
11 The SCSI Generic driver (sg) is one of the four "high level" SCSI device
12 drivers along with sd, st and sr (disk, tape and CD-ROM respectively). Sg
13 is more generalized (but lower level) than its siblings and tends to be
14 used on SCSI devices that don't fit into the already serviced categories.
15 Thus sg is used for scanners, CD writers and reading audio CDs digitally
16 amongst other things.
17
18 Rather than document the driver's interface here, version information
19 is provided plus pointers (i.e. URLs) where to find documentation
20 and examples.
21
22
23 Major versions of the sg driver
24 ===============================
25 There are three major versions of sg found in the Linux kernel (lk):
26 - sg version 1 (original) from 1992 to early 1999 (lk 2.2.5) .
27 It is based in the sg_header interface structure.
28 - sg version 2 from lk 2.2.6 in the 2.2 series. It is based on
29 an extended version of the sg_header interface structure.
30 - sg version 3 found in the lk 2.4 series (and the lk 2.5 series).
31 It adds the sg_io_hdr interface structure.
32
33
34 Sg driver documentation
35 =======================
36 The most recent documentation of the sg driver is kept at
37
38 - https://sg.danny.cz/sg/
39
40 This describes the sg version 3 driver found in the lk 2.4 series.
41
42 Documentation (large version) for the version 2 sg driver found in the
43 lk 2.2 series can be found at
44
45 - https://sg.danny.cz/sg/p/scsi-generic_long.txt.
46
47 The original documentation for the sg driver (prior to lk 2.2.6) can be
48 found in the LDP archives at
49
50 - https://tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/index.html
51
52 A more general description of the Linux SCSI subsystem of which sg is a
53 part can be found at https://www.tldp.org/HOWTO/SCSI-2.4-HOWTO .
54
55
56 Example code and utilities
57 ==========================
58 There are two packages of sg utilities:
59
60 ========= ==========================================================
61 sg3_utils for the sg version 3 driver found in lk 2.4
62 sg_utils for the sg version 2 (and original) driver found in lk 2.2
63 and earlier
64 ========= ==========================================================
65
66 Both packages will work in the lk 2.4 series. However, sg3_utils offers more
67 capabilities. They can be found at: https://sg.danny.cz/sg/sg3_utils.html and
68 freecode.com
69
70 Another approach is to look at the applications that use the sg driver.
71 These include cdrecord, cdparanoia, SANE and cdrdao.
72
73
74 Mapping of Linux kernel versions to sg driver versions
75 ======================================================
76 Here is a list of Linux kernels in the 2.4 series that had the new version
77 of the sg driver:
78
79 - lk 2.4.0 : sg version 3.1.17
80 - lk 2.4.7 : sg version 3.1.19
81 - lk 2.4.10 : sg version 3.1.20 [#]_
82 - lk 2.4.17 : sg version 3.1.22
83
84 .. [#] There were 3 changes to sg version 3.1.20 by third parties in the
85 next six Linux kernel versions.
86
87 For reference here is a list of Linux kernels in the 2.2 series that had
88 the new version of the sg driver:
89
90 - lk 2.2.0 : original sg version [with no version number]
91 - lk 2.2.6 : sg version 2.1.31
92 - lk 2.2.8 : sg version 2.1.32
93 - lk 2.2.10 : sg version 2.1.34 [SG_GET_VERSION_NUM ioctl first appeared]
94 - lk 2.2.14 : sg version 2.1.36
95 - lk 2.2.16 : sg version 2.1.38
96 - lk 2.2.17 : sg version 2.1.39
97 - lk 2.2.20 : sg version 2.1.40
98
99 The lk 2.5 development series currently contains sg version 3.5.23
100 which is functionally equivalent to sg version 3.1.22 found in lk 2.4.17.
101
102
103 Douglas Gilbert
104
105 26th January 2002
106
108

3. 한국어 전문 번역

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

범용 SCSI 장치를 위한 sg

1-22

2002년 1월 26일 기준 문서다. SCSI Generic driver `sg`는 disk용 `sd`, tape용 `st`, CD-ROM용 `sr`과 함께 네 SCSI 상위 계층 device driver 중 하나다. 다른 세 driver보다 범용성이 높고 더 낮은 수준에서 동작하므로 기존 범주에 잘 맞지 않는 SCSI 장치에 사용한다.

대표 용도는 scanner, CD writer, audio CD의 digital reading이다. 이 문서는 interface 자체 대신 version 정보와 설명서·예제 위치를 안내한다.

.. SPDX-License-Identifier: GPL-2.0

========================
SCSI Generic (sg) driver
========================

                                                        20020126

Introduction
============
The SCSI Generic driver (sg) is one of the four "high level" SCSI device
drivers along with sd, st and sr (disk, tape and CD-ROM respectively). Sg
is more generalized (but lower level) than its siblings and tends to be
used on SCSI devices that don't fit into the already serviced categories.
Thus sg is used for scanners, CD writers and reading audio CDs digitally
amongst other things.

Rather than document the driver's interface here, version information
is provided plus pointers (i.e. URLs) where to find documentation
and examples.

sg version 1·2·3

23-33

Linux kernel에는 sg의 큰 세대가 세 가지 있다. Version 1은 1992년부터 1999년 초 Linux 2.2.5까지 사용했고 `sg_header` interface structure에 기반한다. Version 2는 Linux 2.2.6부터 2.2 계열에서 확장된 `sg_header`를 사용한다. Version 3은 Linux 2.4와 2.5 계열에 들어갔고 `sg_io_hdr` interface structure를 추가했다.

sg 주요 version
VersionKernelInterface
11992~Linux 2.2.5sg_header
2Linux 2.2.6 이후 2.2확장 sg_header
3Linux 2.4·2.5sg_io_hdr 추가

Kernel 세대와 interface structure의 대응이다.

Major versions of the sg driver
===============================
There are three major versions of sg found in the Linux kernel (lk):
      - sg version 1 (original) from 1992 to early 1999 (lk 2.2.5) .
        It is based in the sg_header interface structure.
      - sg version 2 from lk 2.2.6 in the 2.2 series. It is based on
        an extended version of the sg_header interface structure.
      - sg version 3 found in the lk 2.4 series (and the lk 2.5 series).
        It adds the sg_io_hdr interface structure.

Version별 설명서 위치

34-55

Linux 2.4의 sg version 3 최신 설명서는 `https://sg.danny.cz/sg/`에 있다. Linux 2.2의 sg version 2 장문 설명서는 `https://sg.danny.cz/sg/p/scsi-generic_long.txt`에서 찾는다.

Linux 2.2.6 이전 original driver 설명서는 LDP archive의 `https://tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/index.html`에 있다. sg가 속한 Linux SCSI subsystem 전체 설명은 `https://www.tldp.org/HOWTO/SCSI-2.4-HOWTO`를 참고한다.

Sg driver documentation
=======================
The most recent documentation of the sg driver is kept at

- https://sg.danny.cz/sg/

This describes the sg version 3 driver found in the lk 2.4 series.

Documentation (large version) for the version 2 sg driver found in the
lk 2.2 series can be found at

- https://sg.danny.cz/sg/p/scsi-generic_long.txt.

The original documentation for the sg driver (prior to lk 2.2.6) can be
found in the LDP archives at

- https://tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/index.html

A more general description of the Linux SCSI subsystem of which sg is a
part can be found at https://www.tldp.org/HOWTO/SCSI-2.4-HOWTO .

sg3_utils와 사용 application

56-73

Utility package는 둘이다. `sg3_utils`는 Linux 2.4의 sg version 3용이고, `sg_utils`는 Linux 2.2 이하의 version 2와 original driver용이다. 둘 다 Linux 2.4에서 동작하지만 `sg3_utils`가 더 많은 기능을 제공한다. 배포 위치는 `https://sg.danny.cz/sg/sg3_utils.html`과 freecode.com이다.

Driver 사용 예는 실제 application에서도 찾을 수 있다. `cdrecord`, `cdparanoia`, SANE, `cdrdao`가 sg를 사용한다.

sg utility package
Package대상
sg3_utilsLinux 2.4의 sg version 3
sg_utilsLinux 2.2 이하의 sg version 2와 original

Driver generation별 utility다.

Example code and utilities
==========================
There are two packages of sg utilities:

    =========   ==========================================================
    sg3_utils   for the sg version 3 driver found in lk 2.4
    sg_utils    for the sg version 2 (and original) driver found in lk 2.2
                and earlier
    =========   ==========================================================

Both packages will work in the lk 2.4 series. However, sg3_utils offers more
capabilities. They can be found at: https://sg.danny.cz/sg/sg3_utils.html and
freecode.com

Another approach is to look at the applications that use the sg driver.
These include cdrecord, cdparanoia, SANE and cdrdao.

Kernel version과 sg version 대응

74-102

Linux 2.4 계열에서는 2.4.0이 sg 3.1.17, 2.4.7이 3.1.19, 2.4.10이 3.1.20, 2.4.17이 3.1.22를 포함했다. 3.1.20은 뒤이은 여섯 kernel version에서 제3자가 세 번 변경했다.

Linux 2.2에서는 2.2.0이 version number 없는 original sg, 2.2.6이 2.1.31, 2.2.8이 2.1.32, 2.2.10이 2.1.34, 2.2.14가 2.1.36, 2.2.16이 2.1.38, 2.2.17이 2.1.39, 2.2.20이 2.1.40이다. `SG_GET_VERSION_NUM` ioctl은 Linux 2.2.10의 sg 2.1.34에서 처음 등장했다.

당시 Linux 2.5 개발 계열의 sg 3.5.23은 Linux 2.4.17의 sg 3.1.22와 기능상 같다.

Linux 2.4의 sg
Kernelsg
2.4.03.1.17
2.4.73.1.19
2.4.103.1.20
2.4.173.1.22

2.4 stable 계열의 주요 sg version이다.

Linux 2.2의 sg
Kernelsg
2.2.0original
2.2.62.1.31
2.2.82.1.32
2.2.102.1.34
2.2.142.1.36
2.2.162.1.38
2.2.172.1.39
2.2.202.1.40

2.2 stable 계열의 주요 sg version이다.

Mapping of Linux kernel versions to sg driver versions
======================================================
Here is a list of Linux kernels in the 2.4 series that had the new version
of the sg driver:

     - lk 2.4.0 : sg version 3.1.17
     - lk 2.4.7 : sg version 3.1.19
     - lk 2.4.10 : sg version 3.1.20 [#]_
     - lk 2.4.17 : sg version 3.1.22

.. [#] There were 3 changes to sg version 3.1.20 by third parties in the
       next six Linux kernel versions.

For reference here is a list of Linux kernels in the 2.2 series that had
the new version of the sg driver:

     - lk 2.2.0 : original sg version [with no version number]
     - lk 2.2.6 : sg version 2.1.31
     - lk 2.2.8 : sg version 2.1.32
     - lk 2.2.10 : sg version 2.1.34 [SG_GET_VERSION_NUM ioctl first appeared]
     - lk 2.2.14 : sg version 2.1.36
     - lk 2.2.16 : sg version 2.1.38
     - lk 2.2.17 : sg version 2.1.39
     - lk 2.2.20 : sg version 2.1.40

The lk 2.5 development series currently contains sg version 3.5.23
which is functionally equivalent to sg version 3.1.22 found in lk 2.4.17.

작성자와 날짜

103-107

Douglas Gilbert가 2002년 1월 26일 작성했으며 연락처는 `[email protected]`이다.

Douglas Gilbert

26th January 2002

[email protected]