mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-05 22:17:40 -07:00
hw/pvrdma: Make device state depend on Ethernet function state
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
This commit is contained in:
parent
028c3f93d6
commit
e976ebc87c
1 changed files with 2 additions and 1 deletions
|
|
@ -139,7 +139,8 @@ static int query_port(PVRDMADev *dev, union pvrdma_cmd_req *req,
|
|||
resp->hdr.ack = PVRDMA_CMD_QUERY_PORT_RESP;
|
||||
resp->hdr.err = 0;
|
||||
|
||||
resp->attrs.state = attrs.state;
|
||||
resp->attrs.state = dev->func0->device_active ? attrs.state :
|
||||
PVRDMA_PORT_DOWN;
|
||||
resp->attrs.max_mtu = attrs.max_mtu;
|
||||
resp->attrs.active_mtu = attrs.active_mtu;
|
||||
resp->attrs.phys_state = attrs.phys_state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue