diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 3b334af0c7b9..c750f6ce770a 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -187,6 +187,12 @@ int noautodma = 1; | |||
187 | 187 | ||
188 | EXPORT_SYMBOL(noautodma); | 188 | EXPORT_SYMBOL(noautodma); |
189 | 189 | ||
190 | #ifdef CONFIG_BLK_DEV_IDEACPI | ||
191 | int ide_noacpi = 0; | ||
192 | int ide_noacpitfs = 1; | ||
193 | int 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); | |||
1214 | static int generic_ide_suspend(struct device *dev, pm_message_t mesg) | 1220 | static 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) | |||
1235 | static int generic_ide_resume(struct device *dev) | 1246 | static 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 | */ |
@@ -1781,9 +1817,9 @@ done: | |||
1781 | return 1; | 1817 | return 1; |
1782 | } | 1818 | } |
1783 | 1819 | ||
1784 | extern void pnpide_init(void); | 1820 | extern void __init pnpide_init(void); |
1785 | extern void pnpide_exit(void); | 1821 | extern void __exit pnpide_exit(void); |
1786 | extern void h8300_ide_init(void); | 1822 | extern void __init h8300_ide_init(void); |
1787 | 1823 | ||
1788 | /* | 1824 | /* |
1789 | * probe_for_hwifs() finds/initializes "known" IDE interfaces | 1825 | * probe_for_hwifs() finds/initializes "known" IDE interfaces |
@@ -2088,7 +2124,7 @@ int __init init_module (void) | |||
2088 | return ide_init(); | 2124 | return ide_init(); |
2089 | } | 2125 | } |
2090 | 2126 | ||
2091 | void cleanup_module (void) | 2127 | void __exit cleanup_module (void) |
2092 | { | 2128 | { |
2093 | int index; | 2129 | int index; |
2094 | 2130 | ||