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 <decui@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
e2e8084134
commit
0f98829a99
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user