Commit 4d727a78 authored by Linus Torvalds's avatar Linus Torvalds

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

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata-acpi: don't call sleeping function from invalid context
  Added Targa Visionary 1000 IDE adapter to pata_sis.c
  libata-acpi: filter out DIPM enable
parents 49641f1a 3c1e3896
...@@ -29,14 +29,16 @@ ...@@ -29,14 +29,16 @@
enum { enum {
ATA_ACPI_FILTER_SETXFER = 1 << 0, ATA_ACPI_FILTER_SETXFER = 1 << 0,
ATA_ACPI_FILTER_LOCK = 1 << 1, ATA_ACPI_FILTER_LOCK = 1 << 1,
ATA_ACPI_FILTER_DIPM = 1 << 2,
ATA_ACPI_FILTER_DEFAULT = ATA_ACPI_FILTER_SETXFER | ATA_ACPI_FILTER_DEFAULT = ATA_ACPI_FILTER_SETXFER |
ATA_ACPI_FILTER_LOCK, ATA_ACPI_FILTER_LOCK |
ATA_ACPI_FILTER_DIPM,
}; };
static unsigned int ata_acpi_gtf_filter = ATA_ACPI_FILTER_DEFAULT; static unsigned int ata_acpi_gtf_filter = ATA_ACPI_FILTER_DEFAULT;
module_param_named(acpi_gtf_filter, ata_acpi_gtf_filter, int, 0644); module_param_named(acpi_gtf_filter, ata_acpi_gtf_filter, int, 0644);
MODULE_PARM_DESC(acpi_gtf_filter, "filter mask for ACPI _GTF commands, set to filter out (0x1=set xfermode, 0x2=lock/freeze lock)"); MODULE_PARM_DESC(acpi_gtf_filter, "filter mask for ACPI _GTF commands, set to filter out (0x1=set xfermode, 0x2=lock/freeze lock, 0x4=DIPM)");
#define NO_PORT_MULT 0xffff #define NO_PORT_MULT 0xffff
#define SATA_ADR(root, pmp) (((root) << 16) | (pmp)) #define SATA_ADR(root, pmp) (((root) << 16) | (pmp))
...@@ -195,6 +197,10 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, ...@@ -195,6 +197,10 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
/* This device does not support hotplug */ /* This device does not support hotplug */
return; return;
if (event == ACPI_NOTIFY_BUS_CHECK ||
event == ACPI_NOTIFY_DEVICE_CHECK)
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
spin_lock_irqsave(ap->lock, flags); spin_lock_irqsave(ap->lock, flags);
switch (event) { switch (event) {
...@@ -202,7 +208,6 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, ...@@ -202,7 +208,6 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
case ACPI_NOTIFY_DEVICE_CHECK: case ACPI_NOTIFY_DEVICE_CHECK:
ata_ehi_push_desc(ehi, "ACPI event"); ata_ehi_push_desc(ehi, "ACPI event");
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ata_port_printk(ap, KERN_ERR, ata_port_printk(ap, KERN_ERR,
"acpi: failed to determine bay status (0x%x)\n", "acpi: failed to determine bay status (0x%x)\n",
...@@ -690,6 +695,14 @@ static int ata_acpi_filter_tf(const struct ata_taskfile *tf, ...@@ -690,6 +695,14 @@ static int ata_acpi_filter_tf(const struct ata_taskfile *tf,
return 1; return 1;
} }
if (ata_acpi_gtf_filter & ATA_ACPI_FILTER_DIPM) {
/* inhibit enabling DIPM */
if (tf->command == ATA_CMD_SET_FEATURES &&
tf->feature == SETFEATURES_SATA_ENABLE &&
tf->nsect == SATA_DIPM)
return 1;
}
return 0; return 0;
} }
......
...@@ -56,6 +56,7 @@ static const struct sis_laptop sis_laptop[] = { ...@@ -56,6 +56,7 @@ static const struct sis_laptop sis_laptop[] = {
{ 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
{ 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */ { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
{ 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */ { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */
{ 0x5513, 0x1039, 0x5513 }, /* Targa Visionary 1000 */
/* end marker */ /* end marker */
{ 0, } { 0, }
}; };
......
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