mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ieee1394: eth1394: bring back a parent device
@ 2007-05-26 10:08 Stefan Richter
  2007-05-27  6:33 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Richter @ 2007-05-26 10:08 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-kernel, Greg KH

I will submit this for 2.6.22-rc and 2.6.21.y if nobody objects.

Date: Mon, 21 May 2007 01:05:41 +0200
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: ieee1394: eth1394: bring back a parent device

This adds a real parent device to eth1394's ethX device like in Linux
2.6.20 and older.  However, due to unfinished conversion of the ieee1394
away from class_device, we now refer to the FireWire controller's PCI
device as the parent, not to the ieee1394 driver's fw-host device.

Having a real parent device instead of a virtual one allows udev scripts
to distinguish eth1394 interfaces from networking bridges, bondings and
the likes.

Fixes a regression since 2.6.21:
https://bugs.gentoo.org/show_bug.cgi?id=177199

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/ieee1394/eth1394.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Index: linux-2.6.22-rc2/drivers/ieee1394/eth1394.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/ieee1394/eth1394.c
+++ linux-2.6.22-rc2/drivers/ieee1394/eth1394.c
@@ -599,10 +599,9 @@ static void ether1394_add_host(struct hp
 	}
 
 	SET_MODULE_OWNER(dev);
-#if 0
-	/* FIXME - Is this the correct parent device anyway? */
-	SET_NETDEV_DEV(dev, &host->device);
-#endif
+
+	/* This used to be &host->device in Linux 2.6.20 and before. */
+	SET_NETDEV_DEV(dev, host->device.parent);
 
 	priv = netdev_priv(dev);
 	INIT_LIST_HEAD(&priv->ip_node_list);

-- 
Stefan Richter
-=====-=-=== -=-= ==-=-
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-27  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-26 10:08 [PATCH] ieee1394: eth1394: bring back a parent device Stefan Richter
2007-05-27  6:33 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®