aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 6c9bd5165bdb..c750f6ce770a 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -187,6 +187,12 @@ int noautodma = 1;
187 187
188EXPORT_SYMBOL(noautodma); 188EXPORT_SYMBOL(noautodma);
189 189
190#ifdef CONFIG_BLK_DEV_IDEACPI
191int ide_noacpi = 0;
192int ide_noacpitfs = 1;
193int ide_noacpionboot = 1;
194#endif
195
190/* 196/*
191 * This is declared extern in ide.h, for access by other IDE modules: 197 * This is declared extern in ide.h, for access by other IDE modules:
192 */ 198 */
@@ -1214,10 +1220,15 @@ EXPORT_SYMBOL(system_bus_clock);
1214static int generic_ide_suspend(struct device *dev, pm_message_t mesg) 1220static int generic_ide_suspend(struct device *dev, pm_message_t mesg)
1215{ 1221{
1216 ide_drive_t *drive = dev->driver_data; 1222 ide_drive_t *drive = dev->driver_data;
1223 ide_hwif_t *hwif = HWIF(drive);
1217 struct request rq; 1224 struct request rq;
1218 struct request_pm_state rqpm; 1225 struct request_pm_state rqpm;
1219 ide_task_t args; 1226 ide_task_t args;
1220 1227
1228 /* Call ACPI _GTM only once */
1229 if (!(drive->dn % 2))
1230 ide_acpi_get_timing(hwif);
1231
1221 memset(&rq, 0, sizeof(rq)); 1232 memset(&rq, 0, sizeof(rq));
1222 memset(&rqpm, 0, sizeof(rqpm)); 1233 memset(&rqpm, 0, sizeof(rqpm));
1223 memset(&args, 0, sizeof(args)); 1234 memset(&args, 0, sizeof(args));
@@ -1235,10 +1246,17 @@ static int generic_ide_suspend(struct device *dev, pm_message_t mesg)
1235static int generic_ide_resume(struct device *dev) 1246static int generic_ide_resume(struct device *dev)
1236{ 1247{
1237 ide_drive_t *drive = dev->driver_data; 1248 ide_drive_t *drive = dev->driver_data;
1249 ide_hwif_t *hwif = HWIF(drive);
1238 struct request rq; 1250 struct request rq;
1239 struct request_pm_state rqpm; 1251 struct request_pm_state rqpm;
1240 ide_task_t args; 1252 ide_task_t args;
1241 1253
1254 /* Call ACPI _STM only once */
1255 if (!(drive->dn % 2))
1256 ide_acpi_push_timing(hwif);
1257
1258 ide_acpi_exec_tfs(drive);
1259
1242 memset(&rq, 0, sizeof(rq)); 1260 memset(&rq, 0, sizeof(rq));
1243 memset(&rqpm, 0, sizeof(rqpm)); 1261 memset(&rqpm, 0, sizeof(rqpm));
1244 memset(&args, 0, sizeof(args)); 1262 memset(&args, 0, sizeof(args));
@@ -1543,6 +1561,24 @@ static int __init ide_setup(char *s)
1543 } 1561 }
1544#endif /* CONFIG_BLK_DEV_IDEPCI */ 1562#endif /* CONFIG_BLK_DEV_IDEPCI */
1545 1563
1564#ifdef CONFIG_BLK_DEV_IDEACPI
1565 if (!strcmp(s, "ide=noacpi")) {
1566 //printk(" : Disable IDE ACPI support.\n");
1567 ide_noacpi = 1;
1568 return 1;
1569 }
1570 if (!strcmp(s, "ide=acpigtf")) {
1571 //printk(" : Enable IDE ACPI _GTF support.\n");
1572 ide_noacpitfs = 0;
1573 return 1;
1574 }
1575 if (!strcmp(s, "ide=acpionboot")) {
1576 //printk(" : Call IDE ACPI methods on boot.\n");
1577 ide_noacpionboot = 0;
1578 return 1;
1579 }
1580#endif /* CONFIG_BLK_DEV_IDEACPI */
1581
1546 /* 1582 /*
1547 * Look for drive options: "hdx=" 1583 * Look for drive options: "hdx="
1548 */ 1584 */