Bug 10380 - sc92031 does not create a device link in sysfs
Summary: sc92031 does not create a device link in sysfs
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-02 07:30 UTC by Thomas Scheiblauer
Modified: 2012-05-18 10:41 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Thomas Scheiblauer 2008-04-02 07:30:34 UTC
Latest working kernel version:
Earliest failing kernel version: 
Distribution: Gentoo
Hardware Environment: x86, x86_64
Software Environment:
Problem Description:
there is no 'device' link created for the sc92031 nic in sysfs under its respective directory '/sys/class/net/eth?' thus making it impossible to search up the device tree using udev.
In my special case, persistent udev net rules cannot be generated by the respective gentoo udev script due to its dependency upon the udev 'DEVICES' key which cannot be determined because of the impossibility to search up the tree.
Steps to reproduce:
1) install silan sc92031 (or realtek 8139D) nic in your pc
2) recompile and install kernel 2.6.24 (sysfs enabled) with sc92031 driver either in-kernel or as a module
3) reboot or load sc92031 module
4) make sure sysfs is mounted on /sys
5) look into the respective '/sys/class/net/eth?' directory
Comment 1 Anonymous Emailer 2008-04-02 09:15:13 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Wed,  2 Apr 2008 07:30:35 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=10380
> 
>            Summary: sc92031 does not create a device link in sysfs
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.24
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Network
>         AssignedTo: jgarzik@pobox.com
>         ReportedBy: tom@sharkbay.at
> 
> 
> Latest working kernel version:
> Earliest failing kernel version: 
> Distribution: Gentoo
> Hardware Environment: x86, x86_64
> Software Environment:
> Problem Description:
> there is no 'device' link created for the sc92031 nic in sysfs under its
> respective directory '/sys/class/net/eth?' thus making it impossible to
> search
> up the device tree using udev.
> In my special case, persistent udev net rules cannot be generated by the
> respective gentoo udev script due to its dependency upon the udev 'DEVICES'
> key
> which cannot be determined because of the impossibility to search up the
> tree.
> Steps to reproduce:
> 1) install silan sc92031 (or realtek 8139D) nic in your pc
> 2) recompile and install kernel 2.6.24 (sysfs enabled) with sc92031 driver
> either in-kernel or as a module
> 3) reboot or load sc92031 module
> 4) make sure sysfs is mounted on /sys
> 5) look into the respective '/sys/class/net/eth?' directory
> 
Comment 2 Anonymous Emailer 2008-04-02 09:50:17 UTC
Reply-To: shemminger@vyatta.com

Add missing sysfs device association. Compile tested only -ENOHW.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Patch against 2.6.25-rc8, ignore previous patch.


--- a/drivers/net/sc92031.c	2008-04-02 09:34:35.000000000 -0700
+++ b/drivers/net/sc92031.c	2008-04-02 09:47:41.000000000 -0700
@@ -1446,6 +1446,7 @@ static int __devinit sc92031_probe(struc
 	}
 
 	pci_set_drvdata(pdev, dev);
+	SET_NETDEV_DEV(dev, &pdev->dev);
 
 #if SC92031_USE_BAR == 0
 	dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR);
Comment 3 Anonymous Emailer 2008-04-02 10:09:29 UTC
Reply-To: thomas.scheiblauer@hauptversammlung.at

On Mit, 2008-04-02 at 09:49 -0700, Stephen Hemminger wrote:
> Add missing sysfs device association. Compile tested only -ENOHW.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> ---
> Patch against 2.6.25-rc8, ignore previous patch.
> 
> ...

Works for me!
Thank you, that was fast.

Note You need to log in before you can comment on or make changes to this bug.