diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-27 05:44:53 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-27 05:44:53 -0800 |
commit | cc11f372e9371ec3a3dad02396dbe0a55eec0b8f (patch) | |
tree | fd22bdac975ee61053e787ad96c912fddc485370 /drivers/scsi/virtio_scsi.c | |
parent | 5b4af8b6397c2da6e3c05893d974b6559441901d (diff) | |
parent | 77d143de75812596a58d126606f42d1214e09dde (diff) | |
download | linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.tar.gz linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.tar.bz2 linux-stable-cc11f372e9371ec3a3dad02396dbe0a55eec0b8f.zip |
Merge branch 'master' into staging-next
We need the network changes in staging-next in order to be able to fix
up the rtl8821ae driver to build properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/virtio_scsi.c')
-rw-r--r-- | drivers/scsi/virtio_scsi.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index c3173dced870..16bfd50cd3fe 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -956,6 +956,10 @@ static void virtscsi_remove(struct virtio_device *vdev) #ifdef CONFIG_PM_SLEEP static int virtscsi_freeze(struct virtio_device *vdev) { + struct Scsi_Host *sh = virtio_scsi_host(vdev); + struct virtio_scsi *vscsi = shost_priv(sh); + + unregister_hotcpu_notifier(&vscsi->nb); virtscsi_remove_vqs(vdev); return 0; } @@ -964,8 +968,17 @@ static int virtscsi_restore(struct virtio_device *vdev) { struct Scsi_Host *sh = virtio_scsi_host(vdev); struct virtio_scsi *vscsi = shost_priv(sh); + int err; + + err = virtscsi_init(vdev, vscsi); + if (err) + return err; + + err = register_hotcpu_notifier(&vscsi->nb); + if (err) + vdev->config->del_vqs(vdev); - return virtscsi_init(vdev, vscsi); + return err; } #endif |