aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-29 12:45:54 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-29 12:45:54 +0100
commit76fbbec9315f8712d921411fbb4dad1fbcf1b151 (patch)
tree30b76243b8a5c98b64840c40e65597f94c08bfa0 /hw
parent2d80e0ab4b4326e340df7e0bcc687b2bc63c68d8 (diff)
parent5e80dd223ded254b1802bdd6417ef118456eadce (diff)
downloadqemu-76fbbec9315f8712d921411fbb4dad1fbcf1b151.zip
qemu-76fbbec9315f8712d921411fbb4dad1fbcf1b151.tar.gz
qemu-76fbbec9315f8712d921411fbb4dad1fbcf1b151.tar.bz2
Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging
Net patches # gpg: Signature made Fri 27 Jun 2014 14:10:57 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: hw/net/eepro100: Implement read-only bits in MDI registers net: move queue number into NICPeers net: L2TPv3 transport qemu-bridge-helper: Fix fd leak in main() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev-properties-system.c3
-rw-r--r--hw/net/eepro100.c4
-rw-r--r--hw/net/virtio-net.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index de433b2..52c2f8a 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -180,7 +180,6 @@ PropertyInfo qdev_prop_chr = {
static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
{
NICPeers *peers_ptr = (NICPeers *)ptr;
- NICConf *conf = container_of(peers_ptr, NICConf, peers);
NetClientState **ncs = peers_ptr->ncs;
NetClientState *peers[MAX_QUEUE_NUM];
int queues, i = 0;
@@ -219,7 +218,7 @@ static int parse_netdev(DeviceState *dev, const char *str, void **ptr)
ncs[i]->queue_index = i;
}
- conf->queues = queues;
+ peers_ptr->queues = queues;
return 0;
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index aaa3ff2..3263e3f 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -1217,7 +1217,6 @@ static void eepro100_write_mdi(EEPRO100State *s)
break;
case 1: /* Status Register */
missing("not writable");
- data = s->mdimem[reg];
break;
case 2: /* PHY Identification Register (Word 1) */
case 3: /* PHY Identification Register (Word 2) */
@@ -1230,7 +1229,8 @@ static void eepro100_write_mdi(EEPRO100State *s)
default:
missing("not implemented");
}
- s->mdimem[reg] = data;
+ s->mdimem[reg] &= eepro100_mdi_mask[reg];
+ s->mdimem[reg] |= data & ~eepro100_mdi_mask[reg];
} else if (opcode == 2) {
/* MDI read */
switch (reg) {
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 00b5e07..e51d753 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1542,7 +1542,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp)
virtio_init(vdev, "virtio-net", VIRTIO_ID_NET, n->config_size);
- n->max_queues = MAX(n->nic_conf.queues, 1);
+ n->max_queues = MAX(n->nic_conf.peers.queues, 1);
n->vqs = g_malloc0(sizeof(VirtIONetQueue) * n->max_queues);
n->vqs[0].rx_vq = virtio_add_queue(vdev, 256, virtio_net_handle_rx);
n->curr_queues = 1;