- do_retry = 0;
- retries = 0;
-
- /* Warning: This will be tricky to read */
- while (retries <= 1) {
- /* check signature */
- if ((ide_inb(device,ATA_SECT_CNT) == 0x01) &&
- (ide_inb(device,ATA_SECT_NUM) == 0x01) &&
- (ide_inb(device,ATA_CYL_LOW) == 0x14) &&
- (ide_inb(device,ATA_CYL_HIGH) == 0xEB)) {
- /* ATAPI Signature found */
- dev_desc->if_type=IF_TYPE_ATAPI;
- /* Start Ident Command
- */
- ide_outb (device, ATA_COMMAND, ATAPI_CMD_IDENT);
- /*
- * Wait for completion - ATAPI devices need more time
- * to become ready
- */
- c = ide_wait (device, ATAPI_TIME_OUT);
- } else
-#endif
- {
- /* Start Ident Command
- */
- ide_outb (device, ATA_COMMAND, ATA_CMD_IDENT);
-
- /* Wait for completion
- */
- c = ide_wait (device, IDE_TIME_OUT);
- }
- ide_led (DEVICE_LED(device), 0); /* LED off */
-
- if (((c & ATA_STAT_DRQ) == 0) ||
- ((c & (ATA_STAT_FAULT|ATA_STAT_ERR)) != 0) ) {
-#ifdef CONFIG_ATAPI
-#ifdef CONFIG_AMIGAONEG3SE
- s = getenv("ide_doreset");
- if (s && strcmp(s, "on") == 0)
+ retries = 0;
+
+ /* Warning: This will be tricky to read */
+ while (retries <= 1) {
+ /* check signature */
+ if ((ide_inb(device, ATA_SECT_CNT) == 0x01) &&
+ (ide_inb(device, ATA_SECT_NUM) == 0x01) &&
+ (ide_inb(device, ATA_CYL_LOW) == 0x14) &&
+ (ide_inb(device, ATA_CYL_HIGH) == 0xEB)) {
+ /* ATAPI Signature found */
+ dev_desc->if_type = IF_TYPE_ATAPI;
+ /*
+ * Start Ident Command
+ */
+ ide_outb(device, ATA_COMMAND, ATAPI_CMD_IDENT);
+ /*
+ * Wait for completion - ATAPI devices need more time
+ * to become ready
+ */
+ c = ide_wait(device, ATAPI_TIME_OUT);
+ } else