ctl_backend.h (276179) | ctl_backend.h (276237) |
---|---|
1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * POSSIBILITY OF SUCH DAMAGES. 29 * 30 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend.h#2 $ | 1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * POSSIBILITY OF SUCH DAMAGES. 29 * 30 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend.h#2 $ |
31 * $FreeBSD: stable/10/sys/cam/ctl/ctl_backend.h 276179 2014-12-24 13:49:40Z mav $ | 31 * $FreeBSD: stable/10/sys/cam/ctl/ctl_backend.h 276237 2014-12-26 09:44:32Z mav $ |
32 */ 33/* 34 * CTL backend driver definitions 35 * 36 * Author: Ken Merry <ken@FreeBSD.org> 37 */ 38 39#ifndef _CTL_BACKEND_H_ --- 101 unchanged lines hidden (view full) --- 141 * different from the capacity of the array. capacity = maxlba + 1 142 * 143 * blocksize is the size, in bytes, of each LBA on the LUN. In general 144 * this should be 512. In theory CTL should be able to handle other block 145 * sizes. Host application software may not deal with it very well, though. 146 * 147 * pblockexp is the log2() of number of LBAs on the LUN per physical sector. 148 * | 32 */ 33/* 34 * CTL backend driver definitions 35 * 36 * Author: Ken Merry <ken@FreeBSD.org> 37 */ 38 39#ifndef _CTL_BACKEND_H_ --- 101 unchanged lines hidden (view full) --- 141 * different from the capacity of the array. capacity = maxlba + 1 142 * 143 * blocksize is the size, in bytes, of each LBA on the LUN. In general 144 * this should be 512. In theory CTL should be able to handle other block 145 * sizes. Host application software may not deal with it very well, though. 146 * 147 * pblockexp is the log2() of number of LBAs on the LUN per physical sector. 148 * |
149 * pblockoff is the lowest LBA on the LUN aligned ot physical sector. | 149 * pblockoff is the lowest LBA on the LUN aligned to physical sector. |
150 * | 150 * |
151 * ublockexp is the log2() of number of LBAs on the LUN per UNMAP block. 152 * 153 * ublockoff is the lowest LBA on the LUN aligned to UNMAP block. 154 * |
|
151 * atomicblock is the number of blocks that can be written atomically. 152 * | 155 * atomicblock is the number of blocks that can be written atomically. 156 * |
157 * opttxferlen is the number of blocks that can be written in one operation. 158 * |
|
153 * req_lun_id is the requested LUN ID. CTL only pays attention to this 154 * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is 155 * not available, the LUN addition will fail. If a particular LUN ID isn't 156 * requested, the first available LUN ID will be allocated. 157 * 158 * serial_num is the device serial number returned in the SCSI INQUIRY VPD 159 * page 0x80. This should be a unique, per-shelf value. The data inside 160 * this field should be ASCII only, left aligned, and any unused space --- 31 unchanged lines hidden (view full) --- 192 void *be_lun; /* passed to CTL */ 193 uint64_t maxlba; /* passed to CTL */ 194 uint32_t blocksize; /* passed to CTL */ 195 uint16_t pblockexp; /* passed to CTL */ 196 uint16_t pblockoff; /* passed to CTL */ 197 uint16_t ublockexp; /* passed to CTL */ 198 uint16_t ublockoff; /* passed to CTL */ 199 uint32_t atomicblock; /* passed to CTL */ | 159 * req_lun_id is the requested LUN ID. CTL only pays attention to this 160 * field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is 161 * not available, the LUN addition will fail. If a particular LUN ID isn't 162 * requested, the first available LUN ID will be allocated. 163 * 164 * serial_num is the device serial number returned in the SCSI INQUIRY VPD 165 * page 0x80. This should be a unique, per-shelf value. The data inside 166 * this field should be ASCII only, left aligned, and any unused space --- 31 unchanged lines hidden (view full) --- 198 void *be_lun; /* passed to CTL */ 199 uint64_t maxlba; /* passed to CTL */ 200 uint32_t blocksize; /* passed to CTL */ 201 uint16_t pblockexp; /* passed to CTL */ 202 uint16_t pblockoff; /* passed to CTL */ 203 uint16_t ublockexp; /* passed to CTL */ 204 uint16_t ublockoff; /* passed to CTL */ 205 uint32_t atomicblock; /* passed to CTL */ |
206 uint32_t opttxferlen; /* passed to CTL */ |
|
200 uint32_t req_lun_id; /* passed to CTL */ 201 uint32_t lun_id; /* returned from CTL */ 202 uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ 203 uint8_t device_id[CTL_DEVID_LEN];/* passed to CTL */ 204 be_callback_t lun_shutdown; /* passed to CTL */ 205 be_lun_config_t lun_config_status; /* passed to CTL */ 206 struct ctl_backend_driver *be; /* passed to CTL */ 207 void *ctl_lun; /* used by CTL */ --- 99 unchanged lines hidden --- | 207 uint32_t req_lun_id; /* passed to CTL */ 208 uint32_t lun_id; /* returned from CTL */ 209 uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */ 210 uint8_t device_id[CTL_DEVID_LEN];/* passed to CTL */ 211 be_callback_t lun_shutdown; /* passed to CTL */ 212 be_lun_config_t lun_config_status; /* passed to CTL */ 213 struct ctl_backend_driver *be; /* passed to CTL */ 214 void *ctl_lun; /* used by CTL */ --- 99 unchanged lines hidden --- |