From 74af21cf4d0ab67df53608753a443dc7904ec12e Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sat, 13 Oct 2007 17:47:49 +0200 Subject: 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 . Cc: Benjamin Herrenschmidt Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/ide.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'include/linux') 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 *); */ extern void ide_fixstring(u8 *, const int, const int); -/* - * This routine busy-waits for the drive status to be not "busy". - * It then checks the status for all of the "good" bits and none - * of the "bad" bits, and if all is okay it returns 0. All other - * cases return 1 after doing "*startstop = ide_error()", and the - * caller should return the updated value of "startstop" in this case. - * "startstop" is unchanged when the function returns 0; - * (startstop, drive, good, bad, timeout) - */ -extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); +int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); /* * Start a reset operation for an IDE interface. -- cgit v1.2.1