Deleted Added
full compact
hv_storvsc_drv_freebsd.c (299505) hv_storvsc_drv_freebsd.c (300050)
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

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

28
29/**
30 * StorVSC driver for Hyper-V. This driver presents a SCSI HBA interface
31 * to the Comman Access Method (CAM) layer. CAM control blocks (CCBs) are
32 * converted into VSCSI protocol messages which are delivered to the parent
33 * partition StorVSP driver over the Hyper-V VMBUS.
34 */
35#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

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

28
29/**
30 * StorVSC driver for Hyper-V. This driver presents a SCSI HBA interface
31 * to the Comman Access Method (CAM) layer. CAM control blocks (CCBs) are
32 * converted into VSCSI protocol messages which are delivered to the parent
33 * partition StorVSP driver over the Hyper-V VMBUS.
34 */
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c 299505 2016-05-12 03:29:29Z sephe $");
36__FBSDID("$FreeBSD: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c 300050 2016-05-17 12:52:31Z eadler $");
37
38#include <sys/param.h>
39#include <sys/proc.h>
40#include <sys/condvar.h>
41#include <sys/time.h>
42#include <sys/systm.h>
43#include <sys/sockio.h>
44#include <sys/mbuf.h>

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

299/**
300 * The host is capable of sending messages to us that are
301 * completely unsolicited. So, we need to address the race
302 * condition where we may be in the process of unloading the
303 * driver when the host may send us an unsolicited message.
304 * We address this issue by implementing a sequentially
305 * consistent protocol:
306 *
37
38#include <sys/param.h>
39#include <sys/proc.h>
40#include <sys/condvar.h>
41#include <sys/time.h>
42#include <sys/systm.h>
43#include <sys/sockio.h>
44#include <sys/mbuf.h>

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

299/**
300 * The host is capable of sending messages to us that are
301 * completely unsolicited. So, we need to address the race
302 * condition where we may be in the process of unloading the
303 * driver when the host may send us an unsolicited message.
304 * We address this issue by implementing a sequentially
305 * consistent protocol:
306 *
307 * 1. Channel callback is invoked while holding the the channel lock
307 * 1. Channel callback is invoked while holding the channel lock
308 * and an unloading driver will reset the channel callback under
309 * the protection of this channel lock.
310 *
311 * 2. To ensure bounded wait time for unloading a driver, we don't
312 * permit outgoing traffic once the device is marked as being
313 * destroyed.
314 *
315 * 3. Once the device is marked as being destroyed, we only

--- 1855 unchanged lines hidden ---
308 * and an unloading driver will reset the channel callback under
309 * the protection of this channel lock.
310 *
311 * 2. To ensure bounded wait time for unloading a driver, we don't
312 * permit outgoing traffic once the device is marked as being
313 * destroyed.
314 *
315 * 3. Once the device is marked as being destroyed, we only

--- 1855 unchanged lines hidden ---