Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_virtio_console.c
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
pci_vtcon_reset(void *vsc) | pci_vtcon_reset(void *vsc) | ||||
{ | { | ||||
struct pci_vtcon_softc *sc; | struct pci_vtcon_softc *sc; | ||||
sc = vsc; | sc = vsc; | ||||
DPRINTF(("vtcon: device reset requested!\n")); | DPRINTF(("vtcon: device reset requested!\n\r")); | ||||
vi_reset_dev(&sc->vsc_vs); | vi_reset_dev(&sc->vsc_vs); | ||||
} | } | ||||
static void | static void | ||||
pci_vtcon_neg_features(void *vsc, uint64_t negotiated_features) | pci_vtcon_neg_features(void *vsc, uint64_t negotiated_features) | ||||
{ | { | ||||
struct pci_vtcon_softc *sc = vsc; | struct pci_vtcon_softc *sc = vsc; | ||||
▲ Show 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | for (i = 0; i < VTCON_MAXPORTS; i++) { | ||||
if (tmp->vsp_open) | if (tmp->vsp_open) | ||||
pci_vtcon_open_port(tmp, true); | pci_vtcon_open_port(tmp, true); | ||||
} | } | ||||
break; | break; | ||||
case VTCON_PORT_READY: | case VTCON_PORT_READY: | ||||
if (ctrl->id >= sc->vsc_nports) { | if (ctrl->id >= sc->vsc_nports) { | ||||
WPRINTF(("VTCON_PORT_READY event for unknown port %d\n", | WPRINTF(("VTCON_PORT_READY event for unknown port %d\n\r", | ||||
ctrl->id)); | ctrl->id)); | ||||
return; | return; | ||||
} | } | ||||
tmp = &sc->vsc_ports[ctrl->id]; | tmp = &sc->vsc_ports[ctrl->id]; | ||||
if (tmp->vsp_console) { | if (tmp->vsp_console) { | ||||
resp.event = VTCON_CONSOLE_PORT; | resp.event = VTCON_CONSOLE_PORT; | ||||
resp.id = ctrl->id; | resp.id = ctrl->id; | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |