OSDN Git Service

xen/hvc: handle backend CLOSED without CLOSING
[uclinux-h8/linux.git] / drivers / tty / hvc / hvc_xen.c
index 2944ff8..f4abfe2 100644 (file)
@@ -478,7 +478,6 @@ static void xencons_backend_changed(struct xenbus_device *dev,
        case XenbusStateInitialising:
        case XenbusStateInitialised:
        case XenbusStateUnknown:
-       case XenbusStateClosed:
                break;
 
        case XenbusStateInitWait:
@@ -488,6 +487,10 @@ static void xencons_backend_changed(struct xenbus_device *dev,
                xenbus_switch_state(dev, XenbusStateConnected);
                break;
 
+       case XenbusStateClosed:
+               if (dev->state == XenbusStateClosed)
+                       break;
+               /* Missed the backend's CLOSING state -- fallthrough */
        case XenbusStateClosing:
                xenbus_frontend_closed(dev);
                break;