Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77245
b: refs/heads/master
c: 795d74b
h: refs/heads/master
i:
  77243: b51869e
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 26, 2008
1 parent ac9f068 commit 17f0f63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f01393e48c44e30f7c9a36c8b98a07b0232580fe
refs/heads/master: 795d74b51a853e1f5f2c81baf6666836a3866f08
12 changes: 10 additions & 2 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,15 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
int index, retry = 1;
ide_hwif_t *hwif;

if (initializing) {
hwif = ide_find_port(hw->io_ports[IDE_DATA_OFFSET]);
if (hwif) {
index = hwif->index;
goto found;
}
return -1;
}

do {
for (index = 0; index < MAX_HWIFS; ++index) {
hwif = &ide_hwifs[index];
Expand All @@ -704,8 +713,7 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
hwif = &ide_hwifs[index];
if (hwif->hold)
continue;
if ((!hwif->present && !hwif->mate && !initializing) ||
(!hwif->io_ports[IDE_DATA_OFFSET] && initializing))
if (!hwif->present && hwif->mate == NULL)
goto found;
}
for (index = 0; index < MAX_HWIFS; index++)
Expand Down

0 comments on commit 17f0f63

Please sign in to comment.