MCPcopy Create free account
hub / github.com/F-Stack/f-stack / virtio_reset

Function virtio_reset

dpdk/drivers/net/virtio/virtio.c:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void
42virtio_reset(struct virtio_hw *hw)
43{
44 uint32_t retry = 0;
45
46 VIRTIO_OPS(hw)->set_status(hw, VIRTIO_CONFIG_STATUS_RESET);
47 /* Flush status write and wait device ready max 3 seconds. */
48 while (VIRTIO_OPS(hw)->get_status(hw) != VIRTIO_CONFIG_STATUS_RESET) {
49 if (retry++ > 3000) {
50 PMD_INIT_LOG(WARNING, "port %u device reset timeout", hw->port_id);
51 break;
52 }
53 usleep(1000L);
54 }
55}
56
57void
58virtio_reinit_complete(struct virtio_hw *hw)

Callers 3

virtio_dev_closeFunction · 0.85
virtio_init_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected