Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_net_vsc.c
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
static void hv_nv_on_receive_completion(struct vmbus_channel *chan, | static void hv_nv_on_receive_completion(struct vmbus_channel *chan, | ||||
uint64_t tid, uint32_t status); | uint64_t tid, uint32_t status); | ||||
static void hv_nv_on_receive(netvsc_dev *net_dev, | static void hv_nv_on_receive(netvsc_dev *net_dev, | ||||
struct hn_rx_ring *rxr, struct vmbus_channel *chan, | struct hn_rx_ring *rxr, struct vmbus_channel *chan, | ||||
const struct vmbus_chanpkt_hdr *pkt); | const struct vmbus_chanpkt_hdr *pkt); | ||||
static void hn_nvs_sent_none(struct hn_send_ctx *sndc, | static void hn_nvs_sent_none(struct hn_send_ctx *sndc, | ||||
struct netvsc_dev_ *net_dev, struct vmbus_channel *chan, | struct netvsc_dev_ *net_dev, struct vmbus_channel *chan, | ||||
const struct nvsp_msg_ *msg, int); | const struct nvsp_msg_ *msg, int); | ||||
static void hn_nvs_sent_xact(struct hn_send_ctx *sndc, | |||||
struct netvsc_dev_ *net_dev, struct vmbus_channel *chan, | |||||
const struct nvsp_msg_ *msg, int dlen); | |||||
static struct hn_send_ctx hn_send_ctx_none = | static struct hn_send_ctx hn_send_ctx_none = | ||||
HN_SEND_CTX_INITIALIZER(hn_nvs_sent_none, NULL); | HN_SEND_CTX_INITIALIZER(hn_nvs_sent_none, NULL); | ||||
/* | /* | ||||
* | * | ||||
*/ | */ | ||||
static inline netvsc_dev * | static inline netvsc_dev * | ||||
▲ Show 20 Lines • Show All 664 Lines • ▼ Show 20 Lines | hv_nv_on_device_remove(struct hn_softc *sc, boolean_t destroy_channel) | ||||
sema_destroy(&net_dev->channel_init_sema); | sema_destroy(&net_dev->channel_init_sema); | ||||
free(net_dev, M_NETVSC); | free(net_dev, M_NETVSC); | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
hn_nvs_sent_wakeup(struct hn_send_ctx *sndc __unused, | |||||
struct netvsc_dev_ *net_dev, struct vmbus_channel *chan __unused, | |||||
const struct nvsp_msg_ *msg, int dlen __unused) | |||||
{ | |||||
/* Copy the response back */ | |||||
memcpy(&net_dev->channel_init_packet, msg, sizeof(nvsp_msg)); | |||||
sema_post(&net_dev->channel_init_sema); | |||||
} | |||||
static void | |||||
hn_nvs_sent_xact(struct hn_send_ctx *sndc, | hn_nvs_sent_xact(struct hn_send_ctx *sndc, | ||||
struct netvsc_dev_ *net_dev __unused, struct vmbus_channel *chan __unused, | struct netvsc_dev_ *net_dev __unused, struct vmbus_channel *chan __unused, | ||||
const struct nvsp_msg_ *msg, int dlen) | const struct nvsp_msg_ *msg, int dlen) | ||||
{ | { | ||||
vmbus_xact_wakeup(sndc->hn_cbarg, msg, dlen); | vmbus_xact_wakeup(sndc->hn_cbarg, msg, dlen); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |