From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 01/11] [PATCH] smsgiucv: guarantee single iucv connect in thaw
Date: Tue, 22 Jun 2010 10:57:02 +0200 [thread overview]
Message-ID: <20100622085806.920924000@de.ibm.com> (raw)
In-Reply-To: 20100622085701.772508000@de.ibm.com
[-- Attachment #1: 601-smsgiucv-thaw-path-connect.diff --]
[-- Type: text/plain, Size: 2207 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
If another smsgiucv_app device exists, suspend / resume fails with
iucv path list corruption, because the same iucv_path_connect is
called twice.
The patch introduces a flag to save connect status of the smsgiucv
path to make sure iucv_path_connect in smsg_pm_restore_thaw is
called only once.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/smsgiucv.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff -urpN linux-2.6/drivers/s390/net/smsgiucv.c linux-2.6-patched/drivers/s390/net/smsgiucv.c
--- linux-2.6/drivers/s390/net/smsgiucv.c 2010-05-16 23:17:36.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/smsgiucv.c 2010-06-22 08:54:57.000000000 +0200
@@ -47,6 +47,7 @@ static struct device *smsg_dev;
static DEFINE_SPINLOCK(smsg_list_lock);
static LIST_HEAD(smsg_list);
+static int iucv_path_connected;
static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]);
static void smsg_message_pending(struct iucv_path *, struct iucv_message *);
@@ -142,8 +143,10 @@ static int smsg_pm_freeze(struct device
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "smsg_pm_freeze\n");
#endif
- if (smsg_path)
+ if (smsg_path && iucv_path_connected) {
iucv_path_sever(smsg_path, NULL);
+ iucv_path_connected = 0;
+ }
return 0;
}
@@ -154,7 +157,7 @@ static int smsg_pm_restore_thaw(struct d
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "smsg_pm_restore_thaw\n");
#endif
- if (smsg_path) {
+ if (smsg_path && iucv_path_connected) {
memset(smsg_path, 0, sizeof(*smsg_path));
smsg_path->msglim = 255;
smsg_path->flags = 0;
@@ -165,6 +168,8 @@ static int smsg_pm_restore_thaw(struct d
printk(KERN_ERR
"iucv_path_connect returned with rc %i\n", rc);
#endif
+ if (!rc)
+ iucv_path_connected = 1;
cpcmd("SET SMSG IUCV", NULL, 0, NULL);
}
return 0;
@@ -214,6 +219,8 @@ static int __init smsg_init(void)
NULL, NULL, NULL);
if (rc)
goto out_free_path;
+ else
+ iucv_path_connected = 1;
smsg_dev = kzalloc(sizeof(struct device), GFP_KERNEL);
if (!smsg_dev) {
rc = -ENOMEM;
next prev parent reply other threads:[~2010-06-22 8:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 8:57 [patch 00/11] s390: qeth patches for 2.6.36 frank.blaschka
2010-06-22 8:57 ` frank.blaschka [this message]
2010-06-22 8:57 ` [patch 02/11] [PATCH] qeth: Rework qeth_dbf_longtext frank.blaschka
2010-06-22 8:57 ` [patch 03/11] [PATCH] qeth: Add new s390 debug feature for each qeth card frank.blaschka
2010-06-22 8:57 ` [patch 04/11] [PATCH] qeth: Fold qeth_trace debug area frank.blaschka
2010-06-22 8:57 ` [patch 05/11] [PATCH] qeth: Fold qeth_sense " frank.blaschka
2010-06-22 8:57 ` [patch 06/11] [PATCH] qeth: Fold qeth_misc " frank.blaschka
2010-06-22 8:57 ` [patch 07/11] [PATCH] qeth: Fold qeth_qerr " frank.blaschka
2010-06-22 8:57 ` [patch 08/11] [PATCH] qeth: fix use after free for qeths " frank.blaschka
2010-06-22 8:57 ` [patch 09/11] [PATCH] qeth: fix page breaks in hw headers frank.blaschka
2010-06-22 8:57 ` [patch 10/11] [PATCH] qeth: specify correct function level for OSN devices frank.blaschka
2010-06-22 8:57 ` [patch 11/11] [PATCH] qeth: handle missing z/VM authorization of OSX frank.blaschka
2010-06-23 19:08 ` [patch 00/11] s390: qeth patches for 2.6.36 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=20100622085806.920924000@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ursula.braun@de.ibm.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).