From: David Woodhouse <dwmw2@infradead.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
wireless <linux-wireless@vger.kernel.org>,
b43-dev <b43-dev@lists.infradead.org>
Subject: [PATCH] Add uevent to bcma bus, to autoload drivers.
Date: Wed, 17 Aug 2011 15:43:37 -0600 [thread overview]
Message-ID: <1313617419.3990.134.camel@shinybook.infradead.org> (raw)
In-Reply-To: <CACna6ryErHY+OyAnvc9+MYArb5mXpSdadOPADsQOBz796UqSUw@mail.gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
--
On Wed, 2011-08-17 at 20:27 +0200, Rafa? Mi?ecki wrote:
> > A minor annoyance is that the driver does not autoload on boot and had to be
> > manually modprobed. AFAIK, I don't have any blacklisting or other
> > configuration parameters that would cause this. Furthermore, I don't see
> > anything in the driver code that would cause this. Does autoload work on
> > your system?
>
> I've everything blacklisted (ssb, bcma, b43, wl, brcmsmac), so I
> didn't even notice that. However I got some reports (2 of them) that
> b43 doesn't auto load. I've to take a look at it, however I've no idea
> yet on what may be causing it.
The lack of uevent causes it. While looking, I note that suspend/resume
methods are also lacking from bcma.
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 7072216..8c09c3e 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL");
static int bcma_bus_match(struct device *dev, struct device_driver *drv);
static int bcma_device_probe(struct device *dev);
static int bcma_device_remove(struct device *dev);
+static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
{
@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = {
.match = bcma_bus_match,
.probe = bcma_device_probe,
.remove = bcma_device_remove,
+ .uevent = bcma_device_uevent,
.dev_attrs = bcma_device_attrs,
};
@@ -295,6 +297,16 @@ static int bcma_device_remove(struct device *dev)
return 0;
}
+static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+ struct bcma_device *core = container_of(dev, struct bcma_device, dev);
+
+ return add_uevent_var(env,
+ "MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X",
+ core->id.manuf, core->id.id,
+ core->id.rev, core->id.class);
+}
+
static int __init bcma_modinit(void)
{
int err;
--
dwmw2
next prev parent reply other threads:[~2011-08-17 21:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 15:19 Report on bcma with 14e4:4353 (BCM43224) Larry Finger
2011-08-17 18:27 ` Rafał Miłecki
2011-08-17 21:43 ` David Woodhouse [this message]
2011-08-18 6:46 ` [PATCH] Add uevent to bcma bus, to autoload drivers Rafał Miłecki
2011-08-18 7:51 ` David Woodhouse
2011-08-19 20:13 ` Rafał Miłecki
2011-08-19 20:52 ` David Woodhouse
2011-08-19 21:17 ` Rafał Miłecki
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=1313617419.3990.134.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=Larry.Finger@lwfinger.net \
--cc=b43-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zajec5@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox