From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: pbonzini@redhat.com,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: [PATCH 2/3 v2] xen: improvement to wait_for_devices()
Date: Wed, 8 Jul 2009 12:27:38 +0200 [thread overview]
Message-ID: <1247048859-31845-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1247048859-31845-1-git-send-email-pbonzini@redhat.com>
When printing a warning about a timed-out device, print the
current state of both ends of the device connection (i.e., backend as
well as frontend). This backports half of changeset 146 from the
Xenbits tree.
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
The other half of changeset 146 is buggy and hence superseded
by patch 1/3.
drivers/xen/xenbus/xenbus_probe.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index c543766..3a867a5 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -885,10 +885,13 @@ static int print_device_status(struct device *dev, void *data)
/* Information only: is this too noisy? */
printk(KERN_INFO "XENBUS: Device with no driver: %s\n",
xendev->nodename);
- } else if (xendev->state != XenbusStateConnected) {
+ } else if (xendev->state < XenbusStateConnected) {
+ enum xenbus_state rstate = XenbusStateUnknown;
+ if (xendev->otherend)
+ rstate = xenbus_read_driver_state(xendev->otherend);
printk(KERN_WARNING "XENBUS: Timeout connecting "
- "to device: %s (state %d)\n",
- xendev->nodename, xendev->state);
+ "to device: %s (local state %d, remote state %d)\n",
+ xendev->nodename, xendev->state, rstate);
}
return 0;
--
1.6.2.5
next prev parent reply other threads:[~2009-07-08 10:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 13:12 [PATCH] xen: wait up to 5 minutes for device connection Paolo Bonzini
2009-07-03 13:28 ` Ian Campbell
2009-07-03 16:00 ` Christoph Hellwig
2009-07-03 21:21 ` Gerd Hoffmann
2009-07-04 15:15 ` Valdis.Kletnieks
2009-07-06 7:43 ` Gerd Hoffmann
2009-07-06 21:54 ` Jeremy Fitzhardinge
2009-07-08 10:27 ` [PATCH 1/3 v2] xen: fix is_disconnected_device/exists_disconnected_device Paolo Bonzini
2009-07-08 10:27 ` Paolo Bonzini [this message]
2009-07-08 10:27 ` [PATCH 3/3 v2] xen: wait up to 5 minutes for device connetion Paolo Bonzini
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=1247048859-31845-2-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=jeremy.fitzhardinge@citrix.com \
--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®