Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114172
b: refs/heads/master
c: 75d21ff
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2008
1 parent 43a4f6b commit c018872
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 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: 452a8ed8ce752a423013cfade1bbca5f13fd16eb
refs/heads/master: 75d21fffd85fdb0a1d7238cf5996022d7bf424dd
25 changes: 9 additions & 16 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
}
}

#if MAX_HWIFS > 1
/*
* save_match() is used to simplify logic in init_irq() below.
*
Expand All @@ -872,7 +871,6 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */
*match = new;
}
#endif /* MAX_HWIFS > 1 */

/*
* init request queue
Expand Down Expand Up @@ -1029,7 +1027,7 @@ static int init_irq (ide_hwif_t *hwif)

mutex_lock(&ide_cfg_mtx);
hwif->hwgroup = NULL;
#if MAX_HWIFS > 1

/*
* Group up with any other hwifs that share our irq(s).
*/
Expand All @@ -1054,7 +1052,7 @@ static int init_irq (ide_hwif_t *hwif)
}
}
}
#endif /* MAX_HWIFS > 1 */

/*
* If we are still without a hwgroup, then form a new one
*/
Expand Down Expand Up @@ -1513,19 +1511,14 @@ static int ide_find_port_slot(const struct ide_port_info *d)
* ports 0x1f0/0x170 (the ide0/ide1 defaults).
*/
mutex_lock(&ide_cfg_mtx);
if (MAX_HWIFS == 1) {
if (ide_indexes == 0 && i == 0)
idx = 1;
if (bootable) {
if ((ide_indexes | i) != (1 << MAX_HWIFS) - 1)
idx = ffz(ide_indexes | i);
} else {
if (bootable) {
if ((ide_indexes | i) != (1 << MAX_HWIFS) - 1)
idx = ffz(ide_indexes | i);
} else {
if ((ide_indexes | 3) != (1 << MAX_HWIFS) - 1)
idx = ffz(ide_indexes | 3);
else if ((ide_indexes & 3) != 3)
idx = ffz(ide_indexes);
}
if ((ide_indexes | 3) != (1 << MAX_HWIFS) - 1)
idx = ffz(ide_indexes | 3);
else if ((ide_indexes & 3) != 3)
idx = ffz(ide_indexes);
}
if (idx >= 0)
ide_indexes |= (1 << idx);
Expand Down

0 comments on commit c018872

Please sign in to comment.