]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From foo@baz Mon Jul 13 17:09:34 PDT 2009 |
2 | Date: Mon, 13 Jul 2009 17:09:34 -0700 | |
3 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
4 | Subject: Staging: hv: make the Hyper-V virtual bus code build | |
5 | ||
6 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
7 | ||
8 | The #define KERNEL_2_6_27 needs to be set, and I adjusted the include | |
9 | directories a bit to get things to build properly. | |
10 | ||
11 | I also fixed up the direct access of bus_id, as that field is now gone. | |
12 | ||
13 | The hv_vmbus code should now build properly, with no errors. | |
14 | ||
15 | Cc: Hank Janssen <hjanssen@microsoft.com> | |
16 | Cc: Haiyang Zhang <haiyangz@microsoft.com> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
18 | ||
19 | --- | |
20 | drivers/staging/hv/Channel.c | 4 ++-- | |
21 | drivers/staging/hv/Channel.h | 2 +- | |
22 | drivers/staging/hv/ChannelInterface.h | 2 +- | |
23 | drivers/staging/hv/ChannelMgmt.c | 4 ++-- | |
24 | drivers/staging/hv/ChannelMgmt.h | 8 ++++---- | |
25 | drivers/staging/hv/Connection.c | 2 +- | |
26 | drivers/staging/hv/Hv.c | 2 +- | |
27 | drivers/staging/hv/Hv.h | 16 ++++++++-------- | |
28 | drivers/staging/hv/RingBuffer.c | 2 +- | |
29 | drivers/staging/hv/RingBuffer.h | 2 +- | |
30 | drivers/staging/hv/Sources.c | 1 + | |
31 | drivers/staging/hv/Vmbus.c | 2 +- | |
32 | drivers/staging/hv/VmbusPrivate.h | 4 ++-- | |
33 | drivers/staging/hv/include/ChannelMessages.h | 2 +- | |
34 | drivers/staging/hv/osd.c | 3 ++- | |
35 | drivers/staging/hv/vmbus_drv.c | 15 ++++++++------- | |
36 | 16 files changed, 37 insertions(+), 34 deletions(-) | |
37 | ||
38 | --- a/drivers/staging/hv/Channel.c | |
39 | +++ b/drivers/staging/hv/Channel.c | |
40 | @@ -22,8 +22,8 @@ | |
41 | */ | |
42 | ||
43 | ||
44 | -#include "osd.h" | |
45 | -#include "logging.h" | |
46 | +#include "include/osd.h" | |
47 | +#include "include/logging.h" | |
48 | ||
49 | #include "VmbusPrivate.h" | |
50 | ||
51 | --- a/drivers/staging/hv/Channel.h | |
52 | +++ b/drivers/staging/hv/Channel.h | |
53 | @@ -25,7 +25,7 @@ | |
54 | #ifndef _CHANNEL_H_ | |
55 | #define _CHANNEL_H_ | |
56 | ||
57 | -#include "osd.h" | |
58 | +#include "include/osd.h" | |
59 | #include "ChannelMgmt.h" | |
60 | ||
61 | #pragma pack(push,1) | |
62 | --- a/drivers/staging/hv/ChannelInterface.h | |
63 | +++ b/drivers/staging/hv/ChannelInterface.h | |
64 | @@ -25,7 +25,7 @@ | |
65 | #ifndef _CHANNEL_INTERFACE_H_ | |
66 | #define _CHANNEL_INTERFACE_H_ | |
67 | ||
68 | -#include "VmbusApi.h" | |
69 | +#include "include/VmbusApi.h" | |
70 | ||
71 | INTERNAL void | |
72 | GetChannelInterface( | |
73 | --- a/drivers/staging/hv/ChannelMgmt.c | |
74 | +++ b/drivers/staging/hv/ChannelMgmt.c | |
75 | @@ -22,8 +22,8 @@ | |
76 | */ | |
77 | ||
78 | ||
79 | -#include "osd.h" | |
80 | -#include "logging.h" | |
81 | +#include "include/osd.h" | |
82 | +#include "include/logging.h" | |
83 | ||
84 | #include "VmbusPrivate.h" | |
85 | ||
86 | --- a/drivers/staging/hv/ChannelMgmt.h | |
87 | +++ b/drivers/staging/hv/ChannelMgmt.h | |
88 | @@ -25,12 +25,12 @@ | |
89 | #ifndef _CHANNEL_MGMT_H_ | |
90 | #define _CHANNEL_MGMT_H_ | |
91 | ||
92 | -#include "osd.h" | |
93 | -#include "List.h" | |
94 | +#include "include/osd.h" | |
95 | +#include "include/List.h" | |
96 | #include "RingBuffer.h" | |
97 | ||
98 | -#include "VmbusChannelInterface.h" | |
99 | -#include "ChannelMessages.h" | |
100 | +#include "include/VmbusChannelInterface.h" | |
101 | +#include "include/ChannelMessages.h" | |
102 | ||
103 | ||
104 | ||
105 | --- a/drivers/staging/hv/Connection.c | |
106 | +++ b/drivers/staging/hv/Connection.c | |
107 | @@ -22,7 +22,7 @@ | |
108 | */ | |
109 | ||
110 | ||
111 | -#include "logging.h" | |
112 | +#include "include/logging.h" | |
113 | ||
114 | #include "VmbusPrivate.h" | |
115 | ||
116 | --- a/drivers/staging/hv/Hv.c | |
117 | +++ b/drivers/staging/hv/Hv.c | |
118 | @@ -22,7 +22,7 @@ | |
119 | */ | |
120 | ||
121 | ||
122 | -#include "logging.h" | |
123 | +#include "include/logging.h" | |
124 | #include "VmbusPrivate.h" | |
125 | ||
126 | // | |
127 | --- a/drivers/staging/hv/Hv.h | |
128 | +++ b/drivers/staging/hv/Hv.h | |
129 | @@ -25,23 +25,23 @@ | |
130 | #ifndef __HV_H__ | |
131 | #define __HV_H__ | |
132 | ||
133 | -#include "osd.h" | |
134 | +#include "include/osd.h" | |
135 | ||
136 | -#include "HvTypes.h" | |
137 | -#include "HvStatus.h" | |
138 | +#include "include/HvTypes.h" | |
139 | +#include "include/HvStatus.h" | |
140 | //#include "HvVmApi.h" | |
141 | //#include "HvKeApi.h" | |
142 | //#include "HvMmApi.h" | |
143 | //#include "HvCpuApi.h" | |
144 | -#include "HvHalApi.h" | |
145 | -#include "HvVpApi.h" | |
146 | +#include "include/HvHalApi.h" | |
147 | +#include "include/HvVpApi.h" | |
148 | //#include "HvTrApi.h" | |
149 | -#include "HvSynicApi.h" | |
150 | +#include "include/HvSynicApi.h" | |
151 | //#include "HvAmApi.h" | |
152 | //#include "HvHkApi.h" | |
153 | //#include "HvValApi.h" | |
154 | -#include "HvHcApi.h" | |
155 | -#include "HvPtApi.h" | |
156 | +#include "include/HvHcApi.h" | |
157 | +#include "include/HvPtApi.h" | |
158 | ||
159 | enum | |
160 | { | |
161 | --- a/drivers/staging/hv/include/ChannelMessages.h | |
162 | +++ b/drivers/staging/hv/include/ChannelMessages.h | |
163 | @@ -24,7 +24,7 @@ | |
164 | ||
165 | #pragma once | |
166 | ||
167 | -#include <VmbusPacketFormat.h> | |
168 | +#include "VmbusPacketFormat.h" | |
169 | ||
170 | #define C_ASSERT(x) | |
171 | typedef UINT32 NTSTATUS; | |
172 | --- a/drivers/staging/hv/osd.c | |
173 | +++ b/drivers/staging/hv/osd.c | |
174 | @@ -21,6 +21,7 @@ | |
175 | * | |
176 | */ | |
177 | ||
178 | +#define KERNEL_2_6_27 | |
179 | ||
180 | #include <linux/module.h> | |
181 | #include <linux/init.h> | |
182 | @@ -46,7 +47,7 @@ | |
183 | #include <asm/kmap_types.h> | |
184 | #include <asm/atomic.h> | |
185 | ||
186 | -#include "osd.h" | |
187 | +#include "include/osd.h" | |
188 | ||
189 | // | |
190 | // Data types | |
191 | --- a/drivers/staging/hv/RingBuffer.c | |
192 | +++ b/drivers/staging/hv/RingBuffer.c | |
193 | @@ -22,7 +22,7 @@ | |
194 | */ | |
195 | ||
196 | ||
197 | -#include "logging.h" | |
198 | +#include "include/logging.h" | |
199 | #include "RingBuffer.h" | |
200 | ||
201 | // | |
202 | --- a/drivers/staging/hv/RingBuffer.h | |
203 | +++ b/drivers/staging/hv/RingBuffer.h | |
204 | @@ -25,7 +25,7 @@ | |
205 | #ifndef _RING_BUFFER_H_ | |
206 | #define _RING_BUFFER_H_ | |
207 | ||
208 | -#include "osd.h" | |
209 | +#include "include/osd.h" | |
210 | ||
211 | typedef struct _SG_BUFFER_LIST { | |
212 | PVOID Data; | |
213 | --- a/drivers/staging/hv/Sources.c | |
214 | +++ b/drivers/staging/hv/Sources.c | |
215 | @@ -21,6 +21,7 @@ | |
216 | * | |
217 | */ | |
218 | ||
219 | +#define KERNEL_2_6_27 | |
220 | ||
221 | #include "Vmbus.c" | |
222 | #include "Hv.c" | |
223 | --- a/drivers/staging/hv/Vmbus.c | |
224 | +++ b/drivers/staging/hv/Vmbus.c | |
225 | @@ -22,7 +22,7 @@ | |
226 | */ | |
227 | ||
228 | ||
229 | -#include "logging.h" | |
230 | +#include "include/logging.h" | |
231 | #include "VersionInfo.h" | |
232 | #include "VmbusPrivate.h" | |
233 | ||
234 | --- a/drivers/staging/hv/vmbus_drv.c | |
235 | +++ b/drivers/staging/hv/vmbus_drv.c | |
236 | @@ -21,6 +21,7 @@ | |
237 | * | |
238 | */ | |
239 | ||
240 | +#define KERNEL_2_6_27 | |
241 | ||
242 | #include <linux/init.h> | |
243 | #include <linux/module.h> | |
244 | @@ -29,8 +30,8 @@ | |
245 | #include <linux/interrupt.h> | |
246 | #include <linux/sysctl.h> | |
247 | ||
248 | -#include "logging.h" | |
249 | -#include "vmbus.h" | |
250 | +#include "include/logging.h" | |
251 | +#include "include/vmbus.h" | |
252 | ||
253 | // | |
254 | // Defines | |
255 | @@ -451,7 +452,7 @@ int vmbus_bus_init(PFN_DRIVERINITIALIZE | |
256 | goto cleanup; | |
257 | } | |
258 | //strcpy(dev_ctx->device.bus_id, dev_ctx->device_obj.name); | |
259 | - sprintf(dev_ctx->device.bus_id, "vmbus_0_0"); | |
260 | + dev_set_name(&dev_ctx->device, "vmbus_0_0"); | |
261 | memcpy(&dev_ctx->class_id, &dev_ctx->device_obj.deviceType, sizeof(GUID)); | |
262 | memcpy(&dev_ctx->device_id, &dev_ctx->device_obj.deviceInstance, sizeof(GUID)); | |
263 | ||
264 | @@ -656,16 +657,16 @@ static int vmbus_child_device_register(D | |
265 | // | |
266 | // Make sure we are not registered already | |
267 | // | |
268 | - if (child_device_ctx->device.bus_id[0] != '\0') | |
269 | + if (strlen(dev_name(&child_device_ctx->device)) != 0) | |
270 | { | |
271 | - DPRINT_ERR(VMBUS_DRV, "child device (%p) already registered - busid %s", child_device_ctx, child_device_ctx->device.bus_id); | |
272 | + DPRINT_ERR(VMBUS_DRV, "child device (%p) already registered - busid %s", child_device_ctx, dev_name(&child_device_ctx->device)); | |
273 | ||
274 | ret = -1; | |
275 | goto Cleanup; | |
276 | } | |
277 | ||
278 | // Set the device bus id. Otherwise, device_register()will fail. | |
279 | - sprintf(child_device_ctx->device.bus_id, "vmbus_0_%d", InterlockedIncrement(&device_num)); | |
280 | + dev_set_name(&child_device_ctx->device, "vmbus_0_%d", InterlockedIncrement(&device_num)); | |
281 | ||
282 | // The new device belongs to this bus | |
283 | child_device_ctx->device.bus = &g_vmbus_drv.bus; //device->dev.bus; | |
284 | @@ -924,7 +925,7 @@ static int vmbus_probe(struct device *ch | |
285 | ret = device_ctx->probe_error = driver_ctx->probe(child_device); | |
286 | if (ret != 0) | |
287 | { | |
288 | - DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s (%p) on driver %s (%d)...", child_device->bus_id, child_device, child_device->driver->name, ret); | |
289 | + DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s (%p) on driver %s (%d)...", dev_name(child_device), child_device, child_device->driver->name, ret); | |
290 | ||
291 | #ifdef KERNEL_2_6_27 | |
292 | INIT_WORK(&device_ctx->probe_failed_work_item, vmbus_probe_failed_cb); | |
293 | --- a/drivers/staging/hv/VmbusPrivate.h | |
294 | +++ b/drivers/staging/hv/VmbusPrivate.h | |
295 | @@ -30,14 +30,14 @@ | |
296 | #endif | |
297 | ||
298 | #include "Hv.h" | |
299 | -#include "VmbusApi.h" | |
300 | +#include "include/VmbusApi.h" | |
301 | #include "Channel.h" | |
302 | #include "ChannelMgmt.h" | |
303 | #include "ChannelInterface.h" | |
304 | //#include "ChannelMessages.h" | |
305 | #include "RingBuffer.h" | |
306 | //#include "Packet.h" | |
307 | -#include "List.h" | |
308 | +#include "include/List.h" | |
309 | ||
310 | // | |
311 | // Defines |