All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: netdev@vger.kernel.org, bcm43xx-dev@lists.berlios.de,
	Felix Fietkau <nbd@nbd.name>
Subject: Re: The new SSB subsystem for bcm43xx (and others)
Date: Sat, 10 Feb 2007 23:14:53 +0100	[thread overview]
Message-ID: <200702102314.54194.mb@bu3sch.de> (raw)
In-Reply-To: <20070210221150.GA28338@srcf.ucam.org>

On Saturday 10 February 2007 23:11, Matthew Garrett wrote:
> On Sat, Feb 10, 2007 at 10:03:57PM +0100, Michael Buesch wrote:
> > On Saturday 10 February 2007 21:46, Matthew Garrett wrote:
> > > I'm testing with your bcm43xx git tree, which I'm guessing is the 
> > > current ssb code. The only problem I've found is that there doesn't seem 
> > > to be any sysfs relationship between the ssb bus and (in this case) the 
> > > PCI device that it's associated with. Is this fixable? Right now it 
> > > appears as an entirely separate branch of the device tree, which doesn't 
> > > seem quite right.
> > 
> > I guess that's fixable, but I didn't care too much, yet.
> 
> Ok, here's a patch. The stack of PCMCIA headers are needed to get the 
> pcmcia_device structure. Seems to work fine for PCI - I don't have any 
> PCMCIA devices. The SSB devices now appear underneath the PCI device 
> rather than in the top level of /sys/devices.
> 
> Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>

Ok, nice. Thanks for figuring this out.
I'll apply this too my tree.

> ---
> 
> diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
> index 64f94b8..b16cee9 100644
> --- a/drivers/ssb/scan.c
> +++ b/drivers/ssb/scan.c
> @@ -15,6 +15,11 @@
>  #include <linux/ssb/ssb.h>
>  #include <linux/ssb/ssb_regs.h>
>  #include <linux/pci.h>
> +#include <pcmcia/cs_types.h>
> +#include <pcmcia/cs.h>
> +#include <pcmcia/cistpl.h>
> +#include <pcmcia/ciscode.h>
> +#include <pcmcia/ds.h>
>  #include <asm/io.h>
>  
>  #include "ssb_private.h"
> @@ -306,8 +311,12 @@ int ssb_bus_scan(struct ssb_bus *bus,
>  		dev->id.vendor = (idhi & SSB_IDHIGH_VC) >> SSB_IDHIGH_VC_SHIFT;
>  		dev->core_index = i;
>  		dev->bus = bus;
> -		if ((dev->bus->bustype == SSB_BUSTYPE_PCI) && (bus->host_pci))
> +		if ((dev->bus->bustype == SSB_BUSTYPE_PCI) && (bus->host_pci)) {
>  			dev->irq = bus->host_pci->irq;
> +			dev->dev.parent = &bus->host_pci->dev;
> +		} else if (dev->bus->bustype == SSB_BUSTYPE_PCMCIA) {
> +		        dev->dev.parent = &bus->host_pcmcia->dev;
> +		}
>  
>  		ssb_dprintk(KERN_INFO PFX
>  			    "Core %d found: %s "
> 

-- 
Greetings Michael.

  reply	other threads:[~2007-02-10 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22 12:59 The new SSB subsystem for bcm43xx (and others) Michael Buesch
2007-02-10 20:46 ` Matthew Garrett
2007-02-10 21:03   ` Michael Buesch
2007-02-10 22:11     ` Matthew Garrett
2007-02-10 22:14       ` Michael Buesch [this message]
2007-02-10 22:56       ` Pavel Roskin
2007-02-10 23:10         ` Michael Buesch

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=200702102314.54194.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=mjg59@srcf.ucam.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    /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.