Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:28 +0200
commita9f85599586ab91d171bb714a6fc6125e0a54dbb (patch)
treeb0ef1b30eb424a4e70a0172902a4d9d04f1266f1
parentd96e7d02e425c9e66e3187fcf4aae1a9b950a02c (diff)
vmbus: remove unused vmbus_sendpacket_ctl (fate#323887).
-rw-r--r--patches.suse/msft-hv-1445-vmbus-remove-unused-vmbus_sendpacket_ctl.patch114
-rw-r--r--series.conf1
2 files changed, 115 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1445-vmbus-remove-unused-vmbus_sendpacket_ctl.patch b/patches.suse/msft-hv-1445-vmbus-remove-unused-vmbus_sendpacket_ctl.patch
new file mode 100644
index 0000000000..5f2d23ef5c
--- /dev/null
+++ b/patches.suse/msft-hv-1445-vmbus-remove-unused-vmbus_sendpacket_ctl.patch
@@ -0,0 +1,114 @@
+From: stephen hemminger <stephen@networkplumber.org>
+Date: Wed, 16 Aug 2017 08:56:26 -0700
+Patch-mainline: v4.14-rc1
+Subject: vmbus: remove unused vmbus_sendpacket_ctl
+Git-commit: 5dd0fb9b9ffc0ef9b312d05604f4ad0fffc50505
+References: fate#323887
+
+The only usage of vmbus_sendpacket_ctl was by vmbus_sendpacket.
+
+Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/hv/channel.c | 43 +++++++++++++++++--------------------------
+ drivers/net/hyperv/netvsc.c | 9 ++++-----
+ include/linux/hyperv.h | 7 -------
+ 3 files changed, 21 insertions(+), 38 deletions(-)
+
+diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
+--- a/drivers/hv/channel.c
++++ b/drivers/hv/channel.c
+@@ -647,9 +647,23 @@ void vmbus_close(struct vmbus_channel *channel)
+ }
+ EXPORT_SYMBOL_GPL(vmbus_close);
+
+-int vmbus_sendpacket_ctl(struct vmbus_channel *channel, void *buffer,
+- u32 bufferlen, u64 requestid,
+- enum vmbus_packet_type type, u32 flags)
++/**
++ * vmbus_sendpacket() - Send the specified buffer on the given channel
++ * @channel: Pointer to vmbus_channel structure.
++ * @buffer: Pointer to the buffer you want to receive the data into.
++ * @bufferlen: Maximum size of what the the buffer will hold
++ * @requestid: Identifier of the request
++ * @type: Type of packet that is being send e.g. negotiate, time
++ * packet etc.
++ *
++ * Sends data in @buffer directly to hyper-v via the vmbus
++ * This will send the data unparsed to hyper-v.
++ *
++ * Mainly used by Hyper-V drivers.
++ */
++int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
++ u32 bufferlen, u64 requestid,
++ enum vmbus_packet_type type, u32 flags)
+ {
+ struct vmpacket_descriptor desc;
+ u32 packetlen = sizeof(struct vmpacket_descriptor) + bufferlen;
+@@ -676,29 +690,6 @@ int vmbus_sendpacket_ctl(struct vmbus_channel *channel, void *buffer,
+
+ return hv_ringbuffer_write(channel, bufferlist, num_vecs);
+ }
+-EXPORT_SYMBOL(vmbus_sendpacket_ctl);
+-
+-/**
+- * vmbus_sendpacket() - Send the specified buffer on the given channel
+- * @channel: Pointer to vmbus_channel structure.
+- * @buffer: Pointer to the buffer you want to receive the data into.
+- * @bufferlen: Maximum size of what the the buffer will hold
+- * @requestid: Identifier of the request
+- * @type: Type of packet that is being send e.g. negotiate, time
+- * packet etc.
+- *
+- * Sends data in @buffer directly to hyper-v via the vmbus
+- * This will send the data unparsed to hyper-v.
+- *
+- * Mainly used by Hyper-V drivers.
+- */
+-int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
+- u32 bufferlen, u64 requestid,
+- enum vmbus_packet_type type, u32 flags)
+-{
+- return vmbus_sendpacket_ctl(channel, buffer, bufferlen, requestid,
+- type, flags);
+-}
+ EXPORT_SYMBOL(vmbus_sendpacket);
+
+ /*
+diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
+--- a/drivers/net/hyperv/netvsc.c
++++ b/drivers/net/hyperv/netvsc.c
+@@ -780,11 +780,10 @@ static inline int netvsc_send_pkt(
+ &nvmsg, sizeof(nvmsg),
+ req_id);
+ } else {
+- ret = vmbus_sendpacket_ctl(out_channel, &nvmsg,
+- sizeof(struct nvsp_message),
+- req_id,
+- VM_PKT_DATA_INBAND,
+- VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
++ ret = vmbus_sendpacket(out_channel,
++ &nvmsg, sizeof(nvmsg),
++ req_id, VM_PKT_DATA_INBAND,
++ VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
+ }
+
+ if (ret == 0) {
+diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
+--- a/include/linux/hyperv.h
++++ b/include/linux/hyperv.h
+@@ -1030,13 +1030,6 @@ extern int vmbus_sendpacket(struct vmbus_channel *channel,
+ enum vmbus_packet_type type,
+ u32 flags);
+
+-extern int vmbus_sendpacket_ctl(struct vmbus_channel *channel,
+- void *buffer,
+- u32 bufferLen,
+- u64 requestid,
+- enum vmbus_packet_type type,
+- u32 flags);
+-
+ extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
+ struct hv_page_buffer pagebuffers[],
+ u32 pagecount,
diff --git a/series.conf b/series.conf
index 645b59ed78..fb0b7bc568 100644
--- a/series.conf
+++ b/series.conf
@@ -1695,6 +1695,7 @@
patches.suse/msft-hv-1442-Drivers-hv-vmbus-Fix-rescind-handling-issues.patch
patches.suse/msft-hv-1443-vmbus-remove-unused-vmbus_sendpacket_multipagebuffer.patch
patches.suse/msft-hv-1444-vmbus-remove-unused-vmubs_sendpacket_pagebuffer_ctl.patch
+ patches.suse/msft-hv-1445-vmbus-remove-unused-vmbus_sendpacket_ctl.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch