From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [patch 3/7] [PATCH] qeth: synchronize discipline module loading
Date: Wed, 07 Mar 2012 13:06:25 +0100 [thread overview]
Message-ID: <20120307120707.827023000@de.ibm.com> (raw)
In-Reply-To: 20120307120622.922387262@de.ibm.com
[-- Attachment #1: 610-qeth-sync-modules.diff --]
[-- Type: text/plain, Size: 1659 bytes --]
From: Frank Blaschka <frank.blaschka@de.ibm.com>
During system startup udev may try to configure devices in
parallel so we have to synchronize discipline module
loading.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff -urpN linux-2.6/drivers/s390/net/qeth_core_main.c linux-2.6-patched/drivers/s390/net/qeth_core_main.c
--- linux-2.6/drivers/s390/net/qeth_core_main.c 2012-03-06 13:35:59.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/qeth_core_main.c 2012-03-06 13:35:59.000000000 +0100
@@ -51,6 +51,7 @@ static struct kmem_cache *qeth_qdio_outb
static struct device *qeth_core_root_dev;
static unsigned int known_devices[][6] = QETH_MODELLIST_ARRAY;
static struct lock_class_key qdio_out_skb_queue_key;
+static struct mutex qeth_mod_mutex;
static void qeth_send_control_data_cb(struct qeth_channel *,
struct qeth_cmd_buffer *);
@@ -5040,6 +5041,7 @@ int qeth_core_load_discipline(struct qet
enum qeth_discipline_id discipline)
{
int rc = 0;
+ mutex_lock(&qeth_mod_mutex);
switch (discipline) {
case QETH_DISCIPLINE_LAYER3:
card->discipline.ccwgdriver = try_then_request_module(
@@ -5057,6 +5059,7 @@ int qeth_core_load_discipline(struct qet
"support discipline %d\n", discipline);
rc = -EINVAL;
}
+ mutex_unlock(&qeth_mod_mutex);
return rc;
}
@@ -5540,6 +5543,7 @@ static int __init qeth_core_init(void)
pr_info("loading core functions\n");
INIT_LIST_HEAD(&qeth_core_card_list.list);
rwlock_init(&qeth_core_card_list.rwlock);
+ mutex_init(&qeth_mod_mutex);
rc = qeth_register_dbf_views();
if (rc)
next prev parent reply other threads:[~2012-03-07 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 12:06 [patch 0/7] s390: network driver fixes for net-next frank.blaschka
2012-03-07 12:06 ` [patch 1/7] [PATCH] af_iucv: handle netdev events frank.blaschka
2012-03-07 12:06 ` [patch 2/7] [PATCH] af_iucv: add shutdown for HS transport frank.blaschka
2012-03-07 12:06 ` frank.blaschka [this message]
2012-03-07 12:06 ` [patch 4/7] [PATCH] ctcm: make ctcmpc debugging compilable frank.blaschka
2012-03-07 12:20 ` David Laight
2012-03-07 12:06 ` [patch 5/7] [PATCH] ctcm: use correct idal word list for ctcmpc frank.blaschka
2012-03-07 12:06 ` [patch 6/7] [PATCH] qeth: meaningful return code for set_mac_address frank.blaschka
2012-03-07 12:06 ` [patch 7/7] [PATCH] lcs: Return zero from ccwgroup devs set_offline function frank.blaschka
2012-03-08 6:52 ` [patch 0/7] s390: network driver fixes for net-next David Miller
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=20120307120707.827023000@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--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).