summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 21:00:23 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 21:00:23 +0200
commitc1a8e39819bd6797ee2b82b88517268d39921b03 (patch)
treecfdb3ec4813e335215d15f8c8449b5547f4cd2d2 /drivers/macintosh
parentopti621: add PIO 4 support (diff)
downloadlinux-c1a8e39819bd6797ee2b82b88517268d39921b03.tar.xz
linux-c1a8e39819bd6797ee2b82b88517268d39921b03.zip
ide-pmac: bugfix for media-bay support rework
Fix bug introduced by: commit 2dde7861afa23cd59db83515cb0b810b92b220aa Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Fri Apr 18 00:46:23 2008 +0200 ide: rework PowerMac media-bay support (take 2) ... [ Yeah, I suck. ] bay->cd_index shouldn't be changed if IDE devices are not present or retry operations won't happen. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/mediabay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 82add26cc665..c34bdf852e32 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -556,7 +556,8 @@ static void media_bay_step(int i)
printk("mediabay %d, registering IDE...\n", i);
pmu_suspend();
ide_port_scan(bay->cd_port);
- bay->cd_index = bay->cd_port->index;
+ if (bay->cd_port->present)
+ bay->cd_index = bay->cd_port->index;
pmu_resume();
}
if (bay->cd_index == -1) {