Skip to content

Commit

Permalink
s390x: fix s390-virtio-serial
Browse files Browse the repository at this point in the history
Commit 6b331ef broke the s390 proxy version
of virtio-serial by only taking its PCI brother into account.

So let's adjust s390-virtio-serial the same way as its PCI counterpart, making
it compile and work again.

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  • Loading branch information
agraf authored and aurel32 committed Apr 3, 2011
1 parent 359507e commit 6be9b41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hw/s390-virtio-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static int s390_virtio_serial_init(VirtIOS390Device *dev)

bus = DO_UPCAST(VirtIOS390Bus, bus, dev->qdev.parent_bus);

vdev = virtio_serial_init((DeviceState *)dev, dev->max_virtserial_ports);
vdev = virtio_serial_init((DeviceState *)dev, &dev->serial);
if (!vdev) {
return -1;
}
Expand Down Expand Up @@ -355,8 +355,8 @@ static VirtIOS390DeviceInfo s390_virtio_serial = {
.qdev.alias = "virtio-serial",
.qdev.size = sizeof(VirtIOS390Device),
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("max_ports", VirtIOS390Device, max_virtserial_ports,
31),
DEFINE_PROP_UINT32("max_ports", VirtIOS390Device,
serial.max_virtserial_ports, 31),
DEFINE_PROP_END_OF_LIST(),
},
};
Expand Down
4 changes: 2 additions & 2 deletions hw/s390-virtio-bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include "virtio-net.h"
#include "virtio-serial.h"

#define VIRTIO_DEV_OFFS_TYPE 0 /* 8 bits */
#define VIRTIO_DEV_OFFS_NUM_VQ 1 /* 8 bits */
Expand All @@ -43,8 +44,7 @@ typedef struct VirtIOS390Device {
BlockConf block;
NICConf nic;
uint32_t host_features;
/* Max. number of ports we can have for a the virtio-serial device */
uint32_t max_virtserial_ports;
virtio_serial_conf serial;
virtio_net_conf net;
} VirtIOS390Device;

Expand Down

0 comments on commit 6be9b41

Please sign in to comment.