summaryrefslogtreecommitdiffstats
path: root/hw/net
diff options
context:
space:
mode:
authorMiao Yan <yanmiaobest@gmail.com>2015-12-22 22:06:09 -0800
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:23 -0600
commit66907adefbe9a8f876cf2aa173e8f08e9334546d (patch)
tree8cc9400c98af58531bf17ca96b8c0c97adc6833a /hw/net
parent279fb1ab5af3f4dffd2d51c65d41eb409217f727 (diff)
downloadhqemu-66907adefbe9a8f876cf2aa173e8f08e9334546d.zip
hqemu-66907adefbe9a8f876cf2aa173e8f08e9334546d.tar.gz
net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO
VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation mode This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.x+) 2) modify vmxnet3 Linux driver to read the register: VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_DEV_EXTRA_INFO); ret = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); pr_info("vmxnet3 dev_info: 0x%x\n", ret); The kernel log will have some like the following message: [ 7005.111170] vmxnet3 dev_info: 0x0 Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/vmxnet3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 0aff0d4..da59d7d 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1658,6 +1658,10 @@ static void vmxnet3_handle_command(VMXNET3State *s, uint64_t cmd)
VMW_CBPRN("Set: Get upper part of device ID");
break;
+ case VMXNET3_CMD_GET_DEV_EXTRA_INFO:
+ VMW_CBPRN("Set: Get device extra info");
+ break;
+
default:
VMW_CBPRN("Received unknown command: %" PRIx64, cmd);
break;
@@ -1677,6 +1681,7 @@ static uint64_t vmxnet3_get_command_status(VMXNET3State *s)
case VMXNET3_CMD_RESET_DEV:
case VMXNET3_CMD_QUIESCE_DEV:
case VMXNET3_CMD_GET_QUEUE_STATUS:
+ case VMXNET3_CMD_GET_DEV_EXTRA_INFO:
ret = 0;
break;
OpenPOWER on IntegriCloud