From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Andy Whitcroft <apw@shadowen.org>,
Martin Bligh <mbligh@google.com>, Andrew Morton <akpm@osdl.org>,
Steve Fox <drfickle@us.ibm.com>
Subject: Re: 2.6.19-rc3-mm1 -- missing network adaptors
Date: Tue, 31 Oct 2006 09:03:08 +0100 [thread overview]
Message-ID: <20061031090308.1435295a@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20061030211432.6ed62405@gondolin.boeblingen.de.ibm.com>
On Mon, 30 Oct 2006 21:14:32 +0100,
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> With CONFIG_SYSFS_DEPRECATED set, you'll get errors for devices which
> have no parent set. The kobject's parent is set to the class
> subsystem's kobject, meaning there is a child with name bus_id (e.
> g. /sys/class/net/lo). Unfortunately, we also try to create a link
> named bus_id in /sys/class/<foo>, which will fail with -EEXIST... We
> should probably drop that link if we have no parent.
You can use the following as a band-aid (everything looks sane on my
system), although you will still have problems if your setup tools
can't cope with symlinks :/ (a link is still created for devices with
real parents).
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
drivers/base/core.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
--- linux-2.6-CH.orig/drivers/base/core.c
+++ linux-2.6-CH/drivers/base/core.c
@@ -368,6 +368,12 @@ static void klist_children_put(struct kl
static int device_add_class_symlinks(struct device *dev)
{
int error;
+ int create_link =
+#ifdef CONFIG_SYSFS_DEPRECATED
+ dev->parent ? 1 : 0;
+#else
+ 1;
+#endif
if (!dev->class)
return 0;
@@ -375,10 +381,12 @@ static int device_add_class_symlinks(str
"subsystem");
if (error)
goto out;
- error = sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
- dev->bus_id);
- if (error)
- goto out_subsys;
+ if (create_link) {
+ error = sysfs_create_link(&dev->class->subsys.kset.kobj,
+ &dev->kobj, dev->bus_id);
+ if (error)
+ goto out_subsys;
+ }
#ifdef CONFIG_SYSFS_DEPRECATED
if (dev->parent) {
char *class_name;
@@ -407,7 +415,8 @@ out_device:
sysfs_remove_link(&dev->kobj, "device");
out_busid:
#endif
- sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
+ if (create_link)
+ sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
out_subsys:
sysfs_remove_link(&dev->kobj, "subsystem");
out:
next prev parent reply other threads:[~2006-10-31 8:02 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 0:00 2.6.19-rc3-mm1 Andrew Morton
2006-10-30 2:50 ` 2.6.19-rc3-mm1 Dave Jones
2006-10-30 3:54 ` 2.6.19-rc3-mm1 Greg KH
2006-10-30 5:16 ` 2.6.19-rc3-mm1 Andrew Morton
2006-10-30 5:56 ` 2.6.19-rc3-mm1 Greg KH
2006-10-30 19:55 ` 2.6.19-rc3-mm1 - ATI SATA controller not detected Rafael J. Wysocki
2006-10-30 20:04 ` Greg KH
2006-10-30 20:15 ` 2.6.19-rc3-mm1 - udev doesn't work (was: ATI SATA controller not detected) Rafael J. Wysocki
2006-10-30 20:22 ` Greg KH
2006-10-30 20:48 ` Rafael J. Wysocki
2006-10-30 20:57 ` Greg KH
2006-10-31 0:19 ` Rafael J. Wysocki
2006-10-31 7:29 ` Rafael J. Wysocki
2006-10-31 7:40 ` Andrew Morton
2006-10-31 7:48 ` Rafael J. Wysocki
2006-10-31 7:58 ` Andrew Morton
2006-11-02 2:29 ` 2.6.19-rc3-mm1 - udev doesn't work Andy Whitcroft
2006-10-30 20:36 ` Jeff Garzik
2006-10-30 20:45 ` Rafael J. Wysocki
2006-10-30 10:36 ` 2.6.19-rc3-mm1 Reuben Farrelly
2006-10-30 16:53 ` 2.6.19-rc3-mm1 Om Narasimhan
2006-10-30 15:25 ` 2.6.19-rc3-mm1 -- missing network adaptors Andy Whitcroft
2006-10-30 15:47 ` Martin J. Bligh
2006-10-30 16:47 ` Andrew Morton
2006-10-30 17:09 ` Martin Bligh
2006-10-30 17:21 ` Andy Whitcroft
2006-10-30 20:14 ` Cornelia Huck
2006-10-31 6:30 ` Mike Galbraith
2006-10-31 6:37 ` Martin J. Bligh
2006-10-31 6:54 ` Mike Galbraith
2006-10-31 7:13 ` Greg KH
2006-10-31 7:15 ` Mike Galbraith
2006-10-31 7:21 ` Greg KH
2006-10-31 7:31 ` Mike Galbraith
2006-10-31 8:03 ` Mike Galbraith
2006-10-31 19:07 ` Greg KH
2006-10-31 6:59 ` Greg KH
2006-10-31 7:09 ` Mike Galbraith
2006-10-31 7:22 ` Greg KH
2006-10-31 16:28 ` Mike Galbraith
2006-10-31 18:14 ` Mike Galbraith
2006-11-01 4:43 ` Mike Galbraith
2006-11-01 5:25 ` Andrew Morton
2006-11-01 6:12 ` Mike Galbraith
2006-11-01 7:43 ` Mike Galbraith
2006-11-01 9:26 ` Mike Galbraith
2006-11-01 18:48 ` Andrew Morton
2006-11-01 20:13 ` Greg KH
2006-11-01 21:15 ` Mike Galbraith
2006-10-31 7:30 ` Martin J. Bligh
2006-10-31 7:58 ` Greg KH
2006-10-31 15:52 ` Martin J. Bligh
2006-10-31 16:46 ` Cornelia Huck
2006-10-31 17:09 ` Martin J. Bligh
2006-10-31 17:29 ` Cornelia Huck
2006-10-31 17:55 ` Andy Whitcroft
2006-11-01 1:39 ` Martin Bligh
2006-11-01 2:08 ` Greg KH
2006-11-01 2:11 ` Martin Bligh
2006-11-01 16:43 ` Greg KH
2006-11-02 5:24 ` Greg KH
2006-11-02 5:26 ` Martin J. Bligh
2006-11-02 5:49 ` Greg KH
2006-11-02 5:54 ` Mike Galbraith
2006-11-02 6:02 ` Greg KH
2006-11-02 6:07 ` Andrew Morton
2006-11-02 6:42 ` Greg KH
2006-11-02 6:49 ` Andrew Morton
2006-11-02 6:56 ` Greg KH
2006-11-02 9:22 ` Andy Whitcroft
2006-11-02 10:26 ` Cornelia Huck
2006-11-03 0:57 ` Greg KH
2006-11-02 6:32 ` Martin J. Bligh
2006-11-02 6:41 ` Andrew Morton
2006-11-01 10:00 ` Andy Whitcroft
2006-10-31 21:31 ` Greg KH
2006-11-01 4:44 ` Mike Galbraith
2006-10-31 7:36 ` Mike Galbraith
2006-10-31 8:03 ` Cornelia Huck [this message]
2006-10-30 20:38 ` Andy Whitcroft
2006-10-31 1:03 ` Andy Whitcroft
2006-10-31 1:26 ` [2.6.19-rc3-mm1] BUG at arch/i386/mm/pageattr.c:165 Andrew James Wade
2006-10-31 2:04 ` Andrew Morton
2006-10-31 3:03 ` Andrew James Wade
2006-10-31 3:13 ` Andrew Morton
2006-10-31 3:58 ` Andrew James Wade
2006-10-31 4:11 ` Andrew Morton
2006-10-31 4:20 ` Greg KH
2006-10-31 5:09 ` Andrew James Wade
2006-11-01 16:25 ` Andrew James Wade
2006-10-31 5:10 ` Andrew Morton
2006-10-31 6:31 ` Mike Galbraith
2006-10-31 7:03 ` Greg KH
2006-10-31 7:34 ` Andrew Morton
2006-10-31 7:48 ` Andrew Morton
2006-10-31 8:01 ` Greg KH
2006-10-31 8:12 ` Andrew Morton
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=20061031090308.1435295a@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=drfickle@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.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 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®