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

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

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

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

37 * CAM Target Layer, a SCSI device emulation subsystem.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#define _CTL_C
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl.c 276179 2014-12-24 13:49:40Z mav $");
45__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl.c 276237 2014-12-26 09:44:32Z mav $");
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/ctype.h>
50#include <sys/kernel.h>
51#include <sys/types.h>
52#include <sys/kthread.h>
53#include <sys/bio.h>

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

10139 bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
10140
10141 bl_ptr->page_code = SVPD_BLOCK_LIMITS;
10142 scsi_ulto2b(sizeof(*bl_ptr) - 4, bl_ptr->page_length);
10143 bl_ptr->max_cmp_write_len = 0xff;
10144 scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len);
10145 if (lun != NULL) {
10146 bs = lun->be_lun->blocksize;
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/ctype.h>
50#include <sys/kernel.h>
51#include <sys/types.h>
52#include <sys/kthread.h>
53#include <sys/bio.h>

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

10139 bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
10140
10141 bl_ptr->page_code = SVPD_BLOCK_LIMITS;
10142 scsi_ulto2b(sizeof(*bl_ptr) - 4, bl_ptr->page_length);
10143 bl_ptr->max_cmp_write_len = 0xff;
10144 scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len);
10145 if (lun != NULL) {
10146 bs = lun->be_lun->blocksize;
10147 scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len);
10147 scsi_ulto4b(lun->be_lun->opttxferlen, bl_ptr->opt_txfer_len);
10148 if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
10149 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt);
10150 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt);
10151 if (lun->be_lun->ublockexp != 0) {
10152 scsi_ulto4b((1 << lun->be_lun->ublockexp),
10153 bl_ptr->opt_unmap_grain);
10154 scsi_ulto4b(0x80000000 | lun->be_lun->ublockoff,
10155 bl_ptr->unmap_grain_align);

--- 4101 unchanged lines hidden ---
10148 if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
10149 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt);
10150 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt);
10151 if (lun->be_lun->ublockexp != 0) {
10152 scsi_ulto4b((1 << lun->be_lun->ublockexp),
10153 bl_ptr->opt_unmap_grain);
10154 scsi_ulto4b(0x80000000 | lun->be_lun->ublockoff,
10155 bl_ptr->unmap_grain_align);

--- 4101 unchanged lines hidden ---