- fix remaining checkpatch warnings and errors
- audit the vmbus to verify it is working properly with the
driver model
- - convert vmbus driver interface function pointer tables
- to constant, a.k.a vmbus_ops
- see if the vmbus can be merged with the other virtual busses
in the kernel
- audit the network driver
}
-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)
{
info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead;
info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite;
}
+
+
+/* vmbus interface function pointer table */
+const struct vmbus_channel_interface vmbus_ops = {
+ .Open = IVmbusChannelOpen,
+ .Close = IVmbusChannelClose,
+ .SendPacket = IVmbusChannelSendPacket,
+ .SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer,
+ .SendPacketMultiPageBuffer = IVmbusChannelSendPacketMultiPageBuffer,
+ .RecvPacket = IVmbusChannelRecvPacket,
+ .RecvPacketRaw = IVmbusChannelRecvPacketRaw,
+ .EstablishGpadl = IVmbusChannelEstablishGpadl,
+ .TeardownGpadl = IVmbusChannelTeardownGpadl,
+ .GetInfo = GetChannelInfo,
+};
VmbusChannelRequestOffers();
}
-/*
- * VmbusGetChannelInterface - Get the channel interface
- */
-static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
-{
- GetChannelInterface(Interface);
-}
-
/*
* VmbusGetChannelInfo - Get the device info for the specified device object
*/
driver->OnMsgDpc = VmbusOnMsgDPC;
driver->OnEventDpc = VmbusOnEventDPC;
driver->GetChannelOffers = VmbusGetChannelOffers;
- driver->GetChannelInterface = VmbusGetChannelInterface;
driver->GetChannelInfo = VmbusGetChannelInfo;
/* Hypervisor initialization...setup hypercall page..etc */
void (*GetInfo)(struct hv_device *dev, struct hv_device_info *devinfo);
};
+extern const struct vmbus_channel_interface vmbus_ops;
+
+
/* Base driver object */
struct hv_driver {
const char *name;
void (*OnEventDpc)(struct hv_driver *driver);
void (*GetChannelOffers)(void);
- void (*GetChannelInterface)(struct vmbus_channel_interface *i);
void (*GetChannelInfo)(struct hv_device *dev,
struct hv_device_info *devinfo);
};