linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
       [not found] <20070304220857.GH23311@waste.org>
@ 2007-03-04 23:39 ` Johannes Berg
  2007-03-05  0:25   ` Matt Mackall
  0 siblings, 1 reply; 29+ messages in thread
From: Johannes Berg @ 2007-03-04 23:39 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Greg KH, linux-kernel, netdev, yi.zhu, jketreno, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]

[adding linux-wireless to CC]

On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> Recent kernels are having troubles with wireless for me. Two seemingly
> related problems:

I don't think they are related actually.

> a) NetworkManager seems oblivious to the existence of my IPW2200

This is due to the recent sysfs restructuring I think. IIRC the fix is
to upgrade hal to a current git version.

> b) Manual iwconfig waits for 60s and then reports:

That one's strange.

> A second attempt to enable WEP via iwconfig succeeds and network
> connectivity is normal. However, NetworkManager still ignores the
> device at this point.

I'd think it's a ipw bug but I have no idea if that was even touched
during this time.

> Bisect with Mercurial points to this patch:
> 
> $ hg bisect bad
> The first bad revision is:
> changeset:   46985:f701b96bb2f7
> user:        Greg Kroah-Hartman <gregkh@suse.de>
> date:        Wed Feb 07 10:37:11 2007 -0800
> summary:     Network: convert network devices to use struct device
> instead of class_device
> 
> which corresponds to 43cb76d91ee85f579a69d42bc8efc08bac560278 in git.

Yup, sysfs breakage/hal stuff. Can you try with a recent hal? And maybe
try to bisect the iwconfig stop thing if you've got enough time...

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-04 23:39 ` Recent wireless breakage (ipw2200, iwconfig, NetworkManager) Johannes Berg
@ 2007-03-05  0:25   ` Matt Mackall
  2007-03-05  0:45     ` Andrew Morton
                       ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Matt Mackall @ 2007-03-05  0:25 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Greg KH, linux-kernel, netdev, yi.zhu, jketreno, linux-wireless,
	akpm

On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> [adding linux-wireless to CC]
> 
> On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > Recent kernels are having troubles with wireless for me. Two seemingly
> > related problems:
> 
> I don't think they are related actually.
> 
> > a) NetworkManager seems oblivious to the existence of my IPW2200
> 
> This is due to the recent sysfs restructuring I think. IIRC the fix is
> to upgrade hal to a current git version.

If that's the cause, the fix is to back out whatever was done to break
userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
2.6.x+1 should not entail replacing substantial parts of userspace,
especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE. 

I will try a new HAL when it shows up in Debian/unstable and not a
moment sooner.

> > b) Manual iwconfig waits for 60s and then reports:
> 
> That one's strange.
> 
> > A second attempt to enable WEP via iwconfig succeeds and network
> > connectivity is normal. However, NetworkManager still ignores the
> > device at this point.
> 
> I'd think it's a ipw bug but I have no idea if that was even touched
> during this time.
> 
> > Bisect with Mercurial points to this patch:
> > 
> > $ hg bisect bad
> > The first bad revision is:
> > changeset:   46985:f701b96bb2f7
> > user:        Greg Kroah-Hartman <gregkh@suse.de>
> > date:        Wed Feb 07 10:37:11 2007 -0800
> > summary:     Network: convert network devices to use struct device
> > instead of class_device
> > 
> > which corresponds to 43cb76d91ee85f579a69d42bc8efc08bac560278 in git.
> 
> Yup, sysfs breakage/hal stuff. Can you try with a recent hal? And maybe
> try to bisect the iwconfig stop thing if you've got enough time...

Will double-check the iwconfig tests. It's been masked by
NetworkManager for a while.

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  0:25   ` Matt Mackall
@ 2007-03-05  0:45     ` Andrew Morton
  2007-03-05  1:05       ` Adrian Bunk
  2007-03-05  0:46     ` Ian McDonald
  2007-03-05  1:17     ` Greg KH
  2 siblings, 1 reply; 29+ messages in thread
From: Andrew Morton @ 2007-03-05  0:45 UTC (permalink / raw)
  To: Matt Mackall, Adrian Bunk
  Cc: Johannes Berg, Greg KH, linux-kernel, netdev, yi.zhu, jketreno,
	linux-wireless

On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall <mpm@selenic.com> wrote:

> On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > [adding linux-wireless to CC]
> > 
> > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > related problems:
> > 
> > I don't think they are related actually.
> > 
> > > a) NetworkManager seems oblivious to the existence of my IPW2200
> > 
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
> 
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE. 

yep.  Adrian, I think we should track this as a blocking regression, at
least until we've fully understood the implications and had the usual
arguments.

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  0:25   ` Matt Mackall
  2007-03-05  0:45     ` Andrew Morton
@ 2007-03-05  0:46     ` Ian McDonald
  2007-03-05  1:17     ` Greg KH
  2 siblings, 0 replies; 29+ messages in thread
From: Ian McDonald @ 2007-03-05  0:46 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Johannes Berg, Greg KH, linux-kernel, netdev, yi.zhu, jketreno,
	linux-wireless, akpm

On 3/5/07, Matt Mackall <mpm@selenic.com> wrote:
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
>
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE.
>
> I will try a new HAL when it shows up in Debian/unstable and not a
> moment sooner.
>
But you're running a kernel that's not in Debian/unstable so this
seems a bit hypocritical.

When you work with bleeding edge kernels you have to be prepared to
work around things. Hell for ages git wasn't in Debian - unstable
even, udev would break things etc.

Just my 2c worth.
-- 
Web: http://wand.net.nz/~iam4
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  0:45     ` Andrew Morton
@ 2007-03-05  1:05       ` Adrian Bunk
  0 siblings, 0 replies; 29+ messages in thread
From: Adrian Bunk @ 2007-03-05  1:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matt Mackall, Johannes Berg, Greg KH, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless

On Sun, Mar 04, 2007 at 04:45:25PM -0800, Andrew Morton wrote:
> On Sun, 4 Mar 2007 18:25:50 -0600 Matt Mackall <mpm@selenic.com> wrote:
> 
> > On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > > [adding linux-wireless to CC]
> > > 
> > > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > > related problems:
> > > 
> > > I don't think they are related actually.
> > > 
> > > > a) NetworkManager seems oblivious to the existence of my IPW2200
> > > 
> > > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > > to upgrade hal to a current git version.
> > 
> > If that's the cause, the fix is to back out whatever was done to break
> > userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> > 2.6.x+1 should not entail replacing substantial parts of userspace,
> > especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE. 
> 
> yep.  Adrian, I think we should track this as a blocking regression, at
> least until we've fully understood the implications and had the usual
> arguments.

I'm currently tracking it as one of the 31 2.6.21-rc regressions that 
are not yet fixed in Linus' tree, and for me each of them is a blocker
until proven otherwise.

Whether Linus releases 2.6.21 despite blocking regressions is a 
different question...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  0:25   ` Matt Mackall
  2007-03-05  0:45     ` Andrew Morton
  2007-03-05  0:46     ` Ian McDonald
@ 2007-03-05  1:17     ` Greg KH
  2007-03-05 11:20       ` Johannes Berg
  2007-03-05 12:59       ` Theodore Tso
  2 siblings, 2 replies; 29+ messages in thread
From: Greg KH @ 2007-03-05  1:17 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Johannes Berg, linux-kernel, netdev, yi.zhu, jketreno,
	linux-wireless, akpm

On Sun, Mar 04, 2007 at 06:25:50PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 12:39:24AM +0100, Johannes Berg wrote:
> > [adding linux-wireless to CC]
> > 
> > On Sun, 2007-03-04 at 16:08 -0600, Matt Mackall wrote:
> > > Recent kernels are having troubles with wireless for me. Two seemingly
> > > related problems:
> > 
> > I don't think they are related actually.
> > 
> > > a) NetworkManager seems oblivious to the existence of my IPW2200
> > 
> > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > to upgrade hal to a current git version.
> 
> If that's the cause, the fix is to back out whatever was done to break
> userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> 2.6.x+1 should not entail replacing substantial parts of userspace,
> especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE. 

I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
enabled with that patch.  If that is enabled, and that patch still
causes problems, please let me know.

thanks,

greg k-h

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  1:17     ` Greg KH
@ 2007-03-05 11:20       ` Johannes Berg
  2007-03-05 12:59       ` Theodore Tso
  1 sibling, 0 replies; 29+ messages in thread
From: Johannes Berg @ 2007-03-05 11:20 UTC (permalink / raw)
  To: Greg KH
  Cc: Matt Mackall, linux-kernel, netdev, yi.zhu, jketreno,
	linux-wireless, akpm

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

On Sun, 2007-03-04 at 17:17 -0800, Greg KH wrote:

> > > This is due to the recent sysfs restructuring I think. IIRC the fix is
> > > to upgrade hal to a current git version.
> > 
> > If that's the cause, the fix is to back out whatever was done to break
> > userspace. Breaking userspace is not ok. Upgrading from 2.6.x to
> > 2.6.x+1 should not entail replacing substantial parts of userspace,
> > especially with NOT-EVEN-FRAKKING-RELEASED-YET CODE. 
> 
> I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> enabled with that patch.  If that is enabled, and that patch still
> causes problems, please let me know.

Yeah, sorry for not mentioning that in my original email and the
discussion it stirred.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05  1:17     ` Greg KH
  2007-03-05 11:20       ` Johannes Berg
@ 2007-03-05 12:59       ` Theodore Tso
  2007-03-05 18:58         ` Greg KH
  2007-03-06  0:35         ` Recent wireless breakage (ipw2200, iwconfig, NetworkManager) Johannes Berg
  1 sibling, 2 replies; 29+ messages in thread
From: Theodore Tso @ 2007-03-05 12:59 UTC (permalink / raw)
  To: Greg KH
  Cc: Matt Mackall, Johannes Berg, linux-kernel, netdev, yi.zhu,
	jketreno, linux-wireless, akpm

On Sun, Mar 04, 2007 at 05:17:29PM -0800, Greg KH wrote:
> I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> enabled with that patch.  If that is enabled, and that patch still
> causes problems, please let me know.

But we still need to update the help text for CONFIG_SYS_DEPRECATED to
make it clear that its deprecation schedule still needs to be 2009 to
2011 (depending on whether we want to accomodate Debian's glacial
release schedule).  Certainly the 2006 date which is currently there
simply isn't accurate.

						- Ted

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 12:59       ` Theodore Tso
@ 2007-03-05 18:58         ` Greg KH
  2007-03-05 19:55           ` Matt Mackall
                             ` (2 more replies)
  2007-03-06  0:35         ` Recent wireless breakage (ipw2200, iwconfig, NetworkManager) Johannes Berg
  1 sibling, 3 replies; 29+ messages in thread
From: Greg KH @ 2007-03-05 18:58 UTC (permalink / raw)
  To: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 07:59:50AM -0500, Theodore Tso wrote:
> On Sun, Mar 04, 2007 at 05:17:29PM -0800, Greg KH wrote:
> > I should not have broken any userspace if CONFIG_SYSFS_DEPRECATED is
> > enabled with that patch.  If that is enabled, and that patch still
> > causes problems, please let me know.
> 
> But we still need to update the help text for CONFIG_SYS_DEPRECATED to
> make it clear that its deprecation schedule still needs to be 2009 to
> 2011 (depending on whether we want to accomodate Debian's glacial
> release schedule).  Certainly the 2006 date which is currently there
> simply isn't accurate.

Ok, how about the following patch.  Is it acceptable to everyone?

thanks,

greg k-h

---
 init/Kconfig |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/init/Kconfig
+++ gregkh-2.6/init/Kconfig
@@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
 	  that belong to a class, back into the /sys/class heirachy, in
 	  order to support older versions of udev.
 
-	  If you are using a distro that was released in 2006 or later,
-	  it should be safe to say N here.
+	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
+	  release from 2007 or later, it should be safe to say N here.
+
+	  If you are using Debian or other distros that are slow to
+	  update HAL, please say Y here.
+
+	  If you have any problems with devices not being found properly
+	  from userspace programs, and this option is disabled, say Y
+	  here.
+
+	  If you are unsure about this at all, say Y.
 
 config RELAY
 	bool "Kernel->user space relay support (formerly relayfs)"

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 18:58         ` Greg KH
@ 2007-03-05 19:55           ` Matt Mackall
  2007-03-05 22:39             ` Greg KH
  2007-03-05 23:05           ` Jeffrey Hundstad
  2007-03-05 23:40           ` [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED Adrian Bunk
  2 siblings, 1 reply; 29+ messages in thread
From: Matt Mackall @ 2007-03-05 19:55 UTC (permalink / raw)
  To: Greg KH
  Cc: Theodore Tso, Johannes Berg, linux-kernel, netdev, yi.zhu,
	jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> Ok, how about the following patch.  Is it acceptable to everyone?
> 
> -	  If you are using a distro that was released in 2006 or later,
> -	  it should be safe to say N here.
> +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> +	  release from 2007 or later, it should be safe to say N here.
> +
> +	  If you are using Debian or other distros that are slow to
> +	  update HAL, please say Y here.

What HAL version do you think Debian ought to have, pray tell? And
what the hell version do those other distros have?

The last HAL release was 0.5.8 on 11-Sep-2006. It showed up in
Debian/unstable on 2-Oct. There have been six Debian bugfix releases,
the most recent on 12-Feb.

http://people.freedesktop.org/~david/dist/
http://packages.debian.org/changelogs/pool/main/h/hal/hal_0.5.8.1-6.1/changelog

The last NetworkManager is 0.6.4 released 13-Jul-2006. It showed up in
Debian/unstable on 8-Aug. There have been five bugfix releases, the
most recent on 30-Nov.

http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.6/
http://packages.debian.org/changelogs/pool/main/n/network-manager/network-manager_0.6.4-6/changelog

Debian is NOT the problem.

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 19:55           ` Matt Mackall
@ 2007-03-05 22:39             ` Greg KH
  2007-03-06  3:07               ` Matthew Garrett
  0 siblings, 1 reply; 29+ messages in thread
From: Greg KH @ 2007-03-05 22:39 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Theodore Tso, Johannes Berg, linux-kernel, netdev, yi.zhu,
	jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 01:55:30PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > Ok, how about the following patch.  Is it acceptable to everyone?
> > 
> > -	  If you are using a distro that was released in 2006 or later,
> > -	  it should be safe to say N here.
> > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > +	  release from 2007 or later, it should be safe to say N here.
> > +
> > +	  If you are using Debian or other distros that are slow to
> > +	  update HAL, please say Y here.
> 
> What HAL version do you think Debian ought to have, pray tell? And
> what the hell version do those other distros have?
> 
> The last HAL release was 0.5.8 on 11-Sep-2006. It showed up in
> Debian/unstable on 2-Oct. There have been six Debian bugfix releases,
> the most recent on 12-Feb.
> 
> http://people.freedesktop.org/~david/dist/
> http://packages.debian.org/changelogs/pool/main/h/hal/hal_0.5.8.1-6.1/changelog

Ok, I only named HAL as that is what people have told me the problem is.
I have been running this change on my boxs, without
CONFIG_SYSFS_DEPRECATED since last July or so.

But I don't use NetworkManager here for the most part, but I have tried
this in the OpenSuse10.3 alpha releases and it seems to work just fine
with whatever version of NetworkManager it uses.

So perhaps it's some wrapper scripts somewhere?  I think SuSE had some
odd things hard coded somewhere that prevented 10.1 from working
properly with this change.

Ok, so I'll drop the HAL wording above, what should I say instead?

thanks,

greg k-h

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 18:58         ` Greg KH
  2007-03-05 19:55           ` Matt Mackall
@ 2007-03-05 23:05           ` Jeffrey Hundstad
  2007-03-05 23:40           ` [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED Adrian Bunk
  2 siblings, 0 replies; 29+ messages in thread
From: Jeffrey Hundstad @ 2007-03-05 23:05 UTC (permalink / raw)
  To: Greg KH
  Cc: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

Greg KH wrote:
> On Mon, Mar 05, 2007 at 07:59:50AM -0500, Theodore Tso wrote:
>   
> Ok, how about the following patch.  Is it acceptable to everyone?
>
> thanks,
>
> greg k-h
>
> ---
>  init/Kconfig |   13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> --- gregkh-2.6.orig/init/Kconfig
> +++ gregkh-2.6/init/Kconfig
> @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
>  	  that belong to a class, back into the /sys/class heirachy, in
>  	  order to support older versions of udev.
>  
> -	  If you are using a distro that was released in 2006 or later,
> -	  it should be safe to say N here.
> +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> +	  release from 2007 or later, it should be safe to say N here.
> +
> +	  If you are using Debian or other distros that are slow to
> +	  update HAL, please say Y here.
> +
> +	  If you have any problems with devices not being found properly
> +	  from userspace programs, and this option is disabled, say Y
> +	  here.
> +
> +	  If you are unsure about this at all, say Y.
>  
>  config RELAY
>  	bool "Kernel->user space relay support (formerly relayfs)"

Since it appears you're trying to offend people with this patch, it 
would seem appropriate to call someone's mother a "bad" name.  This may 
be in the style guide; perhaps I should submit a patch.

-- 
Jeffrey Hundstad
PS: Humor (really!) relax.


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

* [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-05 18:58         ` Greg KH
  2007-03-05 19:55           ` Matt Mackall
  2007-03-05 23:05           ` Jeffrey Hundstad
@ 2007-03-05 23:40           ` Adrian Bunk
  2007-03-06  0:07             ` Greg KH
  2 siblings, 1 reply; 29+ messages in thread
From: Adrian Bunk @ 2007-03-05 23:40 UTC (permalink / raw)
  To: Greg KH
  Cc: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> 
> Ok, how about the following patch.  Is it acceptable to everyone?
> 
> thanks,
> 
> greg k-h
> 
> ---
>  init/Kconfig |   13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> --- gregkh-2.6.orig/init/Kconfig
> +++ gregkh-2.6/init/Kconfig
> @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
>  	  that belong to a class, back into the /sys/class heirachy, in
>  	  order to support older versions of udev.
>  
> -	  If you are using a distro that was released in 2006 or later,
> -	  it should be safe to say N here.
> +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> +	  release from 2007 or later, it should be safe to say N here.
> +
> +	  If you are using Debian or other distros that are slow to
> +	  update HAL, please say Y here.
>...

The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
for all users, and schedule it's removal for mid-2008 (or later).

12 months after the first _release_ of a HAL that can live without seems 
to be the first time when we can consider getting rid of it, since all 
distributions with at least one release a year should ship it by then.

Currently, SYSFS_DEPRECATED is only a trap for users.

Suggested patch below.

cu
Adrian


<--  snip  -->


unconditionally enable SYSFS_DEPRECATED

This patch unconditionally enables SYSFS_DEPRECATED and schedules it's
removal for July 2008.

Currently, SYSFS_DEPRECATED is only a trap for users accidentally
disabling it.

In July 2008, all distributions with at least one release a year should
be able to run without SYSFS_DEPRECATED.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index c3b1430..b0bce93 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -316,3 +316,13 @@ Why:	The option/code is
 Who:	Johannes Berg <johannes@sipsolutions.net>
 
 ---------------------------
+
+What:	deprecated sysfs files (CONFIG_SYSFS_DEPRECATED)
+When:	July 2008
+Why:	None of these features or values should be used any longer,
+	as they export driver core implementation details to userspace
+	or export properties which can't be kept stable across kernel
+	releases.
+Who:	Greg KH <greg@kroah.com>
+
+---------------------------
diff --git a/init/Kconfig b/init/Kconfig
index f977086..f652b6f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -274,24 +274,9 @@ config CPUSETS
 	  Say N if unsure.
 
 config SYSFS_DEPRECATED
-	bool "Create deprecated sysfs files"
+	bool
 	default y
 	help
-	  This option creates deprecated symlinks such as the
-	  "device"-link, the <subsystem>:<name>-link, and the
-	  "bus"-link. It may also add deprecated key in the
-	  uevent environment.
-	  None of these features or values should be used today, as
-	  they export driver core implementation details to userspace
-	  or export properties which can't be kept stable across kernel
-	  releases.
-
-	  If enabled, this option will also move any device structures
-	  that belong to a class, back into the /sys/class heirachy, in
-	  order to support older versions of udev.
-
-	  If you are using a distro that was released in 2006 or later,
-	  it should be safe to say N here.
 
 config RELAY
 	bool "Kernel->user space relay support (formerly relayfs)"

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-05 23:40           ` [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED Adrian Bunk
@ 2007-03-06  0:07             ` Greg KH
  2007-03-06  0:35               ` Adrian Bunk
  2007-03-06  1:30               ` Matt Mackall
  0 siblings, 2 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06  0:07 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > 
> > Ok, how about the following patch.  Is it acceptable to everyone?
> > 
> > thanks,
> > 
> > greg k-h
> > 
> > ---
> >  init/Kconfig |   13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> > 
> > --- gregkh-2.6.orig/init/Kconfig
> > +++ gregkh-2.6/init/Kconfig
> > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> >  	  that belong to a class, back into the /sys/class heirachy, in
> >  	  order to support older versions of udev.
> >  
> > -	  If you are using a distro that was released in 2006 or later,
> > -	  it should be safe to say N here.
> > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > +	  release from 2007 or later, it should be safe to say N here.
> > +
> > +	  If you are using Debian or other distros that are slow to
> > +	  update HAL, please say Y here.
> >...
> 
> The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> for all users, and schedule it's removal for mid-2008 (or later).
> 
> 12 months after the first _release_ of a HAL that can live without seems 
> to be the first time when we can consider getting rid of it, since all 
> distributions with at least one release a year should ship it by then.
> 
> Currently, SYSFS_DEPRECATED is only a trap for users.

Huh?

No, again, I've been using this just fine for about 6 months now.

And what about all of the servers not using HAL/NetworkManager?
And what about all of the embedded systems not using either?

So to not allow this to be turned off by people who might want to (we
want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
other distros released this year), is pretty heavy-handed.

It also will work in OpenSuSE 10.2 which is already released, and I
think Fedora 6, but I've only limited experience with these.

Oh, and Gentoo works just fine, and has been for the past 6 months.

I would just prefer to come up with an acceptable set of wording that
will work to properly warn people.

I proposed one such wording which some people took as a slam against
Debian, which it really was not at all.

Does someone else want to propose some other wording instead?

thanks,

greg k-h

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 12:59       ` Theodore Tso
  2007-03-05 18:58         ` Greg KH
@ 2007-03-06  0:35         ` Johannes Berg
  1 sibling, 0 replies; 29+ messages in thread
From: Johannes Berg @ 2007-03-06  0:35 UTC (permalink / raw)
  To: Theodore Tso
  Cc: Greg KH, Matt Mackall, linux-kernel, netdev, yi.zhu, jketreno,
	linux-wireless, akpm

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

On Mon, 2007-03-05 at 07:59 -0500, Theodore Tso wrote:

>  (depending on whether we want to accomodate Debian's glacial
> release schedule). 

I don't think Debian updates the kernel to some actual newer version
either.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  0:07             ` Greg KH
@ 2007-03-06  0:35               ` Adrian Bunk
  2007-03-06  0:41                 ` Greg KH
  2007-03-06  1:30               ` Matt Mackall
  1 sibling, 1 reply; 29+ messages in thread
From: Adrian Bunk @ 2007-03-06  0:35 UTC (permalink / raw)
  To: Greg KH
  Cc: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > 
> > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > > 
> > > ---
> > >  init/Kconfig |   13 +++++++++++--
> > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > 
> > > --- gregkh-2.6.orig/init/Kconfig
> > > +++ gregkh-2.6/init/Kconfig
> > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > >  	  that belong to a class, back into the /sys/class heirachy, in
> > >  	  order to support older versions of udev.
> > >  
> > > -	  If you are using a distro that was released in 2006 or later,
> > > -	  it should be safe to say N here.
> > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > +	  release from 2007 or later, it should be safe to say N here.
> > > +
> > > +	  If you are using Debian or other distros that are slow to
> > > +	  update HAL, please say Y here.
> > >...
> > 
> > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > for all users, and schedule it's removal for mid-2008 (or later).
> > 
> > 12 months after the first _release_ of a HAL that can live without seems 
> > to be the first time when we can consider getting rid of it, since all 
> > distributions with at least one release a year should ship it by then.
> > 
> > Currently, SYSFS_DEPRECATED is only a trap for users.
> 
> Huh?
> 
> No, again, I've been using this just fine for about 6 months now.
> 
> And what about all of the servers not using HAL/NetworkManager?

On a server, it shouldn't harm.

> And what about all of the embedded systems not using either?

If it was much code, I would have sent a patch that allowed disabling it 
if EMBEDDED=y.

> So to not allow this to be turned off by people who might want to (we
> want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> other distros released this year), is pretty heavy-handed.
> 
> It also will work in OpenSuSE 10.2 which is already released, and I
> think Fedora 6, but I've only limited experience with these.
> 
> Oh, and Gentoo works just fine, and has been for the past 6 months.

For most people, it simply doesn't matter whether SYSFS_DEPRECATED is 
on or off.

But accidentally disabling SYSFS_DEPRECATED has proven to be a trap 
people sometimes fall into - and tracking them down to 
SYSFS_DEPRECATED=n sometimes takes some time.

> I would just prefer to come up with an acceptable set of wording that
> will work to properly warn people.
> 
> I proposed one such wording which some people took as a slam against
> Debian, which it really was not at all.
> 
> Does someone else want to propose some other wording instead?
> 
> thanks,
> 
> greg k-h

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  0:35               ` Adrian Bunk
@ 2007-03-06  0:41                 ` Greg KH
  0 siblings, 0 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06  0:41 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Theodore Tso, Matt Mackall, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Tue, Mar 06, 2007 at 01:35:41AM +0100, Adrian Bunk wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > > 
> > > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > > 
> > > > ---
> > > >  init/Kconfig |   13 +++++++++++--
> > > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > > 
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > >  	  that belong to a class, back into the /sys/class heirachy, in
> > > >  	  order to support older versions of udev.
> > > >  
> > > > -	  If you are using a distro that was released in 2006 or later,
> > > > -	  it should be safe to say N here.
> > > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > +	  release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > +	  If you are using Debian or other distros that are slow to
> > > > +	  update HAL, please say Y here.
> > > >...
> > > 
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > > 
> > > 12 months after the first _release_ of a HAL that can live without seems 
> > > to be the first time when we can consider getting rid of it, since all 
> > > distributions with at least one release a year should ship it by then.
> > > 
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> > 
> > Huh?
> > 
> > No, again, I've been using this just fine for about 6 months now.
> > 
> > And what about all of the servers not using HAL/NetworkManager?
> 
> On a server, it shouldn't harm.

But if they wanted that option enabled?

> > And what about all of the embedded systems not using either?
> 
> If it was much code, I would have sent a patch that allowed disabling it 
> if EMBEDDED=y.

It's not a code size issue.  In fact, if the option is enabled, like you
have done, it builds more code into the kernel than before.

> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> > 
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> > 
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
> 
> For most people, it simply doesn't matter whether SYSFS_DEPRECATED is 
> on or off.

Exactly.

> But accidentally disabling SYSFS_DEPRECATED has proven to be a trap 
> people sometimes fall into - and tracking them down to 
> SYSFS_DEPRECATED=n sometimes takes some time.

So how do I put up the warning flag any larger than I have?

I do not want this always enabled, that option is not acceptable to me,
or to the zillions of people who are running a distro that this option
works just fine on (see above list...)

thanks,

greg k-h

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  0:07             ` Greg KH
  2007-03-06  0:35               ` Adrian Bunk
@ 2007-03-06  1:30               ` Matt Mackall
  2007-03-06  1:56                 ` Greg KH
  2007-03-06  2:48                 ` Greg KH
  1 sibling, 2 replies; 29+ messages in thread
From: Matt Mackall @ 2007-03-06  1:30 UTC (permalink / raw)
  To: Greg KH
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > 
> > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > > 
> > > ---
> > >  init/Kconfig |   13 +++++++++++--
> > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > 
> > > --- gregkh-2.6.orig/init/Kconfig
> > > +++ gregkh-2.6/init/Kconfig
> > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > >  	  that belong to a class, back into the /sys/class heirachy, in
> > >  	  order to support older versions of udev.
> > >  
> > > -	  If you are using a distro that was released in 2006 or later,
> > > -	  it should be safe to say N here.
> > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > +	  release from 2007 or later, it should be safe to say N here.
> > > +
> > > +	  If you are using Debian or other distros that are slow to
> > > +	  update HAL, please say Y here.
> > >...
> > 
> > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > for all users, and schedule it's removal for mid-2008 (or later).
> > 
> > 12 months after the first _release_ of a HAL that can live without seems 
> > to be the first time when we can consider getting rid of it, since all 
> > distributions with at least one release a year should ship it by then.
> > 
> > Currently, SYSFS_DEPRECATED is only a trap for users.
> 
> Huh?
> 
> No, again, I've been using this just fine for about 6 months now.
> 
> And what about all of the servers not using HAL/NetworkManager?
> And what about all of the embedded systems not using either?
> 
> So to not allow this to be turned off by people who might want to (we
> want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> other distros released this year), is pretty heavy-handed.
> 
> It also will work in OpenSuSE 10.2 which is already released, and I
> think Fedora 6, but I've only limited experience with these.
> 
> Oh, and Gentoo works just fine, and has been for the past 6 months.
>
> I would just prefer to come up with an acceptable set of wording that
> will work to properly warn people.
> 
> I proposed one such wording which some people took as a slam against
> Debian, which it really was not at all.
> 
> Does someone else want to propose some other wording instead?

Back up a bit. Let's review:

Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable

Theory A: It broke because I'm not running an as-yet-unreleased HAL.

 Then we should revert the patch pronto because it's an unqualified
 regression.

Theory B: It broke because I'm not running relatively recent HAL.

 By all accounts I'm running the latest and greatest HAL and Network
 Manager, more than recent enough to work.

Theory C: It broke because I've got some goofy config.

 My setup passes no arguments to either. The HAL config file is
 completely bare-bones and there's no sign of any configuration files
 for Network Manager.

Theory D: It broke for some nebulous Debian-related reason.

 That's a bunch of unhelpful crap.

Can we come up with an actual theory for what's wrong with my setup, please?
Like, perhaps:

Theory E: There's some undiagnosed new breakage that this introduces
that no else hit until it went into mainline.

 Hmmm, this one sounds more promising.

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  1:30               ` Matt Mackall
@ 2007-03-06  1:56                 ` Greg KH
  2007-03-06 13:20                   ` Johannes Berg
  2007-03-06 15:55                   ` Dan Williams
  2007-03-06  2:48                 ` Greg KH
  1 sibling, 2 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06  1:56 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > > 
> > > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > > 
> > > > ---
> > > >  init/Kconfig |   13 +++++++++++--
> > > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > > 
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > >  	  that belong to a class, back into the /sys/class heirachy, in
> > > >  	  order to support older versions of udev.
> > > >  
> > > > -	  If you are using a distro that was released in 2006 or later,
> > > > -	  it should be safe to say N here.
> > > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > +	  release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > +	  If you are using Debian or other distros that are slow to
> > > > +	  update HAL, please say Y here.
> > > >...
> > > 
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > > 
> > > 12 months after the first _release_ of a HAL that can live without seems 
> > > to be the first time when we can consider getting rid of it, since all 
> > > distributions with at least one release a year should ship it by then.
> > > 
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> > 
> > Huh?
> > 
> > No, again, I've been using this just fine for about 6 months now.
> > 
> > And what about all of the servers not using HAL/NetworkManager?
> > And what about all of the embedded systems not using either?
> > 
> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> > 
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> > 
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
> >
> > I would just prefer to come up with an acceptable set of wording that
> > will work to properly warn people.
> > 
> > I proposed one such wording which some people took as a slam against
> > Debian, which it really was not at all.
> > 
> > Does someone else want to propose some other wording instead?
> 
> Back up a bit. Let's review:
> 
> Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable
> 
> Theory A: It broke because I'm not running an as-yet-unreleased HAL.
> 
>  Then we should revert the patch pronto because it's an unqualified
>  regression.
> 
> Theory B: It broke because I'm not running relatively recent HAL.
> 
>  By all accounts I'm running the latest and greatest HAL and Network
>  Manager, more than recent enough to work.
> 
> Theory C: It broke because I've got some goofy config.
> 
>  My setup passes no arguments to either. The HAL config file is
>  completely bare-bones and there's no sign of any configuration files
>  for Network Manager.
> 
> Theory D: It broke for some nebulous Debian-related reason.
> 
>  That's a bunch of unhelpful crap.
> 

> Can we come up with an actual theory for what's wrong with my setup, please?
> Like, perhaps:
> 
> Theory E: There's some undiagnosed new breakage that this introduces
> that no else hit until it went into mainline.

Theory F:  It broke because you are using NetworkManager for your
network devices and the patches that fix this have not made it into a
real release?

I'm just guessing, but does anyone who is having this problem, NOT using
NetworkManager?

I'm running an old version of HAL just fine, but I'm not using
NetworkManager here.

I am using NetworkManager on a OpenSuSE 10.3 release, but suse's version
of NetworkManager is well known to not be anywhere near what is released
as a tarball :(

thanks,

greg k-h

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  1:30               ` Matt Mackall
  2007-03-06  1:56                 ` Greg KH
@ 2007-03-06  2:48                 ` Greg KH
  2007-03-06  3:04                   ` Matt Mackall
  2007-03-06  3:39                   ` Matt Mackall
  1 sibling, 2 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06  2:48 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > > 
> > > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > > 
> > > > ---
> > > >  init/Kconfig |   13 +++++++++++--
> > > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > > 
> > > > --- gregkh-2.6.orig/init/Kconfig
> > > > +++ gregkh-2.6/init/Kconfig
> > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > >  	  that belong to a class, back into the /sys/class heirachy, in
> > > >  	  order to support older versions of udev.
> > > >  
> > > > -	  If you are using a distro that was released in 2006 or later,
> > > > -	  it should be safe to say N here.
> > > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > +	  release from 2007 or later, it should be safe to say N here.
> > > > +
> > > > +	  If you are using Debian or other distros that are slow to
> > > > +	  update HAL, please say Y here.
> > > >...
> > > 
> > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > > for all users, and schedule it's removal for mid-2008 (or later).
> > > 
> > > 12 months after the first _release_ of a HAL that can live without seems 
> > > to be the first time when we can consider getting rid of it, since all 
> > > distributions with at least one release a year should ship it by then.
> > > 
> > > Currently, SYSFS_DEPRECATED is only a trap for users.
> > 
> > Huh?
> > 
> > No, again, I've been using this just fine for about 6 months now.
> > 
> > And what about all of the servers not using HAL/NetworkManager?
> > And what about all of the embedded systems not using either?
> > 
> > So to not allow this to be turned off by people who might want to (we
> > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > other distros released this year), is pretty heavy-handed.
> > 
> > It also will work in OpenSuSE 10.2 which is already released, and I
> > think Fedora 6, but I've only limited experience with these.
> > 
> > Oh, and Gentoo works just fine, and has been for the past 6 months.
> >
> > I would just prefer to come up with an acceptable set of wording that
> > will work to properly warn people.
> > 
> > I proposed one such wording which some people took as a slam against
> > Debian, which it really was not at all.
> > 
> > Does someone else want to propose some other wording instead?
> 
> Back up a bit. Let's review:
> 
> Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable

Wait, have confirmed that if you enable this config option,
NetworkManager starts back up again and works properly?

If so, can you disable the option and strace it to see what program is
trying to access what?  That will put the
HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
quickly :)

thanks,

greg k-h

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  2:48                 ` Greg KH
@ 2007-03-06  3:04                   ` Matt Mackall
  2007-03-06  3:39                   ` Matt Mackall
  1 sibling, 0 replies; 29+ messages in thread
From: Matt Mackall @ 2007-03-06  3:04 UTC (permalink / raw)
  To: Greg KH
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
 
> Wait, have confirmed that if you enable this config option,
> NetworkManager starts back up again and works properly?

Yep, probably should have mentioned that.

> If so, can you disable the option and strace it to see what program is
> trying to access what?  That will put the
> HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> quickly :)

Did that a few hours ago, got a very large dump from both programs. No
smoking guns to my eye, but I'll send you the logs later.

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: Recent wireless breakage (ipw2200, iwconfig, NetworkManager)
  2007-03-05 22:39             ` Greg KH
@ 2007-03-06  3:07               ` Matthew Garrett
  0 siblings, 0 replies; 29+ messages in thread
From: Matthew Garrett @ 2007-03-06  3:07 UTC (permalink / raw)
  To: Greg KH
  Cc: Matt Mackall, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 02:39:00PM -0800, Greg KH wrote:

> Ok, I only named HAL as that is what people have told me the problem is.
> I have been running this change on my boxs, without
> CONFIG_SYSFS_DEPRECATED since last July or so.
> 
> But I don't use NetworkManager here for the most part, but I have tried
> this in the OpenSuse10.3 alpha releases and it seems to work just fine
> with whatever version of NetworkManager it uses.

At a guess, you're carrying either a git snapshot or have backports from 
git. Several distributions do this, but until there's actually been a 
released version that works, it's a bit early to set a timescale.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  2:48                 ` Greg KH
  2007-03-06  3:04                   ` Matt Mackall
@ 2007-03-06  3:39                   ` Matt Mackall
  2007-03-06  4:03                     ` Greg KH
  1 sibling, 1 reply; 29+ messages in thread
From: Matt Mackall @ 2007-03-06  3:39 UTC (permalink / raw)
  To: Greg KH
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> If so, can you disable the option and strace it to see what program is
> trying to access what?  That will put the
> HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> quickly :)

Ok, I've got straces of both good and bad (>5M each). Filtered out
random pointer values and the like, diffed, and filtered for /sys/,
and the result's still 1.5M. What should I be looking for?

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  3:39                   ` Matt Mackall
@ 2007-03-06  4:03                     ` Greg KH
  2007-03-06  6:10                       ` Matt Mackall
  0 siblings, 1 reply; 29+ messages in thread
From: Greg KH @ 2007-03-06  4:03 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > If so, can you disable the option and strace it to see what program is
> > trying to access what?  That will put the
> > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > quickly :)
> 
> Ok, I've got straces of both good and bad (>5M each). Filtered out
> random pointer values and the like, diffed, and filtered for /sys/,
> and the result's still 1.5M. What should I be looking for?

Failures when trying to read from /sys/class/net/

Or opening the directory and iterating over the subdirs in there.  Or
something like that.

But the /sys/class/net/ stuff should hopefully help narrow it down.

thanks,

greg k-h

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  4:03                     ` Greg KH
@ 2007-03-06  6:10                       ` Matt Mackall
  2007-03-06 19:01                         ` Greg KH
  2007-03-06 20:05                         ` Greg KH
  0 siblings, 2 replies; 29+ messages in thread
From: Matt Mackall @ 2007-03-06  6:10 UTC (permalink / raw)
  To: Greg KH
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > If so, can you disable the option and strace it to see what program is
> > > trying to access what?  That will put the
> > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > quickly :)
> > 
> > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > random pointer values and the like, diffed, and filtered for /sys/,
> > and the result's still 1.5M. What should I be looking for?
> 
> Failures when trying to read from /sys/class/net/
> 
> Or opening the directory and iterating over the subdirs in there.  Or
> something like that.
> 
> But the /sys/class/net/ stuff should hopefully help narrow it down.

Works:

6857  open("/sys/class/net",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
6857  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
6857  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
6857  getdents64(13, /* 5 entries */, 4096) = 120
6857  readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857  readlink("/sys/class/net/eth1/device",
"../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
6857  readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857  readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
(No such
file or directory)
6857  readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
(Invalid argument)
6857  readlink("/sys/class/net/eth0/device",
"../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
6857  getdents64(13, /* 0 entries */, 4096) = 0
6857  close(13)                         = 0

Breaks:

3620  open("/sys/class/net",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
3620  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
3620  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
3620  getdents64(13, /* 5 entries */, 4096) = 120
3620  readlink("/sys/class/net/eth1",
"../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
3620
readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
0x809e910, 256) = -1 ENOENT (No such file or directory)
3620  readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
256) = 28
3620  readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
-1 ENOEN\T (No such file or directory)
3620  readlink("/sys/class/net/eth0",
"../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
3620
readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
0x809e960, 256) = -1 ENOENT (No such file or directory)
3620  getdents64(13, /* 0 entries */, 4096) = 0
3620  close(13)                         = 0

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  1:56                 ` Greg KH
@ 2007-03-06 13:20                   ` Johannes Berg
  2007-03-06 15:55                   ` Dan Williams
  1 sibling, 0 replies; 29+ messages in thread
From: Johannes Berg @ 2007-03-06 13:20 UTC (permalink / raw)
  To: Greg KH
  Cc: Matt Mackall, Adrian Bunk, Theodore Tso, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

On Mon, 2007-03-05 at 17:56 -0800, Greg KH wrote:

> Theory F:  It broke because you are using NetworkManager for your
> network devices and the patches that fix this have not made it into a
> real release?
> 
> I'm just guessing, but does anyone who is having this problem, NOT using
> NetworkManager?
> 
> I'm running an old version of HAL just fine, but I'm not using
> NetworkManager here.

Greg, HAL itself isn't the problem. The problem is that older versions
of HAL ignore all network devices when this option is not set and thus
network manager can't pick them up.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  1:56                 ` Greg KH
  2007-03-06 13:20                   ` Johannes Berg
@ 2007-03-06 15:55                   ` Dan Williams
  1 sibling, 0 replies; 29+ messages in thread
From: Dan Williams @ 2007-03-06 15:55 UTC (permalink / raw)
  To: Greg KH
  Cc: Matt Mackall, Adrian Bunk, Theodore Tso, Johannes Berg,
	linux-kernel, netdev, yi.zhu, jketreno, linux-wireless, akpm

On Mon, 2007-03-05 at 17:56 -0800, Greg KH wrote:
> On Mon, Mar 05, 2007 at 07:30:21PM -0600, Matt Mackall wrote:
> > On Mon, Mar 05, 2007 at 04:07:22PM -0800, Greg KH wrote:
> > > On Tue, Mar 06, 2007 at 12:40:52AM +0100, Adrian Bunk wrote:
> > > > On Mon, Mar 05, 2007 at 10:58:13AM -0800, Greg KH wrote:
> > > > > 
> > > > > Ok, how about the following patch.  Is it acceptable to everyone?
> > > > > 
> > > > > thanks,
> > > > > 
> > > > > greg k-h
> > > > > 
> > > > > ---
> > > > >  init/Kconfig |   13 +++++++++++--
> > > > >  1 file changed, 11 insertions(+), 2 deletions(-)
> > > > > 
> > > > > --- gregkh-2.6.orig/init/Kconfig
> > > > > +++ gregkh-2.6/init/Kconfig
> > > > > @@ -290,8 +290,17 @@ config SYSFS_DEPRECATED
> > > > >  	  that belong to a class, back into the /sys/class heirachy, in
> > > > >  	  order to support older versions of udev.
> > > > >  
> > > > > -	  If you are using a distro that was released in 2006 or later,
> > > > > -	  it should be safe to say N here.
> > > > > +	  If you are using an OpenSuSE, Gentoo, Ubuntu, or Fedora
> > > > > +	  release from 2007 or later, it should be safe to say N here.
> > > > > +
> > > > > +	  If you are using Debian or other distros that are slow to
> > > > > +	  update HAL, please say Y here.
> > > > >...
> > > > 
> > > > The sane solution seems to be to enable SYSFS_DEPRECATED unconditionally 
> > > > for all users, and schedule it's removal for mid-2008 (or later).
> > > > 
> > > > 12 months after the first _release_ of a HAL that can live without seems 
> > > > to be the first time when we can consider getting rid of it, since all 
> > > > distributions with at least one release a year should ship it by then.
> > > > 
> > > > Currently, SYSFS_DEPRECATED is only a trap for users.
> > > 
> > > Huh?
> > > 
> > > No, again, I've been using this just fine for about 6 months now.
> > > 
> > > And what about all of the servers not using HAL/NetworkManager?
> > > And what about all of the embedded systems not using either?
> > > 
> > > So to not allow this to be turned off by people who might want to (we
> > > want this for OpenSuSE 10.3, and Fedora 7 also will want this, as will
> > > other distros released this year), is pretty heavy-handed.
> > > 
> > > It also will work in OpenSuSE 10.2 which is already released, and I
> > > think Fedora 6, but I've only limited experience with these.
> > > 
> > > Oh, and Gentoo works just fine, and has been for the past 6 months.
> > >
> > > I would just prefer to come up with an acceptable set of wording that
> > > will work to properly warn people.
> > > 
> > > I proposed one such wording which some people took as a slam against
> > > Debian, which it really was not at all.
> > > 
> > > Does someone else want to propose some other wording instead?
> > 
> > Back up a bit. Let's review:
> > 
> > Problem: NetworkManager stopped working with my ipw2200 on Debian/unstable
> > 
> > Theory A: It broke because I'm not running an as-yet-unreleased HAL.
> > 
> >  Then we should revert the patch pronto because it's an unqualified
> >  regression.
> > 
> > Theory B: It broke because I'm not running relatively recent HAL.
> > 
> >  By all accounts I'm running the latest and greatest HAL and Network
> >  Manager, more than recent enough to work.
> > 
> > Theory C: It broke because I've got some goofy config.
> > 
> >  My setup passes no arguments to either. The HAL config file is
> >  completely bare-bones and there's no sign of any configuration files
> >  for Network Manager.
> > 
> > Theory D: It broke for some nebulous Debian-related reason.
> > 
> >  That's a bunch of unhelpful crap.
> > 
> 
> > Can we come up with an actual theory for what's wrong with my setup, please?
> > Like, perhaps:
> > 
> > Theory E: There's some undiagnosed new breakage that this introduces
> > that no else hit until it went into mainline.
> 
> Theory F:  It broke because you are using NetworkManager for your
> network devices and the patches that fix this have not made it into a
> real release?

The problem is _NOT_ NetworkManager.  NM just asks HAL for network
devices, NM does not muck with /sys at all.  If HAL can't see it,
NetworkManager can't see it, because NM uses HAL.

The problem is that sysfs is fundamentally a kernel API.  Whenever it
changes, HAL must change or HAL will break.  Same story with anything
that ever reads from sysfs.

Dan

> I'm just guessing, but does anyone who is having this problem, NOT using
> NetworkManager?
> 
> I'm running an old version of HAL just fine, but I'm not using
> NetworkManager here.
> 
> I am using NetworkManager on a OpenSuSE 10.3 release, but suse's version
> of NetworkManager is well known to not be anywhere near what is released
> as a tarball :(
> 
> thanks,
> 
> greg k-h
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  6:10                       ` Matt Mackall
@ 2007-03-06 19:01                         ` Greg KH
  2007-03-06 20:05                         ` Greg KH
  1 sibling, 0 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06 19:01 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Tue, Mar 06, 2007 at 12:10:09AM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> > On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > > If so, can you disable the option and strace it to see what program is
> > > > trying to access what?  That will put the
> > > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > > quickly :)
> > > 
> > > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > > random pointer values and the like, diffed, and filtered for /sys/,
> > > and the result's still 1.5M. What should I be looking for?
> > 
> > Failures when trying to read from /sys/class/net/
> > 
> > Or opening the directory and iterating over the subdirs in there.  Or
> > something like that.
> > 
> > But the /sys/class/net/ stuff should hopefully help narrow it down.
> 
> Works:
> 
> 6857  open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 6857  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 6857  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
> 6857  getdents64(13, /* 5 entries */, 4096) = 120
> 6857  readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/eth1/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
> 6857  readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
> (No such
> file or directory)
> 6857  readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/eth0/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
> 6857  getdents64(13, /* 0 entries */, 4096) = 0
> 6857  close(13)                         = 0
> 
> Breaks:
> 
> 3620  open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 3620  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 3620  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
> 3620  getdents64(13, /* 5 entries */, 4096) = 120
> 3620  readlink("/sys/class/net/eth1",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
> 0x809e910, 256) = -1 ENOENT (No such file or directory)
> 3620  readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
> 256) = 28
> 3620  readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
> -1 ENOEN\T (No such file or directory)
> 3620  readlink("/sys/class/net/eth0",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
> 0x809e960, 256) = -1 ENOENT (No such file or directory)
> 3620  getdents64(13, /* 0 entries */, 4096) = 0
> 3620  close(13)                         = 0

Ah, that should be simple to fix in the kernel, give me an hour or so...

thanks,

greg k-h

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

* Re: [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED
  2007-03-06  6:10                       ` Matt Mackall
  2007-03-06 19:01                         ` Greg KH
@ 2007-03-06 20:05                         ` Greg KH
  1 sibling, 0 replies; 29+ messages in thread
From: Greg KH @ 2007-03-06 20:05 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Adrian Bunk, Theodore Tso, Johannes Berg, linux-kernel, netdev,
	yi.zhu, jketreno, linux-wireless, akpm

On Tue, Mar 06, 2007 at 12:10:09AM -0600, Matt Mackall wrote:
> On Mon, Mar 05, 2007 at 08:03:50PM -0800, Greg KH wrote:
> > On Mon, Mar 05, 2007 at 09:39:47PM -0600, Matt Mackall wrote:
> > > On Mon, Mar 05, 2007 at 06:48:50PM -0800, Greg KH wrote:
> > > > If so, can you disable the option and strace it to see what program is
> > > > trying to access what?  That will put the
> > > > HAL/NetworkManager/libsysfs/distro script finger pointing to rest pretty
> > > > quickly :)
> > > 
> > > Ok, I've got straces of both good and bad (>5M each). Filtered out
> > > random pointer values and the like, diffed, and filtered for /sys/,
> > > and the result's still 1.5M. What should I be looking for?
> > 
> > Failures when trying to read from /sys/class/net/
> > 
> > Or opening the directory and iterating over the subdirs in there.  Or
> > something like that.
> > 
> > But the /sys/class/net/ stuff should hopefully help narrow it down.
> 
> Works:
> 
> 6857  open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 6857  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 6857  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
> 6857  getdents64(13, /* 5 entries */, 4096) = 120
> 6857  readlink("/sys/class/net/eth1", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/eth1/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0", 256) = 53
> 6857  readlink("/sys/class/net/lo", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/lo/device", 0x80a2450, 256) = -1 ENOENT
> (No such
> file or directory)
> 6857  readlink("/sys/class/net/eth0", 0x80a2450, 256) = -1 EINVAL
> (Invalid argument)
> 6857  readlink("/sys/class/net/eth0/device",
> "../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0", 256) = 53
> 6857  getdents64(13, /* 0 entries */, 4096) = 0
> 6857  close(13)                         = 0
> 
> Breaks:
> 
> 3620  open("/sys/class/net",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 13
> 3620  fstat64(13, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
> 3620  fcntl64(13, F_SETFD, FD_CLOEXEC)  = 0
> 3620  getdents64(13, /* 5 entries */, 4096) = 120
> 3620  readlink("/sys/class/net/eth1",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:02.0/eth1", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:02.0/eth1/device",
> 0x809e910, 256) = -1 ENOENT (No such file or directory)
> 3620  readlink("/sys/class/net/lo", "../../devices/virtual/net/lo",
> 256) = 28
> 3620  readlink("/sys/devices/virtual/net/lo/device", 0x809e960, 256) =
> -1 ENOEN\T (No such file or directory)
> 3620  readlink("/sys/class/net/eth0",
> "../../devices/pci0000:00/0000:00:1e.0/00\00:02:01.0/eth0", 256) = 55
> 3620
> readlink("/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0/eth0/device",
> 0x809e960, 256) = -1 ENOENT (No such file or directory)
> 3620  getdents64(13, /* 0 entries */, 4096) = 0
> 3620  close(13)                         = 0

Can you try the patch below?  And enable CONFIG_SYSFS_DEPRECATED.  It
should cause HAL to see the network devices again, as the symlink is now
back (it shouldn't have gone away, that was my fault...)

I tried this with HAL 0.5.7, which is pretty old, and hal-device-manager
shows my network devices properly.

thanks for your patience,

greg k-h


---
 drivers/base/core.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

--- gregkh-2.6.orig/drivers/base/core.c
+++ gregkh-2.6/drivers/base/core.c
@@ -584,17 +584,17 @@ int device_add(struct device *dev)
 		if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
 			sysfs_create_link(&dev->class->subsys.kset.kobj,
 					  &dev->kobj, dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
 		if (parent) {
 			sysfs_create_link(&dev->kobj, &dev->parent->kobj,
 							"device");
+#ifdef CONFIG_SYSFS_DEPRECATED
 			class_name = make_class_name(dev->class->name,
 							&dev->kobj);
 			if (class_name)
 				sysfs_create_link(&dev->parent->kobj,
 						  &dev->kobj, class_name);
-		}
 #endif
+		}
 	}
 
 	if ((error = device_add_attrs(dev)))
@@ -651,17 +651,17 @@ int device_add(struct device *dev)
 		if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
 			sysfs_remove_link(&dev->class->subsys.kset.kobj,
 					  dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
 		if (parent) {
+#ifdef CONFIG_SYSFS_DEPRECATED
 			char *class_name = make_class_name(dev->class->name,
 							   &dev->kobj);
 			if (class_name)
 				sysfs_remove_link(&dev->parent->kobj,
 						  class_name);
 			kfree(class_name);
+#endif
 			sysfs_remove_link(&dev->kobj, "device");
 		}
-#endif
 
 		down(&dev->class->sem);
 		/* notify any interfaces that the device is now gone */
@@ -761,17 +761,17 @@ void device_del(struct device * dev)
 		if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
 			sysfs_remove_link(&dev->class->subsys.kset.kobj,
 					  dev->bus_id);
-#ifdef CONFIG_SYSFS_DEPRECATED
 		if (parent) {
+#ifdef CONFIG_SYSFS_DEPRECATED
 			char *class_name = make_class_name(dev->class->name,
 							   &dev->kobj);
 			if (class_name)
 				sysfs_remove_link(&dev->parent->kobj,
 						  class_name);
 			kfree(class_name);
+#endif
 			sysfs_remove_link(&dev->kobj, "device");
 		}
-#endif
 
 		down(&dev->class->sem);
 		/* notify any interfaces that the device is now gone */
@@ -1064,8 +1064,8 @@ static int device_move_class_links(struc
 				   struct device *old_parent,
 				   struct device *new_parent)
 {
+	int error = 0;
 #ifdef CONFIG_SYSFS_DEPRECATED
-	int error;
 	char *class_name;
 
 	class_name = make_class_name(dev->class->name, &dev->kobj);
@@ -1093,7 +1093,12 @@ out:
 	kfree(class_name);
 	return error;
 #else
-	return 0;
+	if (old_parent)
+		sysfs_remove_link(&dev->kobj, "device");
+	if (new_parent)
+		error = sysfs_create_link(&dev->kobj, &new_parent->kobj,
+					  "device");
+	return error;
 #endif
 }
 

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

end of thread, other threads:[~2007-03-06 20:07 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070304220857.GH23311@waste.org>
2007-03-04 23:39 ` Recent wireless breakage (ipw2200, iwconfig, NetworkManager) Johannes Berg
2007-03-05  0:25   ` Matt Mackall
2007-03-05  0:45     ` Andrew Morton
2007-03-05  1:05       ` Adrian Bunk
2007-03-05  0:46     ` Ian McDonald
2007-03-05  1:17     ` Greg KH
2007-03-05 11:20       ` Johannes Berg
2007-03-05 12:59       ` Theodore Tso
2007-03-05 18:58         ` Greg KH
2007-03-05 19:55           ` Matt Mackall
2007-03-05 22:39             ` Greg KH
2007-03-06  3:07               ` Matthew Garrett
2007-03-05 23:05           ` Jeffrey Hundstad
2007-03-05 23:40           ` [2.6.21 patch] unconditionally enable SYSFS_DEPRECATED Adrian Bunk
2007-03-06  0:07             ` Greg KH
2007-03-06  0:35               ` Adrian Bunk
2007-03-06  0:41                 ` Greg KH
2007-03-06  1:30               ` Matt Mackall
2007-03-06  1:56                 ` Greg KH
2007-03-06 13:20                   ` Johannes Berg
2007-03-06 15:55                   ` Dan Williams
2007-03-06  2:48                 ` Greg KH
2007-03-06  3:04                   ` Matt Mackall
2007-03-06  3:39                   ` Matt Mackall
2007-03-06  4:03                     ` Greg KH
2007-03-06  6:10                       ` Matt Mackall
2007-03-06 19:01                         ` Greg KH
2007-03-06 20:05                         ` Greg KH
2007-03-06  0:35         ` Recent wireless breakage (ipw2200, iwconfig, NetworkManager) Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).