forked from Minki/linux
virtio: bugfixes
This includes a bugfix for virtio 9p fs. It also fixes hybernation for s390 guests with virtio devices. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJahJ2jAAoJECgfDbjSjVRpGbsIAKvK50iQK/5Qe0X78DCv/9pW gVkW29bAKG8D8JcI/EViLFW3IgeDM1a2fcbCoSiOTzydAf6nMTI0vZqURopQbXKC teJw7PwHjaZ9Y3IL/mzMODrhZvZrl9iI2yAQoZqoeCeaX76t5k8kYB35U4Uuiw7Y gKWOpuOPEZx2mKrPCmIN2X0VrETJz122bNyb5DB+V4oLAx/9PolGGiGBmyu61pv/ Fx1PQ6at8/M+74tFeeFwKbuUf5GmdanqPVCZlJJPKa2acaRtBFhI01OhBMIxAUYj 9+1dzp5E4KjmGbz7Fd3dsleRLCV/q4E8gDWLbZVx4p2vVsp7edxk/29kcSVrhlE= =c8q9 -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "This includes a bugfix for virtio 9p fs. It also fixes hybernation for s390 guests with virtio devices" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio/s390: implement PM operations for virtio_ccw 9p/trans_virtio: discard zero-length reply
This commit is contained in:
commit
2439f9766d
@ -1297,6 +1297,9 @@ static int virtio_ccw_cio_notify(struct ccw_device *cdev, int event)
|
||||
vcdev->device_lost = true;
|
||||
rc = NOTIFY_DONE;
|
||||
break;
|
||||
case CIO_OPER:
|
||||
rc = NOTIFY_OK;
|
||||
break;
|
||||
default:
|
||||
rc = NOTIFY_DONE;
|
||||
break;
|
||||
@ -1309,6 +1312,27 @@ static struct ccw_device_id virtio_ids[] = {
|
||||
{},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int virtio_ccw_freeze(struct ccw_device *cdev)
|
||||
{
|
||||
struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
|
||||
|
||||
return virtio_device_freeze(&vcdev->vdev);
|
||||
}
|
||||
|
||||
static int virtio_ccw_restore(struct ccw_device *cdev)
|
||||
{
|
||||
struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
|
||||
int ret;
|
||||
|
||||
ret = virtio_ccw_set_transport_rev(vcdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return virtio_device_restore(&vcdev->vdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct ccw_driver virtio_ccw_driver = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
@ -1321,6 +1345,11 @@ static struct ccw_driver virtio_ccw_driver = {
|
||||
.set_online = virtio_ccw_online,
|
||||
.notify = virtio_ccw_cio_notify,
|
||||
.int_class = IRQIO_VIR,
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
.freeze = virtio_ccw_freeze,
|
||||
.thaw = virtio_ccw_restore,
|
||||
.restore = virtio_ccw_restore,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init pure_hex(char **cp, unsigned int *val, int min_digit,
|
||||
|
@ -160,7 +160,8 @@ static void req_done(struct virtqueue *vq)
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
/* Wakeup if anyone waiting for VirtIO ring space. */
|
||||
wake_up(chan->vc_wq);
|
||||
p9_client_cb(chan->client, req, REQ_STATUS_RCVD);
|
||||
if (len)
|
||||
p9_client_cb(chan->client, req, REQ_STATUS_RCVD);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user