Give ATA device a bit more time on first try in order to allow disks

to spin up.

	* grub-core/disk/ata.c (grub_atapi_identify): Use GRUB_ATA_TOUT_DEV_INIT
	if dev->present is 1. Reset dev->present on failure.
	(grub_ata_device_initialize): Set dev->present to 1.
	* include/grub/ata.h (GRUB_ATA_TOUT_DEV_INIT): New value.
	(grub_ata_device): New member 'present'.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-13 21:41:18 +02:00
parent bda0e21993
commit 36084912c0
3 changed files with 40 additions and 11 deletions

View file

@ -94,7 +94,8 @@ enum grub_ata_commands
enum grub_ata_timeout_milliseconds
{
GRUB_ATA_TOUT_STD = 1000, /* 1s standard timeout. */
GRUB_ATA_TOUT_DATA = 10000 /* 10s DATA I/O timeout. */
GRUB_ATA_TOUT_DATA = 10000, /* 10s DATA I/O timeout. */
GRUB_ATA_TOUT_DEV_INIT = 10000, /* Give the device 10s on first try to spinon. */
};
struct grub_ata_device
@ -128,6 +129,8 @@ struct grub_ata_device
/* Set to 0 for ATA, set to 1 for ATAPI. */
int atapi;
int present;
struct grub_ata_device *next;
};