Laurent Vivier 65c2ab8085 igb: fix link state on resume
On resume igb_vm_state_change() always calls igb_autoneg_resume()
that sets link_down to false, and thus activates the link even
if we have disabled it.

The problem can be reproduced starting qemu in paused state (-S) and
then set the link to down. When we resume the machine the link appears
to be up.

Reproducer:

   # qemu-system-x86_64 ... -device igb,netdev=netdev0,id=net0 -S

   {"execute": "qmp_capabilities" }
   {"execute": "set_link", "arguments": {"name": "net0", "up": false}}
   {"execute": "cont" }

To fix the problem, merge the content of igb_vm_state_change()
into igb_core_post_load() as e1000 does.

Buglink: https://issues.redhat.com/browse/RHEL-21867
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Cc: akihiko.odaki@daynix.com
Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2024-03-12 19:28:31 +08:00
..
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-11-13 15:33:37 +08:00
2024-03-12 19:28:31 +08:00
2024-03-12 19:28:31 +08:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-05-23 15:20:15 +08:00
2023-05-23 15:20:15 +08:00
2023-12-30 07:38:06 +11:00
2024-02-02 13:51:59 +00:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2024-02-02 13:51:59 +00:00
2024-02-28 11:31:28 +08:00
2023-12-30 07:38:06 +11:00
2023-09-20 07:54:34 +03:00
2023-12-30 07:38:06 +11:00