diff options
-rw-r--r-- | drivers/hv/channel.c | 10 | ||||
-rw-r--r-- | drivers/hv/vmbus_drv.c | 35 | ||||
-rw-r--r-- | include/linux/hyperv.h | 8 |
3 files changed, 16 insertions, 37 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 75c26da3e011..94d54591b226 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c | |||
@@ -60,16 +60,6 @@ static void vmbus_setevent(struct vmbus_channel *channel) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * vmbus_get_debug_info -Retrieve various channel debug info | ||
64 | */ | ||
65 | void vmbus_get_debug_info(struct vmbus_channel *channel, | ||
66 | struct vmbus_channel_debug_info *debuginfo) | ||
67 | { | ||
68 | hv_ringbuffer_get_debuginfo(&channel->inbound, &debuginfo->inbound); | ||
69 | hv_ringbuffer_get_debuginfo(&channel->outbound, &debuginfo->outbound); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * vmbus_open - Open the specified channel. | 63 | * vmbus_open - Open the specified channel. |
74 | */ | 64 | */ |
75 | int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, | 65 | int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, |
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 73cb456e256b..62d9311b0541 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c | |||
@@ -63,29 +63,26 @@ static int vmbus_exists(void) | |||
63 | static void get_channel_info(struct hv_device *device, | 63 | static void get_channel_info(struct hv_device *device, |
64 | struct hv_device_info *info) | 64 | struct hv_device_info *info) |
65 | { | 65 | { |
66 | struct vmbus_channel_debug_info debug_info; | 66 | struct hv_ring_buffer_debug_info inbound; |
67 | struct hv_ring_buffer_debug_info outbound; | ||
67 | 68 | ||
68 | if (!device->channel) | 69 | if (!device->channel) |
69 | return; | 70 | return; |
70 | 71 | ||
71 | vmbus_get_debug_info(device->channel, &debug_info); | 72 | hv_ringbuffer_get_debuginfo(&device->channel->inbound, &inbound); |
72 | 73 | hv_ringbuffer_get_debuginfo(&device->channel->outbound, &outbound); | |
73 | info->inbound.int_mask = debug_info.inbound.current_interrupt_mask; | 74 | |
74 | info->inbound.read_idx = debug_info.inbound.current_read_index; | 75 | info->inbound.int_mask = inbound.current_interrupt_mask; |
75 | info->inbound.write_idx = debug_info.inbound.current_write_index; | 76 | info->inbound.read_idx = inbound.current_read_index; |
76 | info->inbound.bytes_avail_toread = | 77 | info->inbound.write_idx = inbound.current_write_index; |
77 | debug_info.inbound.bytes_avail_toread; | 78 | info->inbound.bytes_avail_toread = inbound.bytes_avail_toread; |
78 | info->inbound.bytes_avail_towrite = | 79 | info->inbound.bytes_avail_towrite = inbound.bytes_avail_towrite; |
79 | debug_info.inbound.bytes_avail_towrite; | 80 | |
80 | 81 | info->outbound.int_mask = outbound.current_interrupt_mask; | |
81 | info->outbound.int_mask = | 82 | info->outbound.read_idx = outbound.current_read_index; |
82 | debug_info.outbound.current_interrupt_mask; | 83 | info->outbound.write_idx = outbound.current_write_index; |
83 | info->outbound.read_idx = debug_info.outbound.current_read_index; | 84 | info->outbound.bytes_avail_toread = outbound.bytes_avail_toread; |
84 | info->outbound.write_idx = debug_info.outbound.current_write_index; | 85 | info->outbound.bytes_avail_towrite = outbound.bytes_avail_towrite; |
85 | info->outbound.bytes_avail_toread = | ||
86 | debug_info.outbound.bytes_avail_toread; | ||
87 | info->outbound.bytes_avail_towrite = | ||
88 | debug_info.outbound.bytes_avail_towrite; | ||
89 | } | 86 | } |
90 | 87 | ||
91 | #define VMBUS_ALIAS_LEN ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2) | 88 | #define VMBUS_ALIAS_LEN ((sizeof((struct hv_vmbus_device_id *)0)->guid) * 2) |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 332e80ce9b8a..c0e8faf40b35 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -899,11 +899,6 @@ enum vmbus_channel_state { | |||
899 | CHANNEL_OPENED_STATE, | 899 | CHANNEL_OPENED_STATE, |
900 | }; | 900 | }; |
901 | 901 | ||
902 | struct vmbus_channel_debug_info { | ||
903 | struct hv_ring_buffer_debug_info inbound; | ||
904 | struct hv_ring_buffer_debug_info outbound; | ||
905 | }; | ||
906 | |||
907 | /* | 902 | /* |
908 | * Represents each channel msg on the vmbus connection This is a | 903 | * Represents each channel msg on the vmbus connection This is a |
909 | * variable-size data structure depending on the msg type itself | 904 | * variable-size data structure depending on the msg type itself |
@@ -1169,9 +1164,6 @@ extern int vmbus_recvpacket_raw(struct vmbus_channel *channel, | |||
1169 | u64 *requestid); | 1164 | u64 *requestid); |
1170 | 1165 | ||
1171 | 1166 | ||
1172 | extern void vmbus_get_debug_info(struct vmbus_channel *channel, | ||
1173 | struct vmbus_channel_debug_info *debug); | ||
1174 | |||
1175 | extern void vmbus_ontimer(unsigned long data); | 1167 | extern void vmbus_ontimer(unsigned long data); |
1176 | 1168 | ||
1177 | struct hv_dev_port_info { | 1169 | struct hv_dev_port_info { |