From 0f98829a99850836cf7c2cc9fbf1d7ce0f795780 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 7 Sep 2016 05:39:34 -0700 Subject: Drivers: hv: vmbus: suppress some "hv_vmbus: Unknown GUID" warnings Some VMBus devices are not needed by Linux guest[1][2], and, VMBus channels of Hyper-V Sockets don't really mean usual synthetic devices, so let's suppress the warnings for them. [1] https://support.microsoft.com/en-us/kb/2925727 [2] https://msdn.microsoft.com/en-us/library/jj980180(v=winembedded.81).aspx Signed-off-by: Dexuan Cui Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel_mgmt.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'drivers/hv') diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index bbd812e87511..759ba4d62417 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -139,10 +139,32 @@ static const struct vmbus_device vmbus_devs[] = { }, }; -static u16 hv_get_dev_type(const uuid_le *guid) +static const struct { + uuid_le guid; +} vmbus_unsupported_devs[] = { + { HV_AVMA1_GUID }, + { HV_AVMA2_GUID }, + { HV_RDV_GUID }, +}; + +static bool is_unsupported_vmbus_devs(const uuid_le *guid) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(vmbus_unsupported_devs); i++) + if (!uuid_le_cmp(*guid, vmbus_unsupported_devs[i].guid)) + return true; + return false; +} + +static u16 hv_get_dev_type(const struct vmbus_channel *channel) { + const uuid_le *guid = &channel->offermsg.offer.if_type; u16 i; + if (is_hvsock_channel(channel) || is_unsupported_vmbus_devs(guid)) + return HV_UNKOWN; + for (i = HV_IDE; i < HV_UNKOWN; i++) { if (!uuid_le_cmp(*guid, vmbus_devs[i].guid)) return i; @@ -426,7 +448,7 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) goto err_free_chan; } - dev_type = hv_get_dev_type(&newchannel->offermsg.offer.if_type); + dev_type = hv_get_dev_type(newchannel); if (dev_type == HV_NIC) set_channel_signal_state(newchannel, HV_SIGNAL_POLICY_EXPLICIT); -- cgit v1.2.3