summary refs log tree commit diff stats
path: root/hw/net/igb.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2023-10-23 17:45:06 +0200
committerJason Wang <jasowang@redhat.com>2023-11-13 15:33:37 +0800
commitfe73674af1e80ad7375e627563042395a1a746b6 (patch)
tree990cef48cb12eb9cb63f047729a12f658600712a /hw/net/igb.c
parent69680740eafa1838527c90155a7432d51b8ff203 (diff)
downloadfocaccia-qemu-fe73674af1e80ad7375e627563042395a1a746b6.tar.gz
focaccia-qemu-fe73674af1e80ad7375e627563042395a1a746b6.zip
igb: Add a VF reset handler
Export the igb_vf_reset() helper routine from the PF model to let the
IGBVF model implement its own device reset.

Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Suggested-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/igb.c')
-rw-r--r--hw/net/igb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/net/igb.c b/hw/net/igb.c
index 8ff832acfc..e70a66ee03 100644
--- a/hw/net/igb.c
+++ b/hw/net/igb.c
@@ -122,6 +122,12 @@ igb_mmio_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
     igb_core_write(&s->core, addr, val, size);
 }
 
+void igb_vf_reset(void *opaque, uint16_t vfn)
+{
+    IGBState *s = opaque;
+    igb_core_vf_reset(&s->core, vfn);
+}
+
 static bool
 igb_io_get_reg_index(IGBState *s, uint32_t *idx)
 {