Deleted Added
full compact
scsi_target.c (107240) scsi_target.c (109345)
1/*
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 107240 2002-11-25 19:28:05Z njl $
29 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 109345 2003-01-16 00:24:29Z njl $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/conf.h>
36#include <sys/malloc.h>
37#include <sys/poll.h>

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

209targclose(dev_t dev, int flag, int fmt, struct thread *td)
210{
211 struct targ_softc *softc;
212 int error;
213
214 softc = (struct targ_softc *)dev->si_drv1;
215 TARG_LOCK(softc);
216 error = targdisable(softc);
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/conf.h>
36#include <sys/malloc.h>
37#include <sys/poll.h>

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

209targclose(dev_t dev, int flag, int fmt, struct thread *td)
210{
211 struct targ_softc *softc;
212 int error;
213
214 softc = (struct targ_softc *)dev->si_drv1;
215 TARG_LOCK(softc);
216 error = targdisable(softc);
217 if (error == 0) {
217 if (error == CAM_REQ_CMP) {
218 dev->si_drv1 = 0;
219 mtx_lock(&targ_mtx);
220 if (softc->periph != NULL) {
221 cam_periph_invalidate(softc->periph);
222 softc->periph = NULL;
223 }
224 mtx_unlock(&targ_mtx);
225 TARG_UNLOCK(softc);

--- 971 unchanged lines hidden ---
218 dev->si_drv1 = 0;
219 mtx_lock(&targ_mtx);
220 if (softc->periph != NULL) {
221 cam_periph_invalidate(softc->periph);
222 softc->periph = NULL;
223 }
224 mtx_unlock(&targ_mtx);
225 TARG_UNLOCK(softc);

--- 971 unchanged lines hidden ---