From: Pavel Machek <pavel@ucw.cz>
To: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jgarzik@pobox.com>,
yi.zhu@intel.com, jketreno@linux.intel.com,
Netdev list <netdev@vger.kernel.org>,
linville@tuxdriver.com,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [patch] do not allow IPW_2100=Y or IPW_2200=Y
Date: Tue, 11 Jul 2006 15:32:28 +0200 [thread overview]
Message-ID: <20060711133227.GA1650@elf.ucw.cz> (raw)
In-Reply-To: <200607102305.06572.mb@bu3sch.de>
On Mon 2006-07-10 23:05:06, Michael Buesch wrote:
> On Monday 10 July 2006 19:53, you wrote:
> > Pavel Machek wrote:
> > > Kconfig currently allows compiling IPW_2100 and IPW_2200 into kernel
> > > (not as a module). Unfortunately, such configuration does not work,
> > > because these drivers need a firmware, and it can't be loaded by
> > > userspace loader when userspace is not running.
> >
> > False, initramfs...
>
> Does the ipw driver _really_ need the firmware on insmod time?
> bcm43xx, for example, loads the firmware on "ifconfig up" time.
> If ipw really needs the firmware on insmod, is it possible to
> defer it to later at "ifconfig up" time?
Probably not. This (very dirty) hack implements that (with some level
of success -- ifconfig down/ifconfig up is enough to get wireless
working).
Signed-off-by: Pavel Machek <pavel@suse.cz>
Pavel
--- clean-mm/drivers/net/wireless/ipw2200.c 2006-07-11 15:22:50.000000000 +0200
+++ linux-mm/drivers/net/wireless/ipw2200.c 2006-07-11 14:38:01.000000000 +0200
@@ -97,6 +97,7 @@
static int bt_coexist = 0;
static int hwcrypto = 0;
static int roaming = 1;
+static int needs_reinit = 1;
static const char ipw_modes[] = {
'a', 'b', 'g', '?'
};
@@ -10013,10 +10014,20 @@
sys_config->silence_threshold = 0x1e;
}
+static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state);
+static int ipw_pci_resume(struct pci_dev *pdev);
+
static int ipw_net_open(struct net_device *dev)
{
struct ipw_priv *priv = ieee80211_priv(dev);
IPW_DEBUG_INFO("dev->open\n");
+
+ if (needs_reinit) {
+ printk("ipw: Delayed loading the firmware\n");
+ ipw_pci_suspend(priv->pci_dev, PMSG_FREEZE);
+ ipw_pci_resume(priv->pci_dev);
+ }
+
/* we should be verifying the device is ready to be opened */
mutex_lock(&priv->mutex);
if (!(priv->status & STATUS_RF_KILL_MASK) &&
@@ -11295,7 +11306,8 @@
if (ipw_up(priv)) {
mutex_unlock(&priv->mutex);
- return -EIO;
+ needs_reinit = 1;
+ return 0;
}
mutex_unlock(&priv->mutex);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2006-07-11 21:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 15:20 [patch] do not allow IPW_2100=Y or IPW_2200=Y Pavel Machek
2006-07-10 17:53 ` Jeff Garzik
2006-07-10 18:29 ` Auke Kok
2006-07-10 18:47 ` David Miller
2006-07-10 18:51 ` Arjan van de Ven
2006-07-10 20:56 ` Joel Becker
2006-07-11 14:42 ` Arjan van de Ven
2006-07-11 21:53 ` Joel Becker
2006-07-11 11:27 ` Pavel Machek
2006-07-11 14:42 ` Arjan van de Ven
2006-07-10 21:05 ` Michael Buesch
2006-07-11 11:53 ` Daniel Drake
2006-07-11 20:39 ` Michael Buesch
2006-07-11 20:59 ` Daniel Drake
2006-07-11 13:32 ` Pavel Machek [this message]
2006-07-12 4:39 ` Zhu Yi
2006-07-27 14:43 ` John W. Linville
2006-07-11 13:34 ` [patch] cleanup // comments from ipw2200 Pavel Machek
2006-07-10 22:21 ` [patch] do not allow IPW_2100=Y or IPW_2200=Y Jan Engelhardt
[not found] <6x7TQ-87H-17@gated-at.bofh.it>
[not found] ` <6x8df-8wm-13@gated-at.bofh.it>
[not found] ` <6xbaZ-4NX-1@gated-at.bofh.it>
[not found] ` <6xyhj-5Fq-19@gated-at.bofh.it>
2006-07-12 20:56 ` Bodo Eggert
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=20060711133227.GA1650@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=jgarzik@pobox.com \
--cc=jketreno@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
--cc=yi.zhu@intel.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;
as well as URLs for NNTP newsgroup(s).