]> err.no Git - linux-2.6/commitdiff
ide-pmac: bugfix for media-bay support rework
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 15 Jun 2008 19:00:23 +0000 (21:00 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 15 Jun 2008 19:00:23 +0000 (21:00 +0200)
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>
drivers/macintosh/mediabay.c

index 82add26cc665d317d43cfcef389daab925164713..c34bdf852e32a48c6fa788ae39e4a324989f991a 100644 (file)
@@ -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) {