From: Ursula Braun <ursula.braun@de.ibm.com>
To: davem@davemloft.net, netdev@vger.kernel.org, linux-s390@vger.kernel.org
Cc: schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 1/4] [PATCH] iucv: add work_queue cleanup for suspend
Date: Fri, 13 Nov 2009 08:46:27 +0100 [thread overview]
Message-ID: <20091113075050.470146000@linux.vnet.ibm.com> (raw)
In-Reply-To: 20091113074626.078348000@linux.vnet.ibm.com
[-- Attachment #1: 603-iucv-suspend-cleanup.diff --]
[-- Type: text/plain, Size: 1730 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
If iucv_work_queue is not empty during kernel freeze, a kernel panic
occurs. This suspend-patch adds flushing of the work queue for
pending connection requests and severing of remaining pending
connections.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
---
net/iucv/iucv.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
Index: linux-next-uschi/net/iucv/iucv.c
===================================================================
--- linux-next-uschi.orig/net/iucv/iucv.c
+++ linux-next-uschi/net/iucv/iucv.c
@@ -1768,7 +1768,6 @@ static void iucv_tasklet_fn(unsigned lon
*/
static void iucv_work_fn(struct work_struct *work)
{
- typedef void iucv_irq_fn(struct iucv_irq_data *);
LIST_HEAD(work_queue);
struct iucv_irq_list *p, *n;
@@ -1878,14 +1877,25 @@ int iucv_path_table_empty(void)
static int iucv_pm_freeze(struct device *dev)
{
int cpu;
+ struct iucv_irq_list *p, *n;
int rc = 0;
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "iucv_pm_freeze\n");
#endif
+ if (iucv_pm_state != IUCV_PM_FREEZING) {
+ for_each_cpu_mask_nr(cpu, iucv_irq_cpumask)
+ smp_call_function_single(cpu, iucv_block_cpu_almost,
+ NULL, 1);
+ cancel_work_sync(&iucv_work);
+ list_for_each_entry_safe(p, n, &iucv_work_queue, list) {
+ list_del_init(&p->list);
+ iucv_sever_pathid(p->data.ippathid,
+ iucv_error_no_listener);
+ kfree(p);
+ }
+ }
iucv_pm_state = IUCV_PM_FREEZING;
- for_each_cpu_mask_nr(cpu, iucv_irq_cpumask)
- smp_call_function_single(cpu, iucv_block_cpu_almost, NULL, 1);
if (dev->driver && dev->driver->pm && dev->driver->pm->freeze)
rc = dev->driver->pm->freeze(dev);
if (iucv_path_table_empty())
next prev parent reply other threads:[~2009-11-13 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 7:46 [patch 0/4] s390: networking patches for 2.6.33 Ursula Braun
2009-11-13 7:46 ` Ursula Braun [this message]
2009-11-13 7:46 ` [patch 2/4] [PATCH] ctcm: suspend has to wait for outstanding I/O Ursula Braun
2009-11-13 7:46 ` [patch 3/4] [PATCH] s390: remove cu3088 layer for lcs and ctcm Ursula Braun
2009-11-13 7:46 ` [patch 4/4] [PATCH] netiucv: displayed TX bytes value much too high Ursula Braun
2009-11-14 4:49 ` [patch 0/4] s390: networking patches for 2.6.33 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=20091113075050.470146000@linux.vnet.ibm.com \
--to=ursula.braun@de.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=schwidefsky@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).