Skip to content

Commit

Permalink
ACPI support for IDE devices
Browse files Browse the repository at this point in the history
This patch implements ACPI integration for generic IDE devices.
The ACPI spec mandates that some methods are called during suspend and
resume. And consequently there most modern Laptops cannot resume
properly without it.

According to the spec, we should call '_GTM' (Get Timing) upon suspend
to store the current IDE adapter settings.
Upon resume we should call '_STM' (Set Timing) to initialize the
adapter with the stored settings; afterwards '_GTF' (Get Taskfile)
should be called which returns a buffer with some IDE initialisation
commands. Those commands should be passed to the drive.

There are two module params which control the behaviour of this patch:

'ide=noacpi'
	Do not call any ACPI methods (Disables any ACPI method calls)
'ide=acpigtf'
	Enable execution of _GTF methods upon resume.
	Has no effect if 'ide=noacpi' is set.
'ide=acpionboot'
	Enable execution of ACPI methods during boot.
	This might be required on some machines if 'ide=acpigtf' is
	selected as some machines modify the _GTF information
	depending on the drive identification passed down with _STM.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Hannes Reinecke authored and Bartlomiej Zolnierkiewicz committed Feb 7, 2007
1 parent 78281c5 commit e3a59b4
Show file tree
Hide file tree
Showing 6 changed files with 770 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/ide/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ config BLK_DEV_IDESCSI
If both this SCSI emulation and native ATAPI support are compiled
into the kernel, the native support will be used.

config BLK_DEV_IDEACPI
bool "IDE ACPI support"
depends on ACPI
---help---
Implement ACPI support for generic IDE devices. On modern
machines ACPI support is required to properly handle ACPI S3 states.

config IDE_TASK_IOCTL
bool "IDE Taskfile Access"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o
ide-core-$(CONFIG_PROC_FS) += ide-proc.o
ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
ide-core-$(CONFIG_BLK_DEV_IDEACPI) += ide-acpi.o

# built-in only drivers from arm/
ide-core-$(CONFIG_IDE_ARM) += arm/ide_arm.o
Expand Down
Loading

0 comments on commit e3a59b4

Please sign in to comment.