[PATCH] powerpc: Fix ide-pmac sysfs entry

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon May 15 16:58:37 EST 2006


It looks like the generic ide code now wants ide_init_hwif_ports() to
set the parent struct device into the ide_hw structure (new field ?).
Without this, the mac ide code can cause the ide probing code to explode
in flames in sysfs registration due to what looks like a stale pointer
in there (happens when removing/re-inserting one of the hotswap media
bays on some laptops).

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---

Andew: That's a 2.6.17 candidate 

Index: linux-work/drivers/ide/ppc/pmac.c
===================================================================
--- linux-work.orig/drivers/ide/ppc/pmac.c	2006-04-19 15:04:47.000000000 +1000
+++ linux-work/drivers/ide/ppc/pmac.c	2006-05-15 16:43:20.000000000 +1000
@@ -553,6 +553,8 @@
 
 	if (irq != NULL)
 		*irq = pmac_ide[ix].irq;
+
+	hw->dev = &pmac_ide[ix].mdev->ofdev.dev;
 }
 
 #define PMAC_IDE_REG(x) ((void __iomem *)(IDE_DATA_REG+(x)))
 




More information about the Linuxppc-dev mailing list