Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_connection.c
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | hv_vmbus_on_events(int cpu) | ||||
/* | /* | ||||
* Check events | * Check events | ||||
*/ | */ | ||||
for (dword = 0; dword < maxdword; dword++) { | for (dword = 0; dword < maxdword; dword++) { | ||||
if (recv_interrupt_page[dword]) { | if (recv_interrupt_page[dword]) { | ||||
for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) { | for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) { | ||||
if (synch_test_and_clear_bit(bit, | if (synch_test_and_clear_bit(bit, | ||||
(uint32_t *) &recv_interrupt_page[dword])) { | (uint32_t *) &recv_interrupt_page[dword])) { | ||||
struct hv_vmbus_channel *channel; | |||||
rel_id = (dword << 5) + bit; | rel_id = (dword << 5) + bit; | ||||
if (rel_id == 0) { | channel = hv_vmbus_g_connection.channels[rel_id]; | ||||
/* | |||||
* Special case - | |||||
* vmbus channel protocol msg. | |||||
*/ | |||||
continue; | |||||
} else { | |||||
hv_vmbus_channel * channel = hv_vmbus_g_connection.channels[rel_id]; | |||||
/* if channel is closed or closing */ | /* if channel is closed or closing */ | ||||
if (channel == NULL || channel->rxq == NULL) | if (channel == NULL || channel->rxq == NULL) | ||||
continue; | continue; | ||||
if (channel->batched_reading) | if (channel->batched_reading) | ||||
hv_ring_buffer_read_begin(&channel->inbound); | hv_ring_buffer_read_begin(&channel->inbound); | ||||
taskqueue_enqueue(channel->rxq, &channel->channel_task); | taskqueue_enqueue(channel->rxq, &channel->channel_task); | ||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Send a msg on the vmbus's message connection | * Send a msg on the vmbus's message connection | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |