[lkml]   [2003]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] IDE (& PowerMac): Let an hwif have a real parent
Hi Linus & Bart !

This patch allows an IDE hwif to be set a "parent" field so it
can really descend from any struct device, typically the macio_device
I use on pmac, and not only a PCI device or the legacy stuff.

This should work fine as long as hwif->gendev.parent doesn't
contain junk, but so far, it seems it really only contains
NULL unless specifically set by the host driver.

Without that, the pmac driver will not appear in it's proper
location in the device tree, which is a real problem for power
management as it won't be ordered properly with it's hosting
asic (and mediabay if any), thus breaking suspend/resume.

Please apply,

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or
# This patch includes the following deltas:
# ChangeSet 1.1138 -> 1.1139
# drivers/ide/ide-probe.c 1.56 -> 1.57
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/10 1.1139
# Allow an ide controller to have a parent that isn't the pci_dev nor
the legacy stuff
# --------------------------------------------
diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
--- a/drivers/ide/ide-probe.c Sun Aug 10 16:07:40 2003
+++ b/drivers/ide/ide-probe.c Sun Aug 10 16:07:40 2003
@@ -650,10 +650,12 @@
snprintf(hwif->,DEVICE_NAME_SIZE,"IDE Controller");
hwif->gendev.driver_data = hwif;
+ if (hwif->gendev.parent == NULL) {
if (hwif->pci_dev)
hwif->gendev.parent = &hwif->pci_dev->dev;
hwif->gendev.parent = NULL; /* Would like to do = &device_legacy */
+ }

Benjamin Herrenschmidt <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.185 / U:4.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site