Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220410
b: refs/heads/master
c: 150b19d
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Oct 20, 2010
1 parent c373366 commit 2727cb4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 78 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4e91ed24bc6b68caa534a9de35f7fc770bffde9
refs/heads/master: 150b19d43065762f19a4e6060b07c9bbbc85bcc7
42 changes: 0 additions & 42 deletions trunk/drivers/staging/hv/channel_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,48 +98,6 @@ static int ivmbus_teardown_gpadl(struct hv_device *device,

}


void get_channel_info(struct hv_device *device, struct hv_device_info *info)
{
struct vmbus_channel_debug_info debug_info;

if (!device->context)
return;

vmbus_get_debug_info(device->context, &debug_info);

info->ChannelId = debug_info.RelId;
info->ChannelState = debug_info.State;
memcpy(&info->ChannelType, &debug_info.InterfaceType,
sizeof(struct hv_guid));
memcpy(&info->ChannelInstance, &debug_info.InterfaceInstance,
sizeof(struct hv_guid));

info->MonitorId = debug_info.MonitorId;

info->ServerMonitorPending = debug_info.ServerMonitorPending;
info->ServerMonitorLatency = debug_info.ServerMonitorLatency;
info->ServerMonitorConnectionId = debug_info.ServerMonitorConnectionId;

info->ClientMonitorPending = debug_info.ClientMonitorPending;
info->ClientMonitorLatency = debug_info.ClientMonitorLatency;
info->ClientMonitorConnectionId = debug_info.ClientMonitorConnectionId;

info->Inbound.InterruptMask = debug_info.Inbound.CurrentInterruptMask;
info->Inbound.ReadIndex = debug_info.Inbound.CurrentReadIndex;
info->Inbound.WriteIndex = debug_info.Inbound.CurrentWriteIndex;
info->Inbound.BytesAvailToRead = debug_info.Inbound.BytesAvailToRead;
info->Inbound.BytesAvailToWrite = debug_info.Inbound.BytesAvailToWrite;

info->Outbound.InterruptMask = debug_info.Outbound.CurrentInterruptMask;
info->Outbound.ReadIndex = debug_info.Outbound.CurrentReadIndex;
info->Outbound.WriteIndex = debug_info.Outbound.CurrentWriteIndex;
info->Outbound.BytesAvailToRead = debug_info.Outbound.BytesAvailToRead;
info->Outbound.BytesAvailToWrite =
debug_info.Outbound.BytesAvailToWrite;
}


/* vmbus interface function pointer table */
const struct vmbus_channel_interface vmbus_ops = {
.Open = ivmbus_open,
Expand Down
33 changes: 0 additions & 33 deletions trunk/drivers/staging/hv/channel_interface.h

This file was deleted.

43 changes: 42 additions & 1 deletion trunk/drivers/staging/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "osd.h"
#include "logging.h"
#include "vmbus.h"
#include "channel_interface.h"
#include "channel.h"


/* FIXME! We need to do this dynamically for PIC and APIC system */
Expand Down Expand Up @@ -129,6 +129,47 @@ static struct vmbus_driver_context g_vmbus_drv = {
.bus.dev_attrs = vmbus_device_attrs,
};

static void get_channel_info(struct hv_device *device,
struct hv_device_info *info)
{
struct vmbus_channel_debug_info debug_info;

if (!device->context)
return;

vmbus_get_debug_info(device->context, &debug_info);

info->ChannelId = debug_info.RelId;
info->ChannelState = debug_info.State;
memcpy(&info->ChannelType, &debug_info.InterfaceType,
sizeof(struct hv_guid));
memcpy(&info->ChannelInstance, &debug_info.InterfaceInstance,
sizeof(struct hv_guid));

info->MonitorId = debug_info.MonitorId;

info->ServerMonitorPending = debug_info.ServerMonitorPending;
info->ServerMonitorLatency = debug_info.ServerMonitorLatency;
info->ServerMonitorConnectionId = debug_info.ServerMonitorConnectionId;

info->ClientMonitorPending = debug_info.ClientMonitorPending;
info->ClientMonitorLatency = debug_info.ClientMonitorLatency;
info->ClientMonitorConnectionId = debug_info.ClientMonitorConnectionId;

info->Inbound.InterruptMask = debug_info.Inbound.CurrentInterruptMask;
info->Inbound.ReadIndex = debug_info.Inbound.CurrentReadIndex;
info->Inbound.WriteIndex = debug_info.Inbound.CurrentWriteIndex;
info->Inbound.BytesAvailToRead = debug_info.Inbound.BytesAvailToRead;
info->Inbound.BytesAvailToWrite = debug_info.Inbound.BytesAvailToWrite;

info->Outbound.InterruptMask = debug_info.Outbound.CurrentInterruptMask;
info->Outbound.ReadIndex = debug_info.Outbound.CurrentReadIndex;
info->Outbound.WriteIndex = debug_info.Outbound.CurrentWriteIndex;
info->Outbound.BytesAvailToRead = debug_info.Outbound.BytesAvailToRead;
info->Outbound.BytesAvailToWrite =
debug_info.Outbound.BytesAvailToWrite;
}

/*
* vmbus_show_device_attr - Show the device attribute in sysfs.
*
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/vmbus_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "vmbus_api.h"
#include "channel.h"
#include "channel_mgmt.h"
#include "channel_interface.h"
#include "ring_buffer.h"
#include <linux/list.h>

Expand Down

0 comments on commit 2727cb4

Please sign in to comment.