staging: hv: Rename camel cased functions in channel.c to lowercase
[deliverable/linux.git] / drivers / staging / hv / channel.h
CommitLineData
3e7ee490
HJ
1/*
2 *
3 * Copyright (c) 2009, Microsoft Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 * Authors:
19 * Haiyang Zhang <haiyangz@microsoft.com>
20 * Hank Janssen <hjanssen@microsoft.com>
21 *
22 */
23
24
25#ifndef _CHANNEL_H_
26#define _CHANNEL_H_
27
ff39524b 28#include "channel_mgmt.h"
3e7ee490 29
8dc0a06a 30/* The format must be the same as struct vmdata_gpa_direct */
430a8e9a
HZ
31struct vmbus_channel_packet_page_buffer {
32 u16 type;
33 u16 dataoffset8;
34 u16 length8;
35 u16 flags;
36 u64 transactionid;
37 u32 reserved;
38 u32 rangecount;
39 struct hv_page_buffer range[MAX_PAGE_BUFFER_COUNT];
46a05253 40} __attribute__((packed));
3e7ee490 41
8dc0a06a 42/* The format must be the same as struct vmdata_gpa_direct */
430a8e9a
HZ
43struct vmbus_channel_packet_multipage_buffer {
44 u16 type;
45 u16 dataoffset8;
46 u16 length8;
47 u16 flags;
48 u64 transactionid;
49 u32 reserved;
50 u32 rangecount; /* Always 1 in this case */
51 struct hv_multipage_buffer range;
46a05253
GKH
52} __attribute__((packed));
53
54
fff41b2e
HZ
55extern int vmbus_open(struct vmbus_channel *channel,
56 u32 send_ringbuffersize,
57 u32 recv_ringbuffersize,
58 void *userdata,
59 u32 userdatalen,
60 void(*onchannel_callback)(void *context),
61 void *context);
62
63extern void vmbus_close(struct vmbus_channel *channel);
64
65extern int vmbus_sendpacket(struct vmbus_channel *channel,
66 const void *buffer,
67 u32 bufferLen,
68 u64 requestid,
69 enum vmbus_packet_type type,
70 u32 flags);
71
72extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
73 struct hv_page_buffer pagebuffers[],
74 u32 pagecount,
75 void *buffer,
76 u32 bufferlen,
77 u64 requestid);
78
79extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
ee3d7ddf 80 struct hv_multipage_buffer *mpb,
fff41b2e
HZ
81 void *buffer,
82 u32 bufferlen,
83 u64 requestid);
46a05253 84
fff41b2e
HZ
85extern int vmbus_establish_gpadl(struct vmbus_channel *channel,
86 void *kbuffer,
87 u32 size,
88 u32 *gpadl_handle);
46a05253 89
fff41b2e
HZ
90extern int vmbus_teardown_gpadl(struct vmbus_channel *channel,
91 u32 gpadl_handle);
46a05253 92
fff41b2e
HZ
93extern int vmbus_recvpacket(struct vmbus_channel *channel,
94 void *buffer,
95 u32 bufferlen,
96 u32 *buffer_actual_len,
97 u64 *requestid);
46a05253 98
fff41b2e
HZ
99extern int vmbus_recvpacket_raw(struct vmbus_channel *channel,
100 void *buffer,
101 u32 bufferlen,
102 u32 *buffer_actual_len,
103 u64 *requestid);
46a05253 104
fff41b2e 105extern void vmbus_onchannel_event(struct vmbus_channel *channel);
46a05253 106
fff41b2e 107extern void vmbus_get_debug_info(struct vmbus_channel *channel,
aded7165 108 struct vmbus_channel_debug_info *debug);
46a05253 109
fff41b2e 110extern void vmbus_ontimer(unsigned long data);
46a05253 111
454f18a9 112#endif /* _CHANNEL_H_ */
This page took 0.130367 seconds and 5 git commands to generate.