← Documents Documentation/admin-guide/laptops/toshiba_haps.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Laptops

Toshiba HDD Active Protection Sensor

Toshiba HDD shock sensor의 ACPI method, protection level, reset sysfs interface와 지원 조건을 설명합니다.

Source pathDocumentation/admin-guide/laptops/toshiba_haps.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Sensor와 driver

toshiba_haps.rst:1-31

HDD shock sensor와 userspace notification 역할을 설명합니다.

ACPI와 sysfs

toshiba_haps.rst:32-87

method, 지원 device, protection level과 reset file을 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ====================================
2 Toshiba HDD Active Protection Sensor
3 ====================================
4
5 Kernel driver: toshiba_haps
6
7 Author: Azael Avalos <coproscefalo@gmail.com>
8
9
10 .. 0. Contents
11
12 1. Description
13 2. Interface
14 3. Accelerometer axes
15 4. Supported devices
16 5. Usage
17
18
19 1. Description
20 --------------
21
22 This driver provides support for the accelerometer found in various Toshiba
23 laptops, being called "Toshiba HDD Protection - Shock Sensor" officially,
24 and detects laptops automatically with this device.
25 On Windows, Toshiba provided software monitors this device and provides
26 automatic HDD protection (head unload) on sudden moves or harsh vibrations,
27 however, this driver only provides a notification via a sysfs file to let
28 userspace tools or daemons act accordingly, as well as providing a sysfs
29 file to set the desired protection level or sensor sensibility.
30
31
32 2. Interface
33 ------------
34
35 This device comes with 3 methods:
36
37 ==== =====================================================================
38 _STA Checks existence of the device, returning Zero if the device does not
39 exists or is not supported.
40 PTLV Sets the desired protection level.
41 RSSS Shuts down the HDD protection interface for a few seconds,
42 then restores normal operation.
43 ==== =====================================================================
44
45 Note:
46 The presence of Solid State Drives (SSD) can make this driver to fail loading,
47 given the fact that such drives have no movable parts, and thus, not requiring
48 any "protection" as well as failing during the evaluation of the _STA method
49 found under this device.
50
51
52 3. Accelerometer axes
53 ---------------------
54
55 This device does not report any axes, however, to query the sensor position
56 a couple HCI (Hardware Configuration Interface) calls (0x6D and 0xA6) are
57 provided to query such information, handled by the kernel module toshiba_acpi
58 since kernel version 3.15.
59
60
61 4. Supported devices
62 --------------------
63
64 This driver binds itself to the ACPI device TOS620A, and any Toshiba laptop
65 with this device is supported, given the fact that they have the presence of
66 conventional HDD and not only SSD, or a combination of both HDD and SSD.
67
68
69 5. Usage
70 --------
71
72 The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are:
73
74 ================ ============================================================
75 protection_level The protection_level is readable and writeable, and
76 provides a way to let userspace query the current protection
77 level, as well as set the desired protection level, the
78 available protection levels are::
79
80 ============ ======= ========== ========
81 0 - Disabled 1 - Low 2 - Medium 3 - High
82 ============ ======= ========== ========
83
84 reset_protection The reset_protection entry is writeable only, being "1"
85 the only parameter it accepts, it is used to trigger
86 a reset of the protection interface.
87 ================ ============================================================
88

3. 한국어 전문 번역

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

Driver와 목차

1-18

Kernel driver는 `toshiba_haps`이며 작성자는 Azael Avalos <coproscefalo@gmail.com>입니다.

문서는 description, interface, accelerometer axes, supported devices, usage 순서로 구성됩니다.

HDD shock sensor 지원 범위

19-31

이 driver는 여러 Toshiba laptop의 accelerometer를 지원합니다. 공식 이름은 "Toshiba HDD Protection - Shock Sensor"이며 device가 있는 laptop을 자동 감지합니다.

Windows의 Toshiba software는 sudden move나 harsh vibration을 감지해 HDD head를 unload하지만, 이 driver는 sysfs file로 notification만 제공합니다. userspace tool 또는 daemon이 알맞게 대응해야 합니다. 별도 sysfs file에서 원하는 protection level 또는 sensor sensitivity를 설정할 수 있습니다.

ACPI method

32-51

device는 세 method를 제공합니다.

method동작
_STAdevice 존재 여부를 확인합니다. device가 없거나 unsupported이면 `0`을 반환합니다.
PTLV원하는 protection level을 설정합니다.
RSSSHDD protection interface를 몇 초간 shutdown한 뒤 normal operation을 복원합니다.

SSD에는 movable part가 없어 protection이 필요하지 않습니다. SSD 존재 때문에 이 device 아래 `_STA` 평가가 실패해 driver load가 실패할 수 있습니다.

Accelerometer axis 조회

52-60

device 자체는 axis를 보고하지 않습니다. sensor position은 HCI(Hardware Configuration Interface) call `0x6D`, `0xA6`으로 조회합니다. 이 call은 kernel 3.15부터 `toshiba_acpi` module이 처리합니다.

지원 device

61-68

driver는 ACPI device `TOS620A`에 bind합니다. 이 device가 있고 conventional HDD를 포함한 Toshiba laptop을 지원합니다. HDD만 있거나 HDD와 SSD를 함께 사용하는 구성은 지원되지만 SSD만 있는 구성은 대상이 아닙니다.

Sysfs 사용

69-87

sysfs file은 `/sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/` 아래에 있습니다.

fileaccess·동작
protection_levelread/write입니다. current level을 조회하거나 원하는 level을 설정합니다.
reset_protectionwrite-only이며 허용하는 parameter는 `1`뿐입니다. protection interface reset을 trigger합니다.
valueprotection level
0Disabled
1Low
2Medium
3High