aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-29 22:20:42 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-29 22:20:42 -0400
commit2bf427b25b79eb7cea27963a66c3d4684cae0e0c (patch)
tree23d8da7a647b91eaaf3b63d7c09ae3f115a88428 /include/linux
parent9c72ebef5aabf3532469d602a9d87beceea268b1 (diff)
ide: fix resume for CONFIG_BLK_DEV_IDEACPI=y
commit 2f0d0fd2a605666d38e290c5c0d2907484352dc4 ("ide-acpi: cleanup do_drive_get_GTF()") didn't account for the lack of hwif->acpidata check in generic_ide_suspend() [ indirect user of do_drive_get_GTF() through ide_acpi_exec_tfs() ] resulting in broken resume when ACPI support is enabled but ACPI data is unavailable. Fix it by adding ide_port_acpi() helper for checking if port needs ACPI handling and cleaning generic_ide_{suspend,resume}() to use it instead of hiding hwif->acpidata and ide_noacpi checks in IDE ACPI helpers (this should help in preventing similar bugs in the future). While at it: - kill superfluous debugging printks in ide_acpi_{get,push}_timing() Reported-and-tested-by: Etienne Basset <etienne.basset@numericable.fr> Also-reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ide.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index c6af7c44d46c..edc93a6d931d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1419,6 +1419,7 @@ static inline void ide_dma_unmap_sg(ide_drive_t *drive,
1419 1419
1420#ifdef CONFIG_BLK_DEV_IDEACPI 1420#ifdef CONFIG_BLK_DEV_IDEACPI
1421int ide_acpi_init(void); 1421int ide_acpi_init(void);
1422bool ide_port_acpi(ide_hwif_t *hwif);
1422extern int ide_acpi_exec_tfs(ide_drive_t *drive); 1423extern int ide_acpi_exec_tfs(ide_drive_t *drive);
1423extern void ide_acpi_get_timing(ide_hwif_t *hwif); 1424extern void ide_acpi_get_timing(ide_hwif_t *hwif);
1424extern void ide_acpi_push_timing(ide_hwif_t *hwif); 1425extern void ide_acpi_push_timing(ide_hwif_t *hwif);
@@ -1427,6 +1428,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *);
1427extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); 1428extern void ide_acpi_set_state(ide_hwif_t *hwif, int on);
1428#else 1429#else
1429static inline int ide_acpi_init(void) { return 0; } 1430static inline int ide_acpi_init(void) { return 0; }
1431static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; }
1430static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } 1432static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; }
1431static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } 1433static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; }
1432static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } 1434static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; }