Skip to contentSkip to conversation

Support IDE secondary disk without primary disk.

PATCH New ito at mlb.co.jp 1 participant 1 message Apr 5, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support IDE secondary disk without primary disk.

Hello

Current u-boot does not search disks on secondary port if there is no disks on primary port.

this patch fixes this problem.

CHANGELOG:

* Support IDE secondary disk without primary disk. Patch by Hiroshi Ito, 5 Apr 2006
-------------- next part --------------

common/cmd_ide.c +4 -3
index 41621ba..f37aa07 100644
@@ -617,10 +617,11 @@ void ide_init (void)
 		if (s) ata_reset_time = 2*simple_strtol(s, NULL, 10);
 #endif
 		i = 0;
-		do {
+		for (;;) {
 			udelay (10000);		/* 10 ms */
 
 			c = ide_inb (dev, ATA_STATUS);
+			if (!(c & ATA_STAT_BUSY)) break;
 			i++;
 #ifdef CONFIG_AMIGAONEG3SE
 			if (i > (ata_reset_time * 100)) {
@@ -636,12 +637,12 @@ void ide_init (void)
 					goto skip_bus;
 				}
 #endif
-				return;
+				break;
 			}
 			if ((i >= 100) && ((i%100)==0)) {
 				putc ('.');
 			}
-		} while (c & ATA_STAT_BUSY);
+		}
 
 		if (c & (ATA_STAT_BUSY | ATA_STAT_FAULT)) {
 			puts ("not available  ");