Staging: hv: rename ChannelInterface.c and .h to channel_interface.c and .h
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 6 May 2010 05:36:31 +0000 (22:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:17 +0000 (11:36 -0700)
All of the uppercase .c files are now gone.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/ChannelInterface.c [deleted file]
drivers/staging/hv/ChannelInterface.h [deleted file]
drivers/staging/hv/Makefile
drivers/staging/hv/VmbusPrivate.h
drivers/staging/hv/channel_interface.c [new file with mode: 0644]
drivers/staging/hv/channel_interface.h [new file with mode: 0644]

diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
deleted file mode 100644 (file)
index 019b064..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include "osd.h"
-#include "VmbusPrivate.h"
-
-static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize,
-                            u32 RecvRingBufferSize, void *UserData,
-                            u32 UserDataLen,
-                            void (*ChannelCallback)(void *context),
-                            void *Context)
-{
-       return VmbusChannelOpen(device->context, SendBufferSize,
-                               RecvRingBufferSize, UserData, UserDataLen,
-                               ChannelCallback, Context);
-}
-
-static void IVmbusChannelClose(struct hv_device *device)
-{
-       VmbusChannelClose(device->context);
-}
-
-static int IVmbusChannelSendPacket(struct hv_device *device, const void *Buffer,
-                                  u32 BufferLen, u64 RequestId, u32 Type,
-                                  u32 Flags)
-{
-       return VmbusChannelSendPacket(device->context, Buffer, BufferLen,
-                                     RequestId, Type, Flags);
-}
-
-static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device,
-                               struct hv_page_buffer PageBuffers[],
-                               u32 PageCount, void *Buffer,
-                               u32 BufferLen, u64 RequestId)
-{
-       return VmbusChannelSendPacketPageBuffer(device->context, PageBuffers,
-                                               PageCount, Buffer, BufferLen,
-                                               RequestId);
-}
-
-static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device,
-                               struct hv_multipage_buffer *MultiPageBuffer,
-                               void *Buffer, u32 BufferLen, u64 RequestId)
-{
-       return VmbusChannelSendPacketMultiPageBuffer(device->context,
-                                                    MultiPageBuffer, Buffer,
-                                                    BufferLen, RequestId);
-}
-
-static int IVmbusChannelRecvPacket(struct hv_device *device, void *Buffer,
-                                  u32 BufferLen, u32 *BufferActualLen,
-                                  u64 *RequestId)
-{
-       return VmbusChannelRecvPacket(device->context, Buffer, BufferLen,
-                                     BufferActualLen, RequestId);
-}
-
-static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *Buffer,
-                                     u32 BufferLen, u32 *BufferActualLen,
-                                     u64 *RequestId)
-{
-       return VmbusChannelRecvPacketRaw(device->context, Buffer, BufferLen,
-                                        BufferActualLen, RequestId);
-}
-
-static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *Buffer,
-                                      u32 BufferLen, u32 *GpadlHandle)
-{
-       return VmbusChannelEstablishGpadl(device->context, Buffer, BufferLen,
-                                         GpadlHandle);
-}
-
-static int IVmbusChannelTeardownGpadl(struct hv_device *device, u32 GpadlHandle)
-{
-       return VmbusChannelTeardownGpadl(device->context, GpadlHandle);
-
-}
-
-void GetChannelInterface(struct vmbus_channel_interface *iface)
-{
-       iface->Open = IVmbusChannelOpen;
-       iface->Close    = IVmbusChannelClose;
-       iface->SendPacket = IVmbusChannelSendPacket;
-       iface->SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer;
-       iface->SendPacketMultiPageBuffer =
-                                       IVmbusChannelSendPacketMultiPageBuffer;
-       iface->RecvPacket = IVmbusChannelRecvPacket;
-       iface->RecvPacketRaw    = IVmbusChannelRecvPacketRaw;
-       iface->EstablishGpadl = IVmbusChannelEstablishGpadl;
-       iface->TeardownGpadl = IVmbusChannelTeardownGpadl;
-       iface->GetInfo = GetChannelInfo;
-}
-
-void GetChannelInfo(struct hv_device *device, struct hv_device_info *info)
-{
-       struct vmbus_channel_debug_info debugInfo;
-
-       if (!device->context)
-               return;
-
-       VmbusChannelGetDebugInfo(device->context, &debugInfo);
-
-       info->ChannelId = debugInfo.RelId;
-       info->ChannelState = debugInfo.State;
-       memcpy(&info->ChannelType, &debugInfo.InterfaceType,
-              sizeof(struct hv_guid));
-       memcpy(&info->ChannelInstance, &debugInfo.InterfaceInstance,
-              sizeof(struct hv_guid));
-
-       info->MonitorId = debugInfo.MonitorId;
-
-       info->ServerMonitorPending = debugInfo.ServerMonitorPending;
-       info->ServerMonitorLatency = debugInfo.ServerMonitorLatency;
-       info->ServerMonitorConnectionId = debugInfo.ServerMonitorConnectionId;
-
-       info->ClientMonitorPending = debugInfo.ClientMonitorPending;
-       info->ClientMonitorLatency = debugInfo.ClientMonitorLatency;
-       info->ClientMonitorConnectionId = debugInfo.ClientMonitorConnectionId;
-
-       info->Inbound.InterruptMask = debugInfo.Inbound.CurrentInterruptMask;
-       info->Inbound.ReadIndex = debugInfo.Inbound.CurrentReadIndex;
-       info->Inbound.WriteIndex = debugInfo.Inbound.CurrentWriteIndex;
-       info->Inbound.BytesAvailToRead = debugInfo.Inbound.BytesAvailToRead;
-       info->Inbound.BytesAvailToWrite = debugInfo.Inbound.BytesAvailToWrite;
-
-       info->Outbound.InterruptMask = debugInfo.Outbound.CurrentInterruptMask;
-       info->Outbound.ReadIndex = debugInfo.Outbound.CurrentReadIndex;
-       info->Outbound.WriteIndex = debugInfo.Outbound.CurrentWriteIndex;
-       info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead;
-       info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite;
-}
diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h
deleted file mode 100644 (file)
index 27b7a25..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef _CHANNEL_INTERFACE_H_
-#define _CHANNEL_INTERFACE_H_
-
-#include "VmbusApi.h"
-
-void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface);
-
-void GetChannelInfo(struct hv_device *Device,
-                   struct hv_device_info *DeviceInfo);
-
-#endif /* _CHANNEL_INTERFACE_H_ */
index 2f9ecd2a85f1ee8a15f454cf2c9b927c4a24d577..1866f80a45d32ceb03f8b7dc37fb1c5c06586aea 100644 (file)
@@ -6,7 +6,7 @@ obj-$(CONFIG_HYPERV_UTILS)      += hv_utils.o
 
 hv_vmbus-objs := vmbus_drv.o osd.o \
                 vmbus.o hv.o connection.o channel.o \
-                channel_mgmt.o ChannelInterface.o ring_buffer.o
+                channel_mgmt.o channel_interface.o ring_buffer.o
 hv_storvsc-objs := storvsc_drv.o storvsc.o
 hv_blkvsc-objs := blkvsc_drv.o blkvsc.o
 hv_netvsc-objs := netvsc_drv.o netvsc.o rndis_filter.o
index 6e82183e9d503a85ebd43118bffcb016b95b3ce2..57a116ca87168435ff3a02d7cf4c020fc3e6e48e 100644 (file)
@@ -29,7 +29,7 @@
 #include "VmbusApi.h"
 #include "channel.h"
 #include "channel_mgmt.h"
-#include "ChannelInterface.h"
+#include "channel_interface.h"
 #include "ring_buffer.h"
 #include <linux/list.h>
 
diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c
new file mode 100644 (file)
index 0000000..019b064
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ *
+ * Copyright (c) 2009, Microsoft Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
+ *   Hank Janssen  <hjanssen@microsoft.com>
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include "osd.h"
+#include "VmbusPrivate.h"
+
+static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize,
+                            u32 RecvRingBufferSize, void *UserData,
+                            u32 UserDataLen,
+                            void (*ChannelCallback)(void *context),
+                            void *Context)
+{
+       return VmbusChannelOpen(device->context, SendBufferSize,
+                               RecvRingBufferSize, UserData, UserDataLen,
+                               ChannelCallback, Context);
+}
+
+static void IVmbusChannelClose(struct hv_device *device)
+{
+       VmbusChannelClose(device->context);
+}
+
+static int IVmbusChannelSendPacket(struct hv_device *device, const void *Buffer,
+                                  u32 BufferLen, u64 RequestId, u32 Type,
+                                  u32 Flags)
+{
+       return VmbusChannelSendPacket(device->context, Buffer, BufferLen,
+                                     RequestId, Type, Flags);
+}
+
+static int IVmbusChannelSendPacketPageBuffer(struct hv_device *device,
+                               struct hv_page_buffer PageBuffers[],
+                               u32 PageCount, void *Buffer,
+                               u32 BufferLen, u64 RequestId)
+{
+       return VmbusChannelSendPacketPageBuffer(device->context, PageBuffers,
+                                               PageCount, Buffer, BufferLen,
+                                               RequestId);
+}
+
+static int IVmbusChannelSendPacketMultiPageBuffer(struct hv_device *device,
+                               struct hv_multipage_buffer *MultiPageBuffer,
+                               void *Buffer, u32 BufferLen, u64 RequestId)
+{
+       return VmbusChannelSendPacketMultiPageBuffer(device->context,
+                                                    MultiPageBuffer, Buffer,
+                                                    BufferLen, RequestId);
+}
+
+static int IVmbusChannelRecvPacket(struct hv_device *device, void *Buffer,
+                                  u32 BufferLen, u32 *BufferActualLen,
+                                  u64 *RequestId)
+{
+       return VmbusChannelRecvPacket(device->context, Buffer, BufferLen,
+                                     BufferActualLen, RequestId);
+}
+
+static int IVmbusChannelRecvPacketRaw(struct hv_device *device, void *Buffer,
+                                     u32 BufferLen, u32 *BufferActualLen,
+                                     u64 *RequestId)
+{
+       return VmbusChannelRecvPacketRaw(device->context, Buffer, BufferLen,
+                                        BufferActualLen, RequestId);
+}
+
+static int IVmbusChannelEstablishGpadl(struct hv_device *device, void *Buffer,
+                                      u32 BufferLen, u32 *GpadlHandle)
+{
+       return VmbusChannelEstablishGpadl(device->context, Buffer, BufferLen,
+                                         GpadlHandle);
+}
+
+static int IVmbusChannelTeardownGpadl(struct hv_device *device, u32 GpadlHandle)
+{
+       return VmbusChannelTeardownGpadl(device->context, GpadlHandle);
+
+}
+
+void GetChannelInterface(struct vmbus_channel_interface *iface)
+{
+       iface->Open = IVmbusChannelOpen;
+       iface->Close    = IVmbusChannelClose;
+       iface->SendPacket = IVmbusChannelSendPacket;
+       iface->SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer;
+       iface->SendPacketMultiPageBuffer =
+                                       IVmbusChannelSendPacketMultiPageBuffer;
+       iface->RecvPacket = IVmbusChannelRecvPacket;
+       iface->RecvPacketRaw    = IVmbusChannelRecvPacketRaw;
+       iface->EstablishGpadl = IVmbusChannelEstablishGpadl;
+       iface->TeardownGpadl = IVmbusChannelTeardownGpadl;
+       iface->GetInfo = GetChannelInfo;
+}
+
+void GetChannelInfo(struct hv_device *device, struct hv_device_info *info)
+{
+       struct vmbus_channel_debug_info debugInfo;
+
+       if (!device->context)
+               return;
+
+       VmbusChannelGetDebugInfo(device->context, &debugInfo);
+
+       info->ChannelId = debugInfo.RelId;
+       info->ChannelState = debugInfo.State;
+       memcpy(&info->ChannelType, &debugInfo.InterfaceType,
+              sizeof(struct hv_guid));
+       memcpy(&info->ChannelInstance, &debugInfo.InterfaceInstance,
+              sizeof(struct hv_guid));
+
+       info->MonitorId = debugInfo.MonitorId;
+
+       info->ServerMonitorPending = debugInfo.ServerMonitorPending;
+       info->ServerMonitorLatency = debugInfo.ServerMonitorLatency;
+       info->ServerMonitorConnectionId = debugInfo.ServerMonitorConnectionId;
+
+       info->ClientMonitorPending = debugInfo.ClientMonitorPending;
+       info->ClientMonitorLatency = debugInfo.ClientMonitorLatency;
+       info->ClientMonitorConnectionId = debugInfo.ClientMonitorConnectionId;
+
+       info->Inbound.InterruptMask = debugInfo.Inbound.CurrentInterruptMask;
+       info->Inbound.ReadIndex = debugInfo.Inbound.CurrentReadIndex;
+       info->Inbound.WriteIndex = debugInfo.Inbound.CurrentWriteIndex;
+       info->Inbound.BytesAvailToRead = debugInfo.Inbound.BytesAvailToRead;
+       info->Inbound.BytesAvailToWrite = debugInfo.Inbound.BytesAvailToWrite;
+
+       info->Outbound.InterruptMask = debugInfo.Outbound.CurrentInterruptMask;
+       info->Outbound.ReadIndex = debugInfo.Outbound.CurrentReadIndex;
+       info->Outbound.WriteIndex = debugInfo.Outbound.CurrentWriteIndex;
+       info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead;
+       info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite;
+}
diff --git a/drivers/staging/hv/channel_interface.h b/drivers/staging/hv/channel_interface.h
new file mode 100644 (file)
index 0000000..27b7a25
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (c) 2009, Microsoft Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
+ *   Hank Janssen  <hjanssen@microsoft.com>
+ *
+ */
+
+
+#ifndef _CHANNEL_INTERFACE_H_
+#define _CHANNEL_INTERFACE_H_
+
+#include "VmbusApi.h"
+
+void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface);
+
+void GetChannelInfo(struct hv_device *Device,
+                   struct hv_device_info *DeviceInfo);
+
+#endif /* _CHANNEL_INTERFACE_H_ */