/* Try to let xendev know that it is connected. Depends on the frontend being Connected. Note that this may be called more than once since the backend state is not modified.  */
static void xen_be_try_connected(struct XenDevice *xendev)
/* Try to let xendev know that it is connected. Depends on the frontend being Connected. Note that this may be called more than once since the backend state is not modified.  */
static void xen_be_try_connected(struct XenDevice *xendev)
{
    if (!xendev->ops->connected) {
        return;
    }
    if (xendev->fe_state != XenbusStateConnected) {
        if (xendev->ops->flags & DEVOPS_FLAG_IGNORE_STATE) {
            xen_be_printf(xendev, 2, "frontend not ready, ignoring\n");
        } else {
            xen_be_printf(xendev, 2, "frontend not ready (yet)\n");
            return;
        }
    }
    xendev->ops->connected(xendev);
}