Commit 901ea4a0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'acpi' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'acpi' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] libata: wrong sizeof for BUFFER
  [PATCH] libata: change order of _SDD/_GTF execution (resend #3)
  [PATCH] libata: ACPI _SDD support
  [PATCH] libata: ACPI and _GTF support
parents 2370965c 9de1cc9c
......@@ -48,6 +48,7 @@ parameter is applicable:
ISAPNP ISA PnP code is enabled.
ISDN Appropriate ISDN support is enabled.
JOY Appropriate joystick support is enabled.
LIBATA Libata driver is enabled
LP Printer support is enabled.
LOOP Loopback device support is enabled.
M68k M68k architecture is enabled.
......@@ -1038,6 +1039,10 @@ and is between 256 and 4096 characters. It is defined in the file
emulation library even if a 387 maths coprocessor
is present.
noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
when set.
Format: <int>
noaliencache [MM, NUMA] Disables the allcoation of alien caches in
the slab allocator. Saves per-node memory, but will
impact performance on real NUMA hardware.
......
......@@ -161,6 +161,19 @@ config SATA_INTEL_COMBINED
depends on IDE=y && !BLK_DEV_IDE_SATA && (SATA_AHCI || ATA_PIIX)
default y
config SATA_ACPI
bool
depends on ACPI && PCI
default y
help
This option adds support for SATA-related ACPI objects.
These ACPI objects add the ability to retrieve taskfiles
from the ACPI BIOS and write them to the disk controller.
These objects may be related to performance, security,
power management, or other areas.
You can disable this at kernel boot time by using the
option libata.noacpi=1
config PATA_ALI
tristate "ALi PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
......
......@@ -66,4 +66,4 @@ obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
obj-$(CONFIG_PATA_LEGACY) += pata_legacy.o
libata-objs := libata-core.o libata-scsi.o libata-sff.o libata-eh.o
libata-$(CONFIG_SATA_ACPI) += libata-acpi.o
This diff is collapsed.
......@@ -93,6 +93,10 @@ static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ;
module_param(ata_probe_timeout, int, 0444);
MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)");
int noacpi;
module_param(noacpi, int, 0444);
MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("Library module for ATA devices");
MODULE_LICENSE("GPL");
......@@ -1564,6 +1568,16 @@ int ata_dev_configure(struct ata_device *dev)
ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n",
__FUNCTION__, ap->id, dev->devno);
/* set _SDD */
rc = ata_acpi_push_id(ap, dev->devno);
if (rc) {
ata_dev_printk(dev, KERN_WARNING, "failed to set _SDD(%d)\n",
rc);
}
/* retrieve and execute the ATA task file of _GTF */
ata_acpi_exec_tfs(ap);
/* print device capabilities */
if (ata_msg_probe(ap))
ata_dev_printk(dev, KERN_DEBUG,
......
......@@ -47,6 +47,7 @@ extern struct workqueue_struct *ata_aux_wq;
extern int atapi_enabled;
extern int atapi_dmadir;
extern int libata_fua;
extern int noacpi;
extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
u64 block, u32 n_block, unsigned int tf_flags,
......@@ -87,6 +88,20 @@ extern void ata_port_init(struct ata_port *ap, struct ata_host *host,
extern struct ata_probe_ent *ata_probe_ent_alloc(struct device *dev,
const struct ata_port_info *port);
/* libata-acpi.c */
#ifdef CONFIG_SATA_ACPI
extern int ata_acpi_exec_tfs(struct ata_port *ap);
extern int ata_acpi_push_id(struct ata_port *ap, unsigned int ix);
#else
static inline int ata_acpi_exec_tfs(struct ata_port *ap)
{
return 0;
}
static inline int ata_acpi_push_id(struct ata_port *ap, unsigned int ix)
{
return 0;
}
#endif
/* libata-scsi.c */
extern struct scsi_transport_template ata_scsi_transport_template;
......
......@@ -35,6 +35,7 @@
#include <linux/ata.h>
#include <linux/workqueue.h>
#include <scsi/scsi_host.h>
#include <linux/acpi.h>
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
......@@ -495,6 +496,10 @@ struct ata_device {
/* error history */
struct ata_ering ering;
unsigned int horkage; /* List of broken features */
#ifdef CONFIG_SATA_ACPI
/* ACPI objects info */
acpi_handle obj_handle;
#endif
};
/* Offset into struct ata_device. Fields above it are maintained
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment