summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/vmbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/hv/vmbus.c')
-rw-r--r--drivers/staging/hv/vmbus.c53
1 files changed, 8 insertions, 45 deletions
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c
index 007543bdb410..d449daf81976 100644
--- a/drivers/staging/hv/vmbus.c
+++ b/drivers/staging/hv/vmbus.c
@@ -57,26 +57,7 @@ static struct hv_device *gDevice; /* vmbus root device */
*/
static void VmbusGetChannelOffers(void)
{
- DPRINT_ENTER(VMBUS);
- VmbusChannelRequestOffers();
- DPRINT_EXIT(VMBUS);
-}
-
-/*
- * 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
- */
-static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
- struct hv_device_info *DeviceInfo)
-{
- GetChannelInfo(DeviceObject, DeviceInfo);
+ vmbus_request_offers();
}
/*
@@ -84,12 +65,12 @@ static void VmbusGetChannelInfo(struct hv_device *DeviceObject,
*/
struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
struct hv_guid *DeviceInstance,
- void *Context)
+ struct vmbus_channel *channel)
{
struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
return vmbusDriver->OnChildDeviceCreate(DeviceType, DeviceInstance,
- Context);
+ channel);
}
/*
@@ -120,8 +101,6 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
u32 *irqvector = AdditionalInfo;
int ret;
- DPRINT_ENTER(VMBUS);
-
gDevice = dev;
memcpy(&gDevice->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));
@@ -136,8 +115,6 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo)
ret = VmbusConnect();
/* VmbusSendEvent(device->localPortId+1); */
- DPRINT_EXIT(VMBUS);
-
return ret;
}
@@ -148,12 +125,9 @@ static int VmbusOnDeviceRemove(struct hv_device *dev)
{
int ret = 0;
- DPRINT_ENTER(VMBUS);
- VmbusChannelReleaseUnattachedChannels();
+ vmbus_release_unattached_channels();
VmbusDisconnect();
on_each_cpu(HvSynicCleanup, NULL, 1);
- DPRINT_EXIT(VMBUS);
-
return ret;
}
@@ -164,9 +138,7 @@ static void VmbusOnCleanup(struct hv_driver *drv)
{
/* struct vmbus_driver *driver = (struct vmbus_driver *)drv; */
- DPRINT_ENTER(VMBUS);
HvCleanup();
- DPRINT_EXIT(VMBUS);
}
/*
@@ -190,7 +162,7 @@ static void VmbusOnMsgDPC(struct hv_driver *drv)
continue;
osd_schedule_callback(gVmbusConnection.WorkQueue,
- VmbusOnChannelMessage,
+ vmbus_onmessage,
(void *)copied);
}
@@ -239,8 +211,6 @@ static int VmbusOnISR(struct hv_driver *drv)
page_addr = gHvContext.synICMessagePage[cpu];
msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
- DPRINT_ENTER(VMBUS);
-
/* Check if there are actual msgs to be process */
if (msg->Header.MessageType != HvMessageTypeNone) {
DPRINT_DBG(VMBUS, "received msg type %d size %d",
@@ -259,7 +229,6 @@ static int VmbusOnISR(struct hv_driver *drv)
ret |= 0x2;
}
- DPRINT_EXIT(VMBUS);
return ret;
}
@@ -271,18 +240,16 @@ int VmbusInitialize(struct hv_driver *drv)
struct vmbus_driver *driver = (struct vmbus_driver *)drv;
int ret;
- DPRINT_ENTER(VMBUS);
-
DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++",
HV_DRV_VERSION);
DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
VMBUS_REVISION_NUMBER);
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
VMBUS_MESSAGE_SINT);
- DPRINT_DBG(VMBUS, "sizeof(VMBUS_CHANNEL_PACKET_PAGE_BUFFER)=%zd, "
+ DPRINT_DBG(VMBUS, "sizeof(vmbus_channel_packet_page_buffer)=%zd, "
"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
- sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER),
- sizeof(struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER));
+ sizeof(struct vmbus_channel_packet_page_buffer),
+ sizeof(struct vmbus_channel_packet_multipage_buffer));
drv->name = gDriverName;
memcpy(&drv->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));
@@ -295,8 +262,6 @@ int VmbusInitialize(struct hv_driver *drv)
driver->OnMsgDpc = VmbusOnMsgDPC;
driver->OnEventDpc = VmbusOnEventDPC;
driver->GetChannelOffers = VmbusGetChannelOffers;
- driver->GetChannelInterface = VmbusGetChannelInterface;
- driver->GetChannelInfo = VmbusGetChannelInfo;
/* Hypervisor initialization...setup hypercall page..etc */
ret = HvInit();
@@ -305,7 +270,5 @@ int VmbusInitialize(struct hv_driver *drv)
ret);
gDriver = drv;
- DPRINT_EXIT(VMBUS);
-
return ret;
}