diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-02-12 01:02:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-14 13:20:35 -0500 |
commit | 6e47dd3e2938f41d75045bbcb64aa9df3a463b2a (patch) | |
tree | f38bc54aecf8a392aba00143586ff6105e2c9f8d /drivers | |
parent | 5529eaf6e79a61e0ca7ade257f31d2ababc7f6c9 (diff) |
vmbus: expose hv_begin/end_read
In order to implement NAPI in netvsc, the driver needs access to
control host interrupt mask.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hv/hyperv_vmbus.h | 4 | ||||
-rw-r--r-- | drivers/hv/ring_buffer.c | 20 |
2 files changed, 0 insertions, 24 deletions
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 6a9b54677218..e15a130de3c9 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h | |||
@@ -292,10 +292,6 @@ int hv_ringbuffer_read(struct vmbus_channel *channel, | |||
292 | void hv_ringbuffer_get_debuginfo(struct hv_ring_buffer_info *ring_info, | 292 | void hv_ringbuffer_get_debuginfo(struct hv_ring_buffer_info *ring_info, |
293 | struct hv_ring_buffer_debug_info *debug_info); | 293 | struct hv_ring_buffer_debug_info *debug_info); |
294 | 294 | ||
295 | void hv_begin_read(struct hv_ring_buffer_info *rbi); | ||
296 | |||
297 | u32 hv_end_read(struct hv_ring_buffer_info *rbi); | ||
298 | |||
299 | /* | 295 | /* |
300 | * Maximum channels is determined by the size of the interrupt page | 296 | * Maximum channels is determined by the size of the interrupt page |
301 | * which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt | 297 | * which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt |
diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c index 1a1e70a45146..75c9eefd55b5 100644 --- a/drivers/hv/ring_buffer.c +++ b/drivers/hv/ring_buffer.c | |||
@@ -32,26 +32,6 @@ | |||
32 | 32 | ||
33 | #include "hyperv_vmbus.h" | 33 | #include "hyperv_vmbus.h" |
34 | 34 | ||
35 | void hv_begin_read(struct hv_ring_buffer_info *rbi) | ||
36 | { | ||
37 | rbi->ring_buffer->interrupt_mask = 1; | ||
38 | virt_mb(); | ||
39 | } | ||
40 | |||
41 | u32 hv_end_read(struct hv_ring_buffer_info *rbi) | ||
42 | { | ||
43 | |||
44 | rbi->ring_buffer->interrupt_mask = 0; | ||
45 | virt_mb(); | ||
46 | |||
47 | /* | ||
48 | * Now check to see if the ring buffer is still empty. | ||
49 | * If it is not, we raced and we need to process new | ||
50 | * incoming messages. | ||
51 | */ | ||
52 | return hv_get_bytes_to_read(rbi); | ||
53 | } | ||
54 | |||
55 | /* | 35 | /* |
56 | * When we write to the ring buffer, check if the host needs to | 36 | * When we write to the ring buffer, check if the host needs to |
57 | * be signaled. Here is the details of this protocol: | 37 | * be signaled. Here is the details of this protocol: |