summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/hyperv/vmbus/hv_connection.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_connection.c b/sys/dev/hyperv/vmbus/hv_connection.c
index 3250049..e598ed1 100644
--- a/sys/dev/hyperv/vmbus/hv_connection.c
+++ b/sys/dev/hyperv/vmbus/hv_connection.c
@@ -333,25 +333,30 @@ hv_vmbus_on_events(int cpu)
* Check events
*/
for (dword = 0; dword < maxdword; dword++) {
- if (recv_interrupt_page[dword]) {
- for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) {
- if (synch_test_and_clear_bit(bit,
- (uint32_t *) &recv_interrupt_page[dword])) {
- struct hv_vmbus_channel *channel;
-
- rel_id = (dword << 5) + bit;
- channel = hv_vmbus_g_connection.channels[rel_id];
+ if (recv_interrupt_page[dword] == 0)
+ continue;
- /* if channel is closed or closing */
- if (channel == NULL || channel->rxq == NULL)
- continue;
-
- if (channel->batched_reading)
- hv_ring_buffer_read_begin(&channel->inbound);
- taskqueue_enqueue(channel->rxq, &channel->channel_task);
- }
+ for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) {
+ if (synch_test_and_clear_bit(bit,
+ (uint32_t *)&recv_interrupt_page[dword])) {
+ struct hv_vmbus_channel *channel;
+
+ rel_id = (dword << 5) + bit;
+ channel =
+ hv_vmbus_g_connection.channels[rel_id];
+
+ /* if channel is closed or closing */
+ if (channel == NULL || channel->rxq == NULL)
+ continue;
+
+ if (channel->batched_reading) {
+ hv_ring_buffer_read_begin(
+ &channel->inbound);
+ }
+ taskqueue_enqueue(channel->rxq,
+ &channel->channel_task);
+ }
}
- }
}
}
OpenPOWER on IntegriCloud