/* Try to reset xendev, for reconnection by another frontend instance.  */
static int xen_be_try_reset(struct XenDevice *xendev)
/* Try to reset xendev, for reconnection by another frontend instance.  */
static int xen_be_try_reset(struct XenDevice *xendev)
{
    if (xendev->fe_state != XenbusStateInitialising) {
        return -1;
    }
    xen_be_printf(xendev, 1, "device reset (for re-connect)\n");
    xen_be_set_state(xendev, XenbusStateInitialising);
    return 0;
}