[PATCH 1/7] ide-pmac: bugfix for media-bay support rework

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Thursday, June 12, 2008 - 4:12 pm

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>
---
first three patches are meant for 2.6.26, the rest for 2.6.27

drivers/macintosh/mediabay.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/macintosh/mediabay.c
===================================================================
--- 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) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] ide-pmac: bugfix for media-bay support rework, Bartlomiej Zolnierki ..., (Thu Jun 12, 4:12 pm)
[PATCH 2/7] ide-pmac: add -&gt;cable_detect method, Bartlomiej Zolnierki ..., (Thu Jun 12, 4:12 pm)
[PATCH 3/7] ide-pmac: remove bogus comment about pmac_ide_ ..., Bartlomiej Zolnierki ..., (Thu Jun 12, 4:12 pm)
[PATCH 4/7] ide-pmac: media-bay support fixes, Bartlomiej Zolnierki ..., (Thu Jun 12, 4:12 pm)
[PATCH 5/7] ide-pmac: store pmif instead of hwif in -&gt;driv ..., Bartlomiej Zolnierki ..., (Thu Jun 12, 4:13 pm)
[PATCH 6/7] ide-pmac: add -&gt;init_dev method, Bartlomiej Zolnierki ..., (Thu Jun 12, 4:13 pm)
[PATCH 7/7] ide-pmac: move ide_find_port() call to pmac_id ..., Bartlomiej Zolnierki ..., (Thu Jun 12, 4:13 pm)