← Documents Documentation/ABI/obsolete/sysfs-bus-usb GitHub 원문 ↗

Linux 6.18.37 · ABI / obsolete

USB power level obsolete ABI

USB device autosuspend를 제어하던 power/level의 on·auto 의미와 power/control로의 대체를 설명합니다.

Source pathDocumentation/ABI/obsolete/sysfs-bus-usb
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

USB autosuspend policy

sysfs-bus-usb:1-31

on은 runtime autosuspend를 막고 auto는 driver 능력에 따라 autosuspend·autoresume을 허용합니다. 이 legacy file은 동일 기능의 power/control로 대체되었습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/usb/devices/.../power/level
2 Date: March 2007
3 KernelVersion: 2.6.21
4 Contact: Alan Stern <stern@rowland.harvard.edu>
5 Description:
6 Each USB device directory will contain a file named
7 power/level. This file holds a power-level setting for
8 the device, either "on" or "auto".
9
10 "on" means that the device is not allowed to autosuspend,
11 although normal suspends for system sleep will still
12 be honored. "auto" means the device will autosuspend
13 and autoresume in the usual manner, according to the
14 capabilities of its driver.
15
16 During normal use, devices should be left in the "auto"
17 level. The "on" level is meant for administrative uses.
18 If you want to suspend a device immediately but leave it
19 free to wake up in response to I/O requests, you should
20 write "0" to power/autosuspend.
21
22 Device not capable of proper suspend and resume should be
23 left in the "on" level. Although the USB spec requires
24 devices to support suspend/resume, many of them do not.
25 In fact so many don't that by default, the USB core
26 initializes all non-hub devices in the "on" level. Some
27 drivers may change this setting when they are bound.
28
29 This file is deprecated and will be removed after 2010.
30 Use the power/control file instead; it does exactly the
31 same thing.
32

3. 한국어 전문 번역

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

USB device power/level

1-31
항목
What/sys/bus/usb/devices/.../power/level
Date2007년 3월
KernelVersion2.6.21
ContactAlan Stern <stern@rowland.harvard.edu>

각 USB device directory에는 power/level file이 있다. 이 file은 device power level을 on 또는 auto로 설정한다.

on은 device의 autosuspend를 허용하지 않는다는 뜻이다. 다만 system sleep에 따른 일반 suspend는 그대로 적용된다. auto는 driver가 지원하는 범위에서 일반적인 방식으로 autosuspend와 autoresume을 수행한다.

일반 사용 중에는 device를 auto level에 두어야 한다. on level은 administrator가 제어할 때 사용한다. device를 즉시 suspend하면서 I/O request에 반응해 자유롭게 wakeup하도록 두려면 power/autosuspend에 0을 써야 한다.

suspend와 resume을 올바르게 수행하지 못하는 device는 on level에 두어야 한다. USB specification은 device의 suspend/resume 지원을 요구하지만 실제로 지원하지 않는 device가 많다.

이런 device가 매우 많으므로 USB core는 기본적으로 hub가 아닌 모든 device를 on level로 초기화한다. 일부 driver는 device에 bind될 때 이 설정을 바꿀 수 있다.

이 file은 deprecated 상태이며 2010년 이후 제거 대상으로 지정되었다. 정확히 같은 기능을 제공하는 power/control file을 사용해야 한다.