All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Bernd Themann <ossthema@de.ibm.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: Greg KH <greg@kroah.com>,
	Sudhir Kumar <skumar@linux.vnet.ibm.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	sam@ravnborg.org, Christoph Raisch <raisch@de.ibm.com>,
	"Jan-Bernd Themann" <themann@de.ibm.com>
Subject: Re: [2.6.24-rc6-mm1]Build failure in drivers/net/ehea/ehea_main.c
Date: Tue, 29 Jan 2008 11:12:40 +0100	[thread overview]
Message-ID: <200801291112.41337.ossthema@de.ibm.com> (raw)
In-Reply-To: <20080128192204.GO14201@localdomain>

On Monday 28 January 2008 20:22, you wrote:
> Greg KH wrote:
> > On Fri, Jan 25, 2008 at 01:10:48PM -0600, Nathan Lynch wrote:
> > > Jan-Bernd Themann wrote:
> > > 
> > > This is now broken in mainline...
> > > 
> > > drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_add':
> > > drivers/net/ehea/ehea_main.c:2812: error: 'struct device_driver' has
> > > no member named 'kobj'
> > > drivers/net/ehea/ehea_main.c:2815: error: 'struct device_driver' has
> > > no member named 'kobj'
> > > drivers/net/ehea/ehea_main.c:2818: error: 'struct device_driver' has
> > > no member named 'kobj'
> > > drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_remove':
> > > drivers/net/ehea/ehea_main.c:2830: error: 'struct device_driver' has
> > > no member named 'kobj'
> > 
> > Does the patch below fix this?  That driver should not have been trying
> > to create symlinks that the driver core has already created for it.
> 
> Yes, it fixes the build error, by just removing the code that got
> broken.  Jan-Bernd gave a rationale for creating the symlink that
> didn't really seem to be answered.
> 

> > > > The eHEA driver tries to orginize its sys-entries as close as possible to
> > > > other ethernet drivers. Each eHEA NIC has multiple ports which is not that
> > > > common in PCI. This means that each port is represented by a subdirectory
> > > > which has not the "driver" sys-link, only the root directory has.
> > > > Some tools expect to have this driver link in each port directory.
> > > > That is the reason why this link is created manually.

In addition to the explaination above:

Just to be sure that we talk about the same thing:
The eHEA driver controlls multiple eHEAs which have multiple
ethernet ports each. So the logical structure looks like this:
eHEA1 ---> port1 (ethX)
        -> port2 (ethX+1)
        -> port3 (ethX+2)
   ...
eHEA2 ---> port1 (eth?)
        -> port2
        -> port3 
   ...
This structure is represented in /sys/bus/ibmebus/devices in the same way
described above.

If you want to determine the driver belonging to an ethX, you would go
the following path:
/sys/class/net/ethX/device/driver


ls /sys/class/net/ethX/device:
drwxr-xr-x 2 root root    0 2008-01-29 10:00 .
drwxr-xr-x 4 root root    0 2008-01-29 10:00 ..
lrwxrwxrwx 1 root root    0 2008-01-29 10:00 bus -> ../../../../bus/ibmebus
-r--r--r-- 1 root root 4096 2008-01-29 10:00 devspec
lrwxrwxrwx 1 root root    0 2008-01-29 10:00 driver -> ../../../../bus/ibmebus/drivers/ehea
                                             ^^^^^
	In our case this one is created by the code that does not work any longer.

The sym-link is not gereated automatically as the device for portX is added
to the eHEA device (as subnode) where the eHEA device is not a bus.

If this sym-link is of interest (which I guess is the case as most devices
have it) we have to create it somehow.

Would the following proposal work?

There is an exported kernel function called 
"device_bind_driver" which creates the same links. However, it does some
additional stuff as well and there is currently no 
"device_unbind_driver" yet. Either "device_unbind_driver" needs to
be added or the following two already existing functions could be exported:

driver_sysfs_add
driver_sysfs_remove


Regards,
Jan-Bernd & Christoph Raisch

  parent reply	other threads:[~2008-01-29 10:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 16:33 [2.6.24-rc6-mm1]Build failure in drivers/net/ehea/ehea_main.c Sudhir Kumar
2008-01-10 17:34 ` Greg KH
2008-01-18  9:16   ` Jan-Bernd Themann
2008-01-25 19:10     ` Nathan Lynch
2008-01-28 18:21       ` Greg KH
2008-01-28 18:24       ` Greg KH
2008-01-28 19:22         ` Nathan Lynch
2008-01-28 19:54           ` Greg KH
2008-01-29 10:12           ` Jan-Bernd Themann [this message]
2008-01-29 13:23             ` Greg KH
2008-01-29 14:20               ` Christoph Raisch
2008-02-01 14:37                 ` Jan-Bernd Themann
2008-02-07 22:17                 ` Greg KH
2008-02-12 15:28                   ` Christoph Raisch
2008-01-28 18:25     ` Greg KH

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=200801291112.41337.ossthema@de.ibm.com \
    --to=ossthema@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntl@pobox.com \
    --cc=raisch@de.ibm.com \
    --cc=sam@ravnborg.org \
    --cc=skumar@linux.vnet.ibm.com \
    --cc=themann@de.ibm.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.