aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:38 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:38 -0400
commit0d346ba0730d84f04022f9f984d3f606f69cef37 (patch)
tree0e68c29e5cbea6766cded4feb9274d87698f8b72 /include/linux/ide.h
parentd1d76714e2f0c520b6c2a84ab5b050d0b3244949 (diff)
ide: sanitize ide*_pm_* enums
* Move ide*_pm_* enums from ide-io.c to <linux/ide.h>. * idedisk_pm_* -> ide_pm_* * ide_pm_state_* -> ide_pm_* * No need to set ide_pm_* enums to the fixed values. * Uppercase ide_pm_* enums. * Fix/update comments. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h34
1 files changed, 16 insertions, 18 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index cf7ec3a9d173..02984f1f041a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -988,36 +988,34 @@ enum {
988} 988}
989 989
990/* 990/*
991 * Power Management step value (rq->pm->pm_step). 991 * Power Management state machine (rq->pm->pm_step).
992 * 992 *
993 * The step value starts at 0 (ide_pm_state_start_suspend) for a 993 * For each step, the core calls ide_start_power_step() first.
994 * suspend operation or 1000 (ide_pm_state_start_resume) for a
995 * resume operation.
996 *
997 * For each step, the core calls the subdriver start_power_step() first.
998 * This can return: 994 * This can return:
999 * - ide_stopped : In this case, the core calls us back again unless 995 * - ide_stopped : In this case, the core calls us back again unless
1000 * step have been set to ide_power_state_completed. 996 * step have been set to ide_power_state_completed.
1001 * - ide_started : In this case, the channel is left busy until an 997 * - ide_started : In this case, the channel is left busy until an
1002 * async event (interrupt) occurs. 998 * async event (interrupt) occurs.
1003 * Typically, start_power_step() will issue a taskfile request with 999 * Typically, ide_start_power_step() will issue a taskfile request with
1004 * do_rw_taskfile(). 1000 * do_rw_taskfile().
1005 * 1001 *
1006 * Upon reception of the interrupt, the core will call complete_power_step() 1002 * Upon reception of the interrupt, the core will call ide_complete_power_step()
1007 * with the error code if any. This routine should update the step value 1003 * with the error code if any. This routine should update the step value
1008 * and return. It should not start a new request. The core will call 1004 * and return. It should not start a new request. The core will call
1009 * start_power_step for the new step value, unless step have been set to 1005 * ide_start_power_step() for the new step value, unless step have been
1010 * ide_power_state_completed. 1006 * set to IDE_PM_COMPLETED.
1011 *
1012 * Subdrivers are expected to define their own additional power
1013 * steps from 1..999 for suspend and from 1001..1999 for resume,
1014 * other values are reserved for future use.
1015 */ 1007 */
1016
1017enum { 1008enum {
1018 ide_pm_state_completed = -1, 1009 IDE_PM_START_SUSPEND,
1019 ide_pm_state_start_suspend = 0, 1010 IDE_PM_FLUSH_CACHE = IDE_PM_START_SUSPEND,
1020 ide_pm_state_start_resume = 1000, 1011 IDE_PM_STANDBY,
1012
1013 IDE_PM_START_RESUME,
1014 IDE_PM_RESTORE_PIO = IDE_PM_START_RESUME,
1015 IDE_PM_IDLE,
1016 IDE_PM_RESTORE_DMA,
1017
1018 IDE_PM_COMPLETED,
1021}; 1019};
1022 1020
1023/* 1021/*