aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-13 11:47:49 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-13 11:47:49 -0400
commit74af21cf4d0ab67df53608753a443dc7904ec12e (patch)
tree0e5cbfdc12dbd00fcde2ccf08c7df59e3424ff11 /include
parentfd553ce86893e0a54ec0d07d1f1d241f2fb2aef3 (diff)
ide: add __ide_wait_stat() helper
* Split off checking of the status register from ide_wait_stat() to __ide_wait_stat() helper. * Use the new helper in ide_config_drive_speed(). The only change in the functionality is that the function now fails if after 20 sec (WAIT_CMD) device is still busy (BUSY_STAT bit is set) while previously instead of failing the function continued with checking for the correct device status (which would give the device additional 10 usec to clear BUSY_STAT bit). * Remove stale comment for ide_config_drive_speed(). * Remove duplicate comment for ide_wait_stat() from <linux/ide.h>. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ide.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 85d448b4abec..3a8cb81bb61d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1079,16 +1079,7 @@ extern void ide_fix_driveid(struct hd_driveid *);
1079 */ 1079 */
1080extern void ide_fixstring(u8 *, const int, const int); 1080extern void ide_fixstring(u8 *, const int, const int);
1081 1081
1082/* 1082int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
1083 * This routine busy-waits for the drive status to be not "busy".
1084 * It then checks the status for all of the "good" bits and none
1085 * of the "bad" bits, and if all is okay it returns 0. All other
1086 * cases return 1 after doing "*startstop = ide_error()", and the
1087 * caller should return the updated value of "startstop" in this case.
1088 * "startstop" is unchanged when the function returns 0;
1089 * (startstop, drive, good, bad, timeout)
1090 */
1091extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
1092 1083
1093/* 1084/*
1094 * Start a reset operation for an IDE interface. 1085 * Start a reset operation for an IDE interface.