From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Michael Buesch <mb@bu3sch.de>
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 22:11:50 +0000 [thread overview]
Message-ID: <20070210221150.GA28338@srcf.ucam.org> (raw)
In-Reply-To: <200702102203.57411.mb@bu3sch.de>
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>
---
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 "
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2007-02-10 22:12 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 [this message]
2007-02-10 22:14 ` Michael Buesch
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=20070210221150.GA28338@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=mb@bu3sch.de \
--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 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).