Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935052AbYBGWeu (ORCPT ); Thu, 7 Feb 2008 17:34:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933569AbYBGWeQ (ORCPT ); Thu, 7 Feb 2008 17:34:16 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:59958 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933204AbYBGWeN (ORCPT ); Thu, 7 Feb 2008 17:34:13 -0500 Date: Thu, 7 Feb 2008 14:17:12 -0800 From: Greg KH To: Christoph Raisch Cc: akpm@linux-foundation.org, Jan-Bernd Themann , linux-kernel@vger.kernel.org, Nathan Lynch , ossthema@linux.vnet.ibm.com, sam@ravnborg.org, Sudhir Kumar , Joachim Fenkes Subject: Re: [2.6.24-rc6-mm1]Build failure in drivers/net/ehea/ehea_main.c Message-ID: <20080207221712.GC19310@kroah.com> References: <20080108163305.GB10026@in.ibm.com> <20080128182423.GC28861@kroah.com> <20080128192204.GO14201@localdomain> <200801291112.41337.ossthema@de.ibm.com> <20080129132309.GA10898@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4268 Lines: 103 On Tue, Jan 29, 2008 at 03:20:20PM +0100, Christoph Raisch wrote: > Greg KH wrote on 29.01.2008 14:23:09: > > > On Tue, Jan 29, 2008 at 11:12:40AM +0100, Jan-Bernd Themann wrote: > ... > > > 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. > > > > Then please fix that, no other driver has this kind of problem, right? > > Are you just passing the wrong "device" to the networking subsystem? > > > > > If this sym-link is of interest (which I guess is the case as most > devices > > > have it) we have to create it somehow. > > > > Why would you have to do this by hand? What makes this driver so unique > > in the kernel that it would have to do this? We have lots of other > > multi-port ethernet drivers today without this issue, right? > > > > confused, > > > > greg k-h > > well, the major difference is hea is not PCI. What is it? It has to live on some kind of bus, right? > All PCI cards we checked have a 1:1 relationship between PCI function (PCI > config space) and a single ethernet port. > Even if the same Ethernet chip has two ports, it shows up as two separate > adapters from the PCI perspective (two PCI entries in /sys/bus/pci/devices > > host:/ # ls -l /sys/bus/pci/devices/0000\:c8\:01.0/ > total 0 > lrwxrwxrwx 1 root root 0 2008-01-28 14:59 bus -> ../../../../bus/pci > -r--r--r-- 1 root root 4096 2008-01-28 14:59 class > -rw-r--r-- 1 root root 256 2008-01-28 14:59 config > -r--r--r-- 1 root root 4096 2008-01-28 14:59 device > -r--r--r-- 1 root root 4096 2008-01-29 14:26 devspec > lrwxrwxrwx 1 root root 0 2008-01-28 14:59 driver -> > ../../../../bus/pci/drivers/e1000 > -r--r--r-- 1 root root 4096 2008-01-28 14:59 irq > -r--r--r-- 1 root root 4096 2008-01-29 14:26 local_cpus > -r--r--r-- 1 root root 4096 2008-01-28 14:59 modalias > lrwxrwxrwx 1 root root 0 2008-01-29 14:26 net:eth1 -> > ../../../../class/net/eth1 > -r--r--r-- 1 root root 4096 2008-01-28 14:59 resource > .... > host:/ # ls -l /sys/bus/pci/devices/0000\:c8\:01.1/ > total 0 > lrwxrwxrwx 1 root root 0 2008-01-28 14:59 bus -> ../../../../bus/pci > -r--r--r-- 1 root root 4096 2008-01-28 14:59 class > -rw-r--r-- 1 root root 256 2008-01-28 14:59 config > -r--r--r-- 1 root root 4096 2008-01-28 14:59 device > -r--r--r-- 1 root root 4096 2008-01-29 14:29 devspec > lrwxrwxrwx 1 root root 0 2008-01-28 14:59 driver -> > ../../../../bus/pci/drivers/e1000 > -r--r--r-- 1 root root 4096 2008-01-28 14:59 irq > -r--r--r-- 1 root root 4096 2008-01-29 14:29 local_cpus > -r--r--r-- 1 root root 4096 2008-01-28 14:59 modalias > lrwxrwxrwx 1 root root 0 2008-01-29 14:29 net:eth2 -> > ../../../../class/net/eth2 > ... > > These pci functions corresponds to a > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1/port0 > and > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1/port1 > > The busdriver currently does not find out, how many ports are in a > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1. > This is up to the hardware specific driver responsible for ehea or ehca. > Think of a PCI card where the PCI busdriver > can not determine how many ports are implemented on the card. > > How should this be mapped to /sys ? > > Should we try to "flatten" the ports to something like > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1 > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1_port0 > /sys/bus/ibmebus/devices/789D.001.XXXXXX-P1_port1 > ...which means physical hierarchy information would look a bit strange, > but could be the simpler one. No. Why have a separate "port" device for every ethernet port? What keeps you from just creating the different network devices for your device, and pointing the parent to the same 789D.001.XXXXXX-P1 device? Lots of PCI devices hang "class devices" off of them all the time, why would this be any different from that? I think you all are trying to make this more complex than it really is :) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/