All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@transmeta.com>,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH] IDE (& PowerMac): Let an hwif have a real parent
Date: 10 Aug 2003 16:12:06 +0200	[thread overview]
Message-ID: <1060524726.595.13.camel@gaston> (raw)

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,
Ben.

# 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
higher.
# 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	benh@kernel.crashing.org	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 @@
 	strlcpy(hwif->gendev.bus_id,hwif->name,BUS_ID_SIZE);
 	snprintf(hwif->gendev.name,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;
 	else
 		hwif->gendev.parent = NULL; /* Would like to do = &device_legacy */
+	}
 	device_register(&hwif->gendev);
 }
 

-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>

             reply	other threads:[~2003-08-10 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-10 14:12 Benjamin Herrenschmidt [this message]
2003-08-10 14:33 ` [PATCH] IDE (& PowerMac): Let an hwif have a real parent Bartlomiej Zolnierkiewicz
2003-08-10 20:31   ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1060524726.595.13.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.