diff options
author | Dmitry Fleytman | 2013-03-28 09:53:29 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2013-04-08 14:01:14 +0200 |
commit | 3e948fd38556f872f40ac588ec9008c099010007 (patch) | |
tree | ec4c741deb363fedb81f9075dbfef9aaafeeed47 /hw/vmxnet3.c | |
parent | Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm (diff) | |
download | qemu-3e948fd38556f872f40ac588ec9008c099010007.tar.gz qemu-3e948fd38556f872f40ac588ec9008c099010007.tar.xz qemu-3e948fd38556f872f40ac588ec9008c099010007.zip |
vmxnet3: iPXE compatibility fixes
iPXE vmxnet3 driver makes a few assumptions regarding device operation
that were missed during testing with Linux and Windows drivers.
This patch adds following logic:
1. Additional GET commands processing added
2. Max number of RX chunks should be set to 1 when driver passes 0
via corresponding shared memory field
3. Enforecement for max chunks number added
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/vmxnet3.c')
-rw-r--r-- | hw/vmxnet3.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/vmxnet3.c b/hw/vmxnet3.c index bdd256e9d5..1e18168e0b 100644 --- a/hw/vmxnet3.c +++ b/hw/vmxnet3.c @@ -1033,6 +1033,7 @@ vmxnet3_indicate_packet(VMXNET3State *s) is_head = false; ready_rxcd_pa = new_rxcd_pa; new_rxcd_pa = 0; + num_frags++; } if (0 != ready_rxcd_pa) { @@ -1324,6 +1325,10 @@ static void vmxnet3_activate_device(VMXNET3State *s) s->max_rx_frags = VMXNET3_READ_DRV_SHARED16(s->drv_shmem, devRead.misc.maxNumRxSG); + if (s->max_rx_frags == 0) { + s->max_rx_frags = 1; + } + VMW_CFPRN("Max RX fragments is %u", s->max_rx_frags); s->event_int_idx = @@ -1524,6 +1529,12 @@ static uint64_t vmxnet3_get_command_status(VMXNET3State *s) VMW_CFPRN("Device active: %" PRIx64, ret); break; + case VMXNET3_CMD_RESET_DEV: + case VMXNET3_CMD_QUIESCE_DEV: + case VMXNET3_CMD_GET_QUEUE_STATUS: + ret = 0; + break; + case VMXNET3_CMD_GET_LINK: ret = s->link_status_and_speed; VMW_CFPRN("Link and speed: %" PRIx64, ret); |