Skip to content

Commit

Permalink
xen: improvement to wait_for_devices()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Paolo Bonzini authored and Jeremy Fitzhardinge committed Dec 3, 2009
1 parent c6e1971 commit f8dc330
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/xen/xenbus/xenbus_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f8dc330

Please sign in to comment.