/* We are reconnecting to the backend, due to a suspend/resume, or a backend driver restart. We tear down our blkif structure and recreate it, but leave the device-layer structures intact so that this is transparent to the rest of the kernel.  */
static int blkfront_resume(struct xenbus_device *dev)
/* We are reconnecting to the backend, due to a suspend/resume, or a backend driver restart. We tear down our blkif structure and recreate it, but leave the device-layer structures intact so that this is transparent to the rest of the kernel.  */
static int blkfront_resume(struct xenbus_device *dev)
{
	struct blkfront_info *info = dev_get_drvdata(&dev->dev);
	int err;
	dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename);
	blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
	err = talk_to_backend(dev, info);
	if (info->connected == BLKIF_STATE_SUSPENDED && !err)
		err = blkif_recover(info);
	return err;
}