From: Manuel Estrada Sainz <ranty@debian.org>
To: Michael Hunold <hunold@convergence.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>,
John Alvord <jalvo@mbay.net>
Subject: Re: [PATCH] request_firmware() private workqueue (was: Re: Using firmware_class with recent 2.6 kernels)
Date: Sat, 26 Jul 2003 17:59:52 +0200 [thread overview]
Message-ID: <20030726155952.GA23335@ranty.pantax.net> (raw)
In-Reply-To: <20030726101818.GA25104@ranty.pantax.net>
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Sat, Jul 26, 2003 at 12:18:18PM +0200, Manuel Estrada Sainz wrote:
> On Mon, Jul 21, 2003 at 01:41:11PM +0200, Michael Hunold wrote:
[snip]
> About the attached patch:
>
> - use a private workqueue so we can sleep without interfering
> with other subsystems.
Oops, as usuall I forgot to attach the patch, It is attached now.
Sorry
Manuel
--
--- Manuel Estrada Sainz <ranty@debian.org>
<ranty@bigfoot.com>
<ranty@users.sourceforge.net>
------------------------ <manuel.estrada@hispalinux.es> -------------------
Let us have the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
[-- Attachment #2: request_firmware_own-workqueue.diff --]
[-- Type: text/plain, Size: 1243 bytes --]
Index: firmware_class.c
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/base/firmware_class.c,v
retrieving revision 1.3
diff -u -r1.3 firmware_class.c
--- firmware_class.c 4 Jul 2003 02:21:18 -0000 1.3
+++ firmware_class.c 26 Jul 2003 08:38:07 -0000
@@ -22,6 +22,8 @@
MODULE_LICENSE("GPL");
static int loading_timeout = 10; /* In seconds */
+static struct workqueue_struct *firmware_wq;
+
struct firmware_priv {
char fw_id[FIRMWARE_NAME_MAX];
@@ -467,7 +469,7 @@
};
INIT_WORK(&fw_work->work, request_firmware_work_func, fw_work);
- schedule_work(&fw_work->work);
+ queue_work(firmware_wq, &fw_work->work);
return 0;
}
@@ -485,12 +487,20 @@
__FUNCTION__);
class_unregister(&firmware_class);
}
+ firmware_wq = create_workqueue("firmware");
+ if (!firmware_wq) {
+ printk(KERN_ERR "%s: create_workqueue failed\n", __FUNCTION__);
+ class_remove_file(&firmware_class, &class_attr_timeout);
+ class_unregister(&firmware_class);
+ error = -EIO;
+ }
return error;
}
static void __exit
firmware_class_exit(void)
{
+ destroy_workqueue(firmware_wq);
class_remove_file(&firmware_class, &class_attr_timeout);
class_unregister(&firmware_class);
}
next prev parent reply other threads:[~2003-07-26 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F1BD157.4090509@convergence.de>
2003-07-26 10:18 ` Manuel Estrada Sainz
2003-07-26 15:59 ` Manuel Estrada Sainz [this message]
2003-07-29 15:02 ` [PATCH] request_firmware() private workqueue Michael Hunold
2003-08-01 19:15 ` [PATCH] " Manuel Estrada Sainz
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=20030726155952.GA23335@ranty.pantax.net \
--to=ranty@debian.org \
--cc=greg@kroah.com \
--cc=hunold@convergence.de \
--cc=jalvo@mbay.net \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®