ide-pmac: bugfix for media-bay support rework

Fix bug introduced by:

commit 2dde7861
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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 80a65fc5
...@@ -556,7 +556,8 @@ static void media_bay_step(int i) ...@@ -556,7 +556,8 @@ static void media_bay_step(int i)
printk("mediabay %d, registering IDE...\n", i); printk("mediabay %d, registering IDE...\n", i);
pmu_suspend(); pmu_suspend();
ide_port_scan(bay->cd_port); 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(); pmu_resume();
} }
if (bay->cd_index == -1) { if (bay->cd_index == -1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment