Deleted Added
full compact
ctl.c (287816) ctl.c (287912)
1/*-
2 * Copyright (c) 2003-2009 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * Copyright (c) 2015 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

38 * CAM Target Layer, a SCSI device emulation subsystem.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42
43#define _CTL_C
44
45#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2009 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * Copyright (c) 2015 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

38 * CAM Target Layer, a SCSI device emulation subsystem.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42
43#define _CTL_C
44
45#include <sys/cdefs.h>
46__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 287816 2015-09-15 09:36:46Z mav $");
46__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 287912 2015-09-17 12:52:18Z mav $");
47
48#include <sys/param.h>
49#include <sys/systm.h>
50#include <sys/ctype.h>
51#include <sys/kernel.h>
52#include <sys/types.h>
53#include <sys/kthread.h>
54#include <sys/bio.h>

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

12041 if ((pattern & CTL_LUN_PAT_MASK) == CTL_LUN_PAT_NONE)
12042 continue;
12043
12044 switch (desc->lun_error & CTL_LUN_INJ_TYPE) {
12045 case CTL_LUN_INJ_ABORTED:
12046 ctl_set_aborted(&io->scsiio);
12047 break;
12048 case CTL_LUN_INJ_MEDIUM_ERR:
47
48#include <sys/param.h>
49#include <sys/systm.h>
50#include <sys/ctype.h>
51#include <sys/kernel.h>
52#include <sys/types.h>
53#include <sys/kthread.h>
54#include <sys/bio.h>

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

12041 if ((pattern & CTL_LUN_PAT_MASK) == CTL_LUN_PAT_NONE)
12042 continue;
12043
12044 switch (desc->lun_error & CTL_LUN_INJ_TYPE) {
12045 case CTL_LUN_INJ_ABORTED:
12046 ctl_set_aborted(&io->scsiio);
12047 break;
12048 case CTL_LUN_INJ_MEDIUM_ERR:
12049 ctl_set_medium_error(&io->scsiio);
12049 ctl_set_medium_error(&io->scsiio,
12050 (io->io_hdr.flags & CTL_FLAG_DATA_MASK) !=
12051 CTL_FLAG_DATA_OUT);
12050 break;
12051 case CTL_LUN_INJ_UA:
12052 /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET
12053 * OCCURRED */
12054 ctl_set_ua(&io->scsiio, 0x29, 0x00);
12055 break;
12056 case CTL_LUN_INJ_CUSTOM:
12057 /*

--- 1381 unchanged lines hidden ---
12052 break;
12053 case CTL_LUN_INJ_UA:
12054 /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET
12055 * OCCURRED */
12056 ctl_set_ua(&io->scsiio, 0x29, 0x00);
12057 break;
12058 case CTL_LUN_INJ_CUSTOM:
12059 /*

--- 1381 unchanged lines hidden ---