Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/hn_nvs.c
Show All 37 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/limits.h> | #include <sys/limits.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <vm/vm.h> | |||||
#include <vm/vm_extern.h> | |||||
#include <vm/pmap.h> | |||||
#include <net/ethernet.h> | #include <net/ethernet.h> | ||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/if_var.h> | #include <net/if_var.h> | ||||
#include <net/if_media.h> | #include <net/if_media.h> | ||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <netinet/tcp_lro.h> | #include <netinet/tcp_lro.h> | ||||
#include <dev/hyperv/include/hyperv.h> | #include <dev/hyperv/include/hyperv.h> | ||||
#include <dev/hyperv/include/hyperv_busdma.h> | |||||
#include <dev/hyperv/include/vmbus.h> | #include <dev/hyperv/include/vmbus.h> | ||||
#include <dev/hyperv/include/vmbus_xact.h> | #include <dev/hyperv/include/vmbus_xact.h> | ||||
#include <dev/hyperv/netvsc/ndis.h> | #include <dev/hyperv/netvsc/ndis.h> | ||||
#include <dev/hyperv/netvsc/if_hnreg.h> | #include <dev/hyperv/netvsc/if_hnreg.h> | ||||
#include <dev/hyperv/netvsc/if_hnvar.h> | #include <dev/hyperv/netvsc/if_hnvar.h> | ||||
#include <dev/hyperv/netvsc/hn_nvs.h> | #include <dev/hyperv/netvsc/hn_nvs.h> | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | hn_nvs_conn_rxbuf(struct hn_softc *sc) | ||||
/* | /* | ||||
* Connect the RXBUF GPADL to the primary channel. | * Connect the RXBUF GPADL to the primary channel. | ||||
* | * | ||||
* NOTE: | * NOTE: | ||||
* Only primary channel has RXBUF connected to it. Sub-channels | * Only primary channel has RXBUF connected to it. Sub-channels | ||||
* just share this RXBUF. | * just share this RXBUF. | ||||
*/ | */ | ||||
error = vmbus_chan_gpadl_connect(sc->hn_prichan, | error = vmbus_chan_gpadl_connect(sc->hn_prichan, | ||||
sc->hn_rxbuf_dma.hv_paddr, rxbuf_size, &sc->hn_rxbuf_gpadl); | pmap_kextract((vm_offset_t)sc->hn_rxbuf), rxbuf_size, | ||||
&sc->hn_rxbuf_gpadl); | |||||
if (error) { | if (error) { | ||||
if_printf(sc->hn_ifp, "rxbuf gpadl conn failed: %d\n", | if_printf(sc->hn_ifp, "rxbuf gpadl conn failed: %d\n", | ||||
error); | error); | ||||
goto cleanup; | goto cleanup; | ||||
} | } | ||||
/* | /* | ||||
* Connect RXBUF to NVS. | * Connect RXBUF to NVS. | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | hn_nvs_conn_chim(struct hn_softc *sc) | ||||
/* | /* | ||||
* Connect chimney sending buffer GPADL to the primary channel. | * Connect chimney sending buffer GPADL to the primary channel. | ||||
* | * | ||||
* NOTE: | * NOTE: | ||||
* Only primary channel has chimney sending buffer connected to it. | * Only primary channel has chimney sending buffer connected to it. | ||||
* Sub-channels just share this chimney sending buffer. | * Sub-channels just share this chimney sending buffer. | ||||
*/ | */ | ||||
error = vmbus_chan_gpadl_connect(sc->hn_prichan, | error = vmbus_chan_gpadl_connect(sc->hn_prichan, | ||||
sc->hn_chim_dma.hv_paddr, HN_CHIM_SIZE, &sc->hn_chim_gpadl); | pmap_kextract((vm_offset_t)sc->hn_chim), HN_CHIM_SIZE, | ||||
&sc->hn_chim_gpadl); | |||||
if (error) { | if (error) { | ||||
if_printf(sc->hn_ifp, "chim gpadl conn failed: %d\n", error); | if_printf(sc->hn_ifp, "chim gpadl conn failed: %d\n", error); | ||||
goto cleanup; | goto cleanup; | ||||
} | } | ||||
/* | /* | ||||
* Connect chimney sending buffer to NVS | * Connect chimney sending buffer to NVS | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 505 Lines • Show Last 20 Lines |