Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hn_nvs.c
Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | if (error) { | ||||
if_printf(sc->hn_ifp, | if_printf(sc->hn_ifp, | ||||
"send nvs rxbuf disconn failed: %d\n", error); | "send nvs rxbuf disconn failed: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
sc->hn_flags &= ~HN_FLAG_RXBUF_CONNECTED; | sc->hn_flags &= ~HN_FLAG_RXBUF_CONNECTED; | ||||
/* | /* | ||||
* Wait for the hypervisor to receive this NVS request. | * Wait for the hypervisor to receive this NVS request. | ||||
* | |||||
* NOTE: | |||||
* The TX bufring will not be drained by the hypervisor, | |||||
* if the primary channel is revoked. | |||||
*/ | */ | ||||
while (!vmbus_chan_tx_empty(sc->hn_prichan)) | while (!vmbus_chan_tx_empty(sc->hn_prichan) && | ||||
!vmbus_chan_is_revoked(sc->hn_prichan)) | |||||
pause("waittx", 1); | pause("waittx", 1); | ||||
/* | /* | ||||
* Linger long enough for NVS to disconnect RXBUF. | * Linger long enough for NVS to disconnect RXBUF. | ||||
*/ | */ | ||||
pause("lingtx", (200 * hz) / 1000); | pause("lingtx", (200 * hz) / 1000); | ||||
} | } | ||||
if (sc->hn_rxbuf_gpadl != 0) { | if (sc->hn_rxbuf_gpadl != 0) { | ||||
Show All 33 Lines | if (error) { | ||||
if_printf(sc->hn_ifp, | if_printf(sc->hn_ifp, | ||||
"send nvs chim disconn failed: %d\n", error); | "send nvs chim disconn failed: %d\n", error); | ||||
return (error); | return (error); | ||||
} | } | ||||
sc->hn_flags &= ~HN_FLAG_CHIM_CONNECTED; | sc->hn_flags &= ~HN_FLAG_CHIM_CONNECTED; | ||||
/* | /* | ||||
* Wait for the hypervisor to receive this NVS request. | * Wait for the hypervisor to receive this NVS request. | ||||
* | |||||
* NOTE: | |||||
* The TX bufring will not be drained by the hypervisor, | |||||
* if the primary channel is revoked. | |||||
*/ | */ | ||||
while (!vmbus_chan_tx_empty(sc->hn_prichan)) | while (!vmbus_chan_tx_empty(sc->hn_prichan) && | ||||
!vmbus_chan_is_revoked(sc->hn_prichan)) | |||||
pause("waittx", 1); | pause("waittx", 1); | ||||
/* | /* | ||||
* Linger long enough for NVS to disconnect chimney | * Linger long enough for NVS to disconnect chimney | ||||
* sending buffer. | * sending buffer. | ||||
*/ | */ | ||||
pause("lingtx", (200 * hz) / 1000); | pause("lingtx", (200 * hz) / 1000); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |