Deleted Added
full compact
vmbus.c (307304) vmbus.c (307306)
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * VM Bus Driver Implementation
31 */
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * VM Bus Driver Implementation
31 */
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus.c 307304 2016-10-14 08:18:55Z sephe $");
33__FBSDID("$FreeBSD: stable/11/sys/dev/hyperv/vmbus/vmbus.c 307306 2016-10-14 08:34:44Z sephe $");
34
35#include <sys/param.h>
36#include <sys/bus.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>
40#include <sys/module.h>
41#include <sys/proc.h>

--- 970 unchanged lines hidden (view full) ---

1012 strlcat(buf, " deviceid=", buflen);
1013 hyperv_guid2str(&dev_ctx->device_id, guidbuf, sizeof(guidbuf));
1014 strlcat(buf, guidbuf, buflen);
1015
1016 return (0);
1017}
1018
1019struct hv_device *
34
35#include <sys/param.h>
36#include <sys/bus.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>
40#include <sys/module.h>
41#include <sys/proc.h>

--- 970 unchanged lines hidden (view full) ---

1012 strlcat(buf, " deviceid=", buflen);
1013 hyperv_guid2str(&dev_ctx->device_id, guidbuf, sizeof(guidbuf));
1014 strlcat(buf, guidbuf, buflen);
1015
1016 return (0);
1017}
1018
1019struct hv_device *
1020hv_vmbus_child_device_create(hv_guid type, hv_guid instance,
1021 hv_vmbus_channel *channel)
1020hv_vmbus_child_device_create(struct hv_vmbus_channel *channel)
1022{
1023 hv_device *child_dev;
1024
1025 /*
1026 * Allocate the new child device
1027 */
1028 child_dev = malloc(sizeof(hv_device), M_DEVBUF, M_WAITOK | M_ZERO);
1029
1030 child_dev->channel = channel;
1021{
1022 hv_device *child_dev;
1023
1024 /*
1025 * Allocate the new child device
1026 */
1027 child_dev = malloc(sizeof(hv_device), M_DEVBUF, M_WAITOK | M_ZERO);
1028
1029 child_dev->channel = channel;
1031 memcpy(&child_dev->class_id, &type, sizeof(hv_guid));
1032 memcpy(&child_dev->device_id, &instance, sizeof(hv_guid));
1030 child_dev->class_id = channel->ch_guid_type;
1031 child_dev->device_id = channel->ch_guid_inst;
1033
1034 return (child_dev);
1035}
1036
1037void
1038hv_vmbus_child_device_register(struct vmbus_softc *sc,
1039 struct hv_device *child_dev)
1040{

--- 293 unchanged lines hidden ---
1032
1033 return (child_dev);
1034}
1035
1036void
1037hv_vmbus_child_device_register(struct vmbus_softc *sc,
1038 struct hv_device *child_dev)
1039{

--- 293 unchanged lines hidden ---