diff options
-rw-r--r-- | drivers/s390/virtio/virtio_ccw.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c index 46b110a124b0..8688ad4c825f 100644 --- a/drivers/s390/virtio/virtio_ccw.c +++ b/drivers/s390/virtio/virtio_ccw.c | |||
@@ -342,13 +342,14 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, | |||
342 | ccw->count = sizeof(*thinint_area); | 342 | ccw->count = sizeof(*thinint_area); |
343 | ccw->cda = (__u32)(unsigned long) thinint_area; | 343 | ccw->cda = (__u32)(unsigned long) thinint_area; |
344 | } else { | 344 | } else { |
345 | /* payload is the address of the indicators */ | ||
345 | indicatorp = kmalloc(sizeof(&vcdev->indicators), | 346 | indicatorp = kmalloc(sizeof(&vcdev->indicators), |
346 | GFP_DMA | GFP_KERNEL); | 347 | GFP_DMA | GFP_KERNEL); |
347 | if (!indicatorp) | 348 | if (!indicatorp) |
348 | return; | 349 | return; |
349 | *indicatorp = 0; | 350 | *indicatorp = 0; |
350 | ccw->cmd_code = CCW_CMD_SET_IND; | 351 | ccw->cmd_code = CCW_CMD_SET_IND; |
351 | ccw->count = sizeof(vcdev->indicators); | 352 | ccw->count = sizeof(&vcdev->indicators); |
352 | ccw->cda = (__u32)(unsigned long) indicatorp; | 353 | ccw->cda = (__u32)(unsigned long) indicatorp; |
353 | } | 354 | } |
354 | /* Deregister indicators from host. */ | 355 | /* Deregister indicators from host. */ |
@@ -656,7 +657,10 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs, | |||
656 | } | 657 | } |
657 | } | 658 | } |
658 | ret = -ENOMEM; | 659 | ret = -ENOMEM; |
659 | /* We need a data area under 2G to communicate. */ | 660 | /* |
661 | * We need a data area under 2G to communicate. Our payload is | ||
662 | * the address of the indicators. | ||
663 | */ | ||
660 | indicatorp = kmalloc(sizeof(&vcdev->indicators), GFP_DMA | GFP_KERNEL); | 664 | indicatorp = kmalloc(sizeof(&vcdev->indicators), GFP_DMA | GFP_KERNEL); |
661 | if (!indicatorp) | 665 | if (!indicatorp) |
662 | goto out; | 666 | goto out; |
@@ -672,7 +676,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs, | |||
672 | vcdev->indicators = 0; | 676 | vcdev->indicators = 0; |
673 | ccw->cmd_code = CCW_CMD_SET_IND; | 677 | ccw->cmd_code = CCW_CMD_SET_IND; |
674 | ccw->flags = 0; | 678 | ccw->flags = 0; |
675 | ccw->count = sizeof(vcdev->indicators); | 679 | ccw->count = sizeof(&vcdev->indicators); |
676 | ccw->cda = (__u32)(unsigned long) indicatorp; | 680 | ccw->cda = (__u32)(unsigned long) indicatorp; |
677 | ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND); | 681 | ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_IND); |
678 | if (ret) | 682 | if (ret) |
@@ -683,7 +687,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs, | |||
683 | vcdev->indicators2 = 0; | 687 | vcdev->indicators2 = 0; |
684 | ccw->cmd_code = CCW_CMD_SET_CONF_IND; | 688 | ccw->cmd_code = CCW_CMD_SET_CONF_IND; |
685 | ccw->flags = 0; | 689 | ccw->flags = 0; |
686 | ccw->count = sizeof(vcdev->indicators2); | 690 | ccw->count = sizeof(&vcdev->indicators2); |
687 | ccw->cda = (__u32)(unsigned long) indicatorp; | 691 | ccw->cda = (__u32)(unsigned long) indicatorp; |
688 | ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND); | 692 | ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_SET_CONF_IND); |
689 | if (ret) | 693 | if (ret) |