Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()
[cascardo/linux.git] / drivers / hv / hyperv_vmbus.h
index 12156db..0411b7b 100644 (file)
@@ -587,7 +587,7 @@ extern int hv_post_message(union hv_connection_id connection_id,
                         enum hv_message_type message_type,
                         void *payload, size_t payload_size);
 
-extern u16 hv_signal_event(void *con_id);
+extern int hv_signal_event(void *con_id);
 
 extern int hv_synic_alloc(void);
 
@@ -619,14 +619,9 @@ int hv_ringbuffer_write(struct hv_ring_buffer_info *ring_info,
                    struct kvec *kv_list,
                    u32 kv_count, bool *signal);
 
-int hv_ringbuffer_peek(struct hv_ring_buffer_info *ring_info, void *buffer,
-                  u32 buflen);
-
-int hv_ringbuffer_read(struct hv_ring_buffer_info *ring_info,
-                  void *buffer,
-                  u32 buflen,
-                  u32 offset, bool *signal);
-
+int hv_ringbuffer_read(struct hv_ring_buffer_info *inring_info,
+                      void *buffer, u32 buflen, u32 *buffer_actual_len,
+                      u64 *requestid, bool *signal, bool raw);
 
 void hv_ringbuffer_get_debuginfo(struct hv_ring_buffer_info *ring_info,
                            struct hv_ring_buffer_debug_info *debug_info);
@@ -683,7 +678,7 @@ struct vmbus_connection {
 
        /* List of channels */
        struct list_head chn_list;
-       spinlock_t channel_lock;
+       struct mutex channel_mutex;
 
        struct workqueue_struct *work_queue;
 };