FreeBSD kernel CAM code
cam_compat.c
Go to the documentation of this file.
1/*-
2 * CAM ioctl compatibility shims
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
5 *
6 * Copyright (c) 2013 Scott Long
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions, and the following disclaimer,
14 * without modification, immediately at the beginning of the file.
15 * 2. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD$");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/types.h>
38#include <sys/kernel.h>
39#include <sys/conf.h>
40#include <sys/fcntl.h>
41
42#include <sys/lock.h>
43#include <sys/mutex.h>
44#include <sys/sysctl.h>
45#include <sys/kthread.h>
46
47#include <cam/cam.h>
48#include <cam/cam_ccb.h>
49#include <cam/cam_xpt.h>
50#include <cam/cam_compat.h>
51#include <cam/cam_periph.h>
52
53#include <cam/scsi/scsi_pass.h>
54
55#include "opt_cam.h"
56
57static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr,
58 int flag, struct thread *td, d_ioctl_t *cbfnp);
59static int cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr,
60 int flag, struct thread *td, d_ioctl_t *cbfnp);
61static int cam_compat_handle_0x19(struct cdev *dev, u_long cmd, caddr_t addr,
62 int flag, struct thread *td, d_ioctl_t *cbfnp);
64
65int
66cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
67 struct thread *td, d_ioctl_t *cbfnp)
68{
69 int error;
70
71 switch (cmd) {
73 {
74 struct ccb_hdr_0x17 *hdr17;
75
76 hdr17 = (struct ccb_hdr_0x17 *)addr;
77 if (hdr17->flags & CAM_SG_LIST_PHYS_0x16) {
78 hdr17->flags &= ~CAM_SG_LIST_PHYS_0x16;
79 hdr17->flags |= CAM_DATA_SG_PADDR;
80 }
81 if (hdr17->flags & CAM_DATA_PHYS_0x16) {
82 hdr17->flags &= ~CAM_DATA_PHYS_0x16;
83 hdr17->flags |= CAM_DATA_PADDR;
84 }
85 if (hdr17->flags & CAM_SCATTER_VALID_0x16) {
87 hdr17->flags |= CAM_DATA_SG;
88 }
89 cmd = CAMIOCOMMAND;
90 error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp);
91 break;
92 }
94 cmd = CAMGETPASSTHRU;
95 error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp);
96 break;
98 cmd = CAMIOCOMMAND;
99 error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp);
100 break;
102 cmd = CAMGETPASSTHRU;
103 error = cam_compat_handle_0x17(dev, cmd, addr, flag, td, cbfnp);
104 break;
106 cmd = CAMIOCOMMAND;
107 error = cam_compat_handle_0x18(dev, cmd, addr, flag, td, cbfnp);
108 break;
110 cmd = CAMGETPASSTHRU;
111 error = cam_compat_handle_0x18(dev, cmd, addr, flag, td, cbfnp);
112 break;
114 cmd = CAMIOCOMMAND;
115 error = cam_compat_handle_0x19(dev, cmd, addr, flag, td, cbfnp);
116 break;
118 cmd = CAMGETPASSTHRU;
119 error = cam_compat_handle_0x19(dev, cmd, addr, flag, td, cbfnp);
120 break;
121 case CAMIOQUEUE_0x19:
122 cmd = CAMIOQUEUE;
123 error = cam_compat_handle_0x19(dev, cmd, addr, flag, td, cbfnp);
124 break;
125 case CAMIOGET_0x19:
126 cmd = CAMIOGET;
127 error = cam_compat_handle_0x19(dev, cmd, addr, flag, td, cbfnp);
128 break;
129 default:
130 error = ENOTTY;
131 }
132
133 return (error);
134}
135
136static int
137cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
138 struct thread *td, d_ioctl_t *cbfnp)
139{
140 union ccb *ccb;
141 struct ccb_hdr *hdr;
142 struct ccb_hdr_0x17 *hdr17;
143 uint8_t *ccbb, *ccbb17;
144 u_int error;
145
146 hdr17 = (struct ccb_hdr_0x17 *)addr;
147 ccb = xpt_alloc_ccb();
148 hdr = &ccb->ccb_h;
149
150 hdr->pinfo = hdr17->pinfo;
151 hdr->xpt_links = hdr17->xpt_links;
152 hdr->sim_links = hdr17->sim_links;
153 hdr->periph_links = hdr17->periph_links;
154 hdr->retry_count = hdr17->retry_count;
155 hdr->cbfcnp = hdr17->cbfcnp;
156 hdr->func_code = hdr17->func_code;
157 hdr->status = hdr17->status;
158 hdr->path = hdr17->path;
159 hdr->path_id = hdr17->path_id;
160 hdr->target_id = hdr17->target_id;
161 hdr->target_lun = hdr17->target_lun;
162 hdr->flags = hdr17->flags;
163 hdr->xflags = 0;
164 hdr->periph_priv = hdr17->periph_priv;
165 hdr->sim_priv = hdr17->sim_priv;
166 hdr->timeout = hdr17->timeout;
167 hdr->softtimeout.tv_sec = 0;
168 hdr->softtimeout.tv_usec = 0;
169
170 ccbb = (uint8_t *)&hdr[1];
171 ccbb17 = (uint8_t *)&hdr17[1];
173 struct ccb_trans_settings *cts;
174 struct ccb_trans_settings_0x17 *cts17;
175
176 cts = &ccb->cts;
177 cts17 = (struct ccb_trans_settings_0x17 *)hdr17;
178 cts->type = cts17->type;
179 cts->protocol = cts17->protocol;
180 cts->protocol_version = cts17->protocol_version;
181 cts->transport = cts17->transport;
182 cts->transport_version = cts17->transport_version;
183 bcopy(&cts17->proto_specific, &cts->proto_specific,
184 sizeof(cts17->proto_specific));
185 bcopy(&cts17->xport_specific, &cts->xport_specific,
186 sizeof(cts17->xport_specific));
187 } else {
188 bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN);
189 }
190
191 error = cam_compat_handle_0x19(dev, cmd, (caddr_t)ccb, flag, td, cbfnp);
192
193 hdr17->pinfo = hdr->pinfo;
194 hdr17->xpt_links = hdr->xpt_links;
195 hdr17->sim_links = hdr->sim_links;
196 hdr17->periph_links = hdr->periph_links;
197 hdr17->retry_count = hdr->retry_count;
198 hdr17->cbfcnp = hdr->cbfcnp;
199 hdr17->func_code = hdr->func_code;
200 hdr17->status = hdr->status;
201 hdr17->path = hdr->path;
202 hdr17->path_id = hdr->path_id;
203 hdr17->target_id = hdr->target_id;
204 hdr17->target_lun = hdr->target_lun;
205 hdr17->flags = hdr->flags;
206 hdr17->periph_priv = hdr->periph_priv;
207 hdr17->sim_priv = hdr->sim_priv;
208 hdr17->timeout = hdr->timeout;
209
211 struct ccb_pathinq *cpi;
212 struct ccb_pathinq_0x17 *cpi17;
213
214 /* The PATH_INQ only needs special handling on the way out */
215 cpi = &ccb->cpi;
216 cpi17 = (struct ccb_pathinq_0x17 *)hdr17;
217 cpi17->version_num = cpi->version_num;
218 cpi17->hba_inquiry = cpi->hba_inquiry;
219 cpi17->target_sprt = (u_int8_t)cpi->target_sprt;
220 cpi17->hba_misc = (u_int8_t)cpi->hba_misc;
221 cpi17->hba_eng_cnt = cpi->hba_eng_cnt;
222 bcopy(&cpi->vuhba_flags[0], &cpi17->vuhba_flags[0], VUHBALEN);
223 cpi17->max_target = cpi->max_target;
224 cpi17->max_lun = cpi->max_lun;
225 cpi17->async_flags = cpi->async_flags;
226 cpi17->hpath_id = cpi->hpath_id;
227 cpi17->initiator_id = cpi->initiator_id;
228 bcopy(&cpi->sim_vid[0], &cpi17->sim_vid[0], SIM_IDLEN);
229 bcopy(&cpi->hba_vid[0], &cpi17->hba_vid[0], HBA_IDLEN);
230 bcopy(&cpi->dev_name[0], &cpi17->dev_name[0], DEV_IDLEN);
231 cpi17->unit_number = cpi->unit_number;
232 cpi17->bus_id = cpi->bus_id;
234 cpi17->protocol = cpi->protocol;
236 cpi17->transport = cpi->transport;
238 bcopy(&cpi->xport_specific, &cpi17->xport_specific,
240 cpi17->maxio = cpi->maxio;
241 cpi17->hba_vendor = cpi->hba_vendor;
242 cpi17->hba_device = cpi->hba_device;
243 cpi17->hba_subvendor = cpi->hba_subvendor;
244 cpi17->hba_subdevice = cpi->hba_subdevice;
245 } else if (ccb->ccb_h.func_code == XPT_GET_TRAN_SETTINGS) {
246 struct ccb_trans_settings *cts;
247 struct ccb_trans_settings_0x17 *cts17;
248
249 cts = &ccb->cts;
250 cts17 = (struct ccb_trans_settings_0x17 *)hdr17;
251 cts17->type = cts->type;
252 cts17->protocol = cts->protocol;
253 cts17->protocol_version = cts->protocol_version;
254 cts17->transport = cts->transport;
255 cts17->transport_version = cts->transport_version;
256 bcopy(&cts->proto_specific, &cts17->proto_specific,
257 sizeof(cts17->proto_specific));
258 bcopy(&cts->xport_specific, &cts17->xport_specific,
259 sizeof(cts17->xport_specific));
260 } else if (ccb->ccb_h.func_code == XPT_DEV_MATCH) {
261 /* Copy the rest of the header over */
262 bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN);
263
265 } else {
266 bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN);
267 }
268
270
271 return (error);
272}
273
274static int
275cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
276 struct thread *td, d_ioctl_t *cbfnp)
277{
278 union ccb *ccb;
279 struct ccb_hdr *hdr;
280 struct ccb_hdr_0x18 *hdr18;
281 uint8_t *ccbb, *ccbb18;
282 u_int error;
283
284 hdr18 = (struct ccb_hdr_0x18 *)addr;
285 ccb = xpt_alloc_ccb();
286 hdr = &ccb->ccb_h;
287
288 hdr->pinfo = hdr18->pinfo;
289 hdr->xpt_links = hdr18->xpt_links;
290 hdr->sim_links = hdr18->sim_links;
291 hdr->periph_links = hdr18->periph_links;
292 hdr->retry_count = hdr18->retry_count;
293 hdr->cbfcnp = hdr18->cbfcnp;
294 hdr->func_code = hdr18->func_code;
295 hdr->status = hdr18->status;
296 hdr->path = hdr18->path;
297 hdr->path_id = hdr18->path_id;
298 hdr->target_id = hdr18->target_id;
299 hdr->target_lun = hdr18->target_lun;
300 if (hdr18->xflags & CAM_EXTLUN_VALID_0x18)
301 hdr->target_lun = hdr18->ext_lun;
302 hdr->flags = hdr18->flags;
303 hdr->xflags = hdr18->xflags;
304 hdr->periph_priv = hdr18->periph_priv;
305 hdr->sim_priv = hdr18->sim_priv;
306 hdr->timeout = hdr18->timeout;
307 hdr->softtimeout.tv_sec = 0;
308 hdr->softtimeout.tv_usec = 0;
309
310 ccbb = (uint8_t *)&hdr[1];
311 ccbb18 = (uint8_t *)&hdr18[1];
313 struct ccb_trans_settings *cts;
314 struct ccb_trans_settings_0x18 *cts18;
315
316 cts = &ccb->cts;
317 cts18 = (struct ccb_trans_settings_0x18 *)hdr18;
318 cts->type = cts18->type;
319 cts->protocol = cts18->protocol;
320 cts->protocol_version = cts18->protocol_version;
321 cts->transport = cts18->transport;
322 cts->transport_version = cts18->transport_version;
323 bcopy(&cts18->proto_specific, &cts->proto_specific,
324 sizeof(cts18->proto_specific));
325 bcopy(&cts18->xport_specific, &cts->xport_specific,
326 sizeof(cts18->xport_specific));
327 } else {
328 bcopy(ccbb18, ccbb, CAM_0X18_DATA_LEN);
329 }
330
331 error = cam_compat_handle_0x19(dev, cmd, (caddr_t)ccb, flag, td, cbfnp);
332
333 hdr18->pinfo = hdr->pinfo;
334 hdr18->xpt_links = hdr->xpt_links;
335 hdr18->sim_links = hdr->sim_links;
336 hdr18->periph_links = hdr->periph_links;
337 hdr18->retry_count = hdr->retry_count;
338 hdr18->cbfcnp = hdr->cbfcnp;
339 hdr18->func_code = hdr->func_code;
340 hdr18->status = hdr->status;
341 hdr18->path = hdr->path;
342 hdr18->path_id = hdr->path_id;
343 hdr18->target_id = hdr->target_id;
344 hdr18->target_lun = hdr->target_lun;
345 hdr18->ext_lun = hdr->target_lun;
346 hdr18->flags = hdr->flags;
347 hdr18->xflags = hdr->xflags | CAM_EXTLUN_VALID_0x18;
348 hdr18->periph_priv = hdr->periph_priv;
349 hdr18->sim_priv = hdr->sim_priv;
350 hdr18->timeout = hdr->timeout;
351
353 struct ccb_trans_settings *cts;
354 struct ccb_trans_settings_0x18 *cts18;
355
356 cts = &ccb->cts;
357 cts18 = (struct ccb_trans_settings_0x18 *)hdr18;
358 cts18->type = cts->type;
359 cts18->protocol = cts->protocol;
360 cts18->protocol_version = cts->protocol_version;
361 cts18->transport = cts->transport;
362 cts18->transport_version = cts->transport_version;
363 bcopy(&cts->proto_specific, &cts18->proto_specific,
364 sizeof(cts18->proto_specific));
365 bcopy(&cts->xport_specific, &cts18->xport_specific,
366 sizeof(cts18->xport_specific));
367 } else if (ccb->ccb_h.func_code == XPT_DEV_MATCH) {
368 bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN);
370 } else {
371 bcopy(ccbb, ccbb18, CAM_0X18_DATA_LEN);
372 }
373
375
376 return (error);
377}
378
379static int
381{
382 struct dev_match_result *dm;
383 struct dev_match_result_0x18 *dm18;
384 struct cam_periph_map_info mapinfo;
385 int i;
386
387 /* Remap the CCB into kernel address space */
388 bzero(&mapinfo, sizeof(mapinfo));
389 cam_periph_mapmem(ccb, &mapinfo, maxphys);
390
391 dm = ccb->cdm.matches;
392 /* Translate in-place: old fields are smaller */
393 dm18 = (struct dev_match_result_0x18 *)(dm);
394
395 for (i = 0; i < ccb->cdm.num_matches; i++) {
396 dm18[i].type = dm[i].type;
397 switch (dm[i].type) {
398 case DEV_MATCH_PERIPH:
399 memcpy(&dm18[i].result.periph_result.periph_name,
401 DEV_IDLEN);
410 break;
411 case DEV_MATCH_DEVICE:
420 memcpy(&dm18[i].result.device_result.inq_data,
422 sizeof(struct scsi_inquiry_data));
423 memcpy(&dm18[i].result.device_result.ident_data,
425 sizeof(struct ata_params));
426 dm18[i].result.device_result.flags =
428 break;
429 case DEV_MATCH_BUS:
430 memcpy(&dm18[i].result.bus_result,
431 &dm[i].result.bus_result,
432 sizeof(struct bus_match_result));
433 break;
434 }
435 }
436
437 cam_periph_unmapmem(ccb, &mapinfo);
438
439 return (0);
440}
441
442static int
443cam_compat_handle_0x19(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
444 struct thread *td, d_ioctl_t *cbfnp)
445{
446 union ccb *ccb = (union ccb *)addr;
447 struct cam_periph_map_info mapinfo;
448
449 if (cmd == CAMIOCOMMAND && ccb->ccb_h.func_code == XPT_DEV_MATCH) {
450 bzero(&mapinfo, sizeof(mapinfo));
451 cam_periph_mapmem(ccb, &mapinfo, maxphys);
452 for (int i = 0; i < ccb->cdm.num_patterns; i++) {
453 struct dev_match_pattern *p = &ccb->cdm.patterns[i];
454
455 if (p->type == DEV_MATCH_BUS &&
456 p->pattern.bus_pattern.flags == 0x00f)
458 if (p->type == DEV_MATCH_DEVICE &&
459 p->pattern.device_pattern.flags == 0x00f)
461 if (p->type == DEV_MATCH_PERIPH &&
462 p->pattern.periph_pattern.flags == 0x01f)
464 }
465 cam_periph_unmapmem(ccb, &mapinfo);
466 }
467 return ((cbfnp)(dev, cmd, addr, flag, td));
468}
#define VUHBALEN
Definition: cam_ccb.h:51
@ PERIPH_MATCH_ANY
Definition: cam_ccb.h:425
@ DEV_MATCH_DEVICE
Definition: cam_ccb.h:491
@ DEV_MATCH_BUS
Definition: cam_ccb.h:492
@ DEV_MATCH_PERIPH
Definition: cam_ccb.h:490
@ BUS_MATCH_ANY
Definition: cam_ccb.h:468
#define PATHINQ_SETTINGS_SIZE
Definition: cam_ccb.h:658
@ DEV_MATCH_ANY
Definition: cam_ccb.h:443
@ CAM_DATA_PADDR
Definition: cam_ccb.h:84
@ CAM_DATA_SG_PADDR
Definition: cam_ccb.h:86
@ CAM_DATA_SG
Definition: cam_ccb.h:85
@ XPT_GET_TRAN_SETTINGS
Definition: cam_ccb.h:183
@ XPT_SET_TRAN_SETTINGS
Definition: cam_ccb.h:188
@ XPT_PATH_INQ
Definition: cam_ccb.h:147
@ XPT_DEV_MATCH
Definition: cam_ccb.h:158
#define HBA_IDLEN
Definition: cam_ccb.h:53
#define SIM_IDLEN
Definition: cam_ccb.h:52
#define DEV_IDLEN
Definition: cam_ccb.h:54
static int cam_compat_handle_0x17(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp)
Definition: cam_compat.c:137
static int cam_compat_handle_0x18(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp)
Definition: cam_compat.c:275
static int cam_compat_handle_0x19(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp)
Definition: cam_compat.c:443
int cam_compat_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp)
Definition: cam_compat.c:66
static int cam_compat_translate_dev_match_0x18(union ccb *ccb)
Definition: cam_compat.c:380
__FBSDID("$FreeBSD$")
#define CAMIOCOMMAND_0x17
Definition: cam_compat.h:139
#define CAM_SCATTER_VALID_0x16
Definition: cam_compat.h:50
#define CAMGETPASSTHRU_0x17
Definition: cam_compat.h:140
#define CAMGETPASSTHRU_0x18
Definition: cam_compat.h:221
#define CAMIOCOMMAND_0x19
Definition: cam_compat.h:225
@ CAM_EXTLUN_VALID_0x18
Definition: cam_compat.h:169
#define CAMGETPASSTHRU_0x16
Definition: cam_compat.h:48
#define CAMIOCOMMAND_0x16
Definition: cam_compat.h:47
#define CAM_SG_LIST_PHYS_0x16
Definition: cam_compat.h:51
#define CAM_0X18_DATA_LEN
Definition: cam_compat.h:217
#define CAMIOQUEUE_0x19
Definition: cam_compat.h:227
#define CAM_DATA_PHYS_0x16
Definition: cam_compat.h:52
#define CAMIOGET_0x19
Definition: cam_compat.h:228
#define CAM_0X17_DATA_LEN
Definition: cam_compat.h:136
#define CAMIOCOMMAND_0x18
Definition: cam_compat.h:220
#define CAMGETPASSTHRU_0x19
Definition: cam_compat.h:226
void cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
Definition: cam_periph.c:1005
int cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, u_int maxmap)
Definition: cam_periph.c:793
union ccb * xpt_alloc_ccb(void)
Definition: cam_xpt.c:4612
void xpt_free_ccb(union ccb *free_ccb)
Definition: cam_xpt.c:4630
union ccb * ccb
Definition: mmc_sim_if.m:53
struct ccb_trans_settings_mmc * cts
Definition: mmc_sim_if.m:43
#define CAMGETPASSTHRU
Definition: scsi_pass.h:42
#define CAMIOQUEUE
Definition: scsi_pass.h:49
#define CAMIOGET
Definition: scsi_pass.h:50
#define CAMIOCOMMAND
Definition: scsi_pass.h:41
bus_pattern_flags flags
Definition: cam_ccb.h:480
u_int32_t num_matches
Definition: cam_ccb.h:585
struct dev_match_result * matches
Definition: cam_ccb.h:587
u_int32_t num_patterns
Definition: cam_ccb.h:582
struct dev_match_pattern * patterns
Definition: cam_ccb.h:584
camq_entry sim_links
Definition: cam_compat.h:60
target_id_t target_id
Definition: cam_compat.h:68
u_int32_t flags
Definition: cam_compat.h:70
u_int target_lun
Definition: cam_compat.h:69
struct cam_path * path
Definition: cam_compat.h:66
camq_entry xpt_links
Definition: cam_compat.h:59
xpt_opcode func_code
Definition: cam_compat.h:64
u_int32_t retry_count
Definition: cam_compat.h:62
void(* cbfcnp)(struct cam_periph *, union ccb *)
Definition: cam_compat.h:63
ccb_ppriv_area periph_priv
Definition: cam_compat.h:71
u_int32_t timeout
Definition: cam_compat.h:73
cam_pinfo pinfo
Definition: cam_compat.h:58
camq_entry periph_links
Definition: cam_compat.h:61
ccb_spriv_area sim_priv
Definition: cam_compat.h:72
path_id_t path_id
Definition: cam_compat.h:67
u_int32_t status
Definition: cam_compat.h:65
cam_pinfo pinfo
Definition: cam_compat.h:146
xpt_opcode func_code
Definition: cam_compat.h:152
struct cam_path * path
Definition: cam_compat.h:154
u_int32_t xflags
Definition: cam_compat.h:160
u_int32_t flags
Definition: cam_compat.h:159
camq_entry sim_links
Definition: cam_compat.h:148
path_id_t path_id
Definition: cam_compat.h:155
u_int64_t ext_lun
Definition: cam_compat.h:158
camq_entry periph_links
Definition: cam_compat.h:149
u_int target_lun
Definition: cam_compat.h:157
u_int32_t status
Definition: cam_compat.h:153
u_int32_t retry_count
Definition: cam_compat.h:150
target_id_t target_id
Definition: cam_compat.h:156
camq_entry xpt_links
Definition: cam_compat.h:147
ccb_ppriv_area periph_priv
Definition: cam_compat.h:161
ccb_spriv_area sim_priv
Definition: cam_compat.h:162
void(* cbfcnp)(struct cam_periph *, union ccb *)
Definition: cam_compat.h:151
u_int32_t timeout
Definition: cam_compat.h:164
camq_entry xpt_links
Definition: cam_ccb.h:350
u_int32_t xflags
Definition: cam_ccb.h:369
u_int32_t flags
Definition: cam_ccb.h:368
path_id_t path_id
Definition: cam_ccb.h:365
camq_entry sim_links
Definition: cam_ccb.h:351
struct cam_path * path
Definition: cam_ccb.h:364
cam_pinfo pinfo
Definition: cam_ccb.h:349
xpt_opcode func_code
Definition: cam_ccb.h:362
lun_id_t target_lun
Definition: cam_ccb.h:367
ccb_ppriv_area periph_priv
Definition: cam_ccb.h:370
u_int32_t timeout
Definition: cam_ccb.h:373
u_int32_t status
Definition: cam_ccb.h:363
target_id_t target_id
Definition: cam_ccb.h:366
ccb_spriv_area sim_priv
Definition: cam_ccb.h:371
struct timeval softtimeout
Definition: cam_ccb.h:374
camq_entry periph_links
Definition: cam_ccb.h:352
u_int16_t retry_count
Definition: cam_ccb.h:354
void(* cbfcnp)(struct cam_periph *, union ccb *)
Definition: cam_ccb.h:360
cam_proto protocol
Definition: cam_compat.h:97
u_int32_t max_lun
Definition: cam_compat.h:87
u_int16_t hba_subvendor
Definition: cam_compat.h:110
u_int transport_version
Definition: cam_compat.h:100
u_int8_t vuhba_flags[VUHBALEN]
Definition: cam_compat.h:85
path_id_t hpath_id
Definition: cam_compat.h:89
u_int32_t bus_id
Definition: cam_compat.h:95
u_int32_t base_transfer_speed
Definition: cam_compat.h:96
target_id_t initiator_id
Definition: cam_compat.h:90
u_int8_t target_sprt
Definition: cam_compat.h:81
char hba_vid[HBA_IDLEN]
Definition: cam_compat.h:92
cam_xport transport
Definition: cam_compat.h:99
u_int8_t hba_inquiry
Definition: cam_compat.h:80
u_int8_t version_num
Definition: cam_compat.h:79
union ccb_pathinq_0x17::@6 xport_specific
u_int protocol_version
Definition: cam_compat.h:98
u_int32_t unit_number
Definition: cam_compat.h:94
u_int16_t hba_device
Definition: cam_compat.h:109
u_int16_t hba_subdevice
Definition: cam_compat.h:111
u_int32_t max_target
Definition: cam_compat.h:86
char sim_vid[SIM_IDLEN]
Definition: cam_compat.h:91
char dev_name[DEV_IDLEN]
Definition: cam_compat.h:93
u_int8_t hba_misc
Definition: cam_compat.h:82
u_int16_t hba_vendor
Definition: cam_compat.h:108
u_int32_t async_flags
Definition: cam_compat.h:88
u_int16_t hba_eng_cnt
Definition: cam_compat.h:83
cam_proto protocol
Definition: cam_ccb.h:680
u_int16_t hba_eng_cnt
Definition: cam_ccb.h:666
u_int8_t version_num
Definition: cam_ccb.h:662
u_int32_t max_target
Definition: cam_ccb.h:669
union ccb_pathinq::@2 xport_specific
u_int32_t unit_number
Definition: cam_ccb.h:677
u_int16_t hba_vendor
Definition: cam_ccb.h:692
u_int32_t async_flags
Definition: cam_ccb.h:671
u_int protocol_version
Definition: cam_ccb.h:681
path_id_t hpath_id
Definition: cam_ccb.h:672
char hba_vid[HBA_IDLEN]
Definition: cam_ccb.h:675
char dev_name[DEV_IDLEN]
Definition: cam_ccb.h:676
u_int32_t hba_misc
Definition: cam_ccb.h:665
u_int16_t hba_device
Definition: cam_ccb.h:693
u_int8_t vuhba_flags[VUHBALEN]
Definition: cam_ccb.h:668
u_int8_t hba_inquiry
Definition: cam_ccb.h:663
char sim_vid[SIM_IDLEN]
Definition: cam_ccb.h:674
u_int16_t target_sprt
Definition: cam_ccb.h:664
u_int32_t max_lun
Definition: cam_ccb.h:670
u_int32_t base_transfer_speed
Definition: cam_ccb.h:679
cam_xport transport
Definition: cam_ccb.h:682
u_int16_t hba_subvendor
Definition: cam_ccb.h:694
target_id_t initiator_id
Definition: cam_ccb.h:673
u_int maxio
Definition: cam_ccb.h:691
u_int transport_version
Definition: cam_ccb.h:683
u_int16_t hba_subdevice
Definition: cam_ccb.h:695
u_int32_t bus_id
Definition: cam_ccb.h:678
union ccb_trans_settings_0x17::@8 xport_specific
union ccb_trans_settings_0x17::@7 proto_specific
union ccb_trans_settings_0x18::@9 proto_specific
union ccb_trans_settings_0x18::@10 xport_specific
dev_match_type type
Definition: cam_ccb.h:496
union match_pattern pattern
Definition: cam_ccb.h:497
dev_result_flags flags
Definition: cam_compat.h:211
target_id_t target_id
Definition: cam_compat.h:201
struct dev_match_result_0x18::@11::@12 periph_result
struct dev_match_result_0x18::@11::@13 device_result
union dev_match_result_0x18::@11 result
dev_match_type type
Definition: cam_compat.h:195
union match_result result
Definition: cam_ccb.h:538
dev_match_type type
Definition: cam_ccb.h:537
dev_pattern_flags flags
Definition: cam_ccb.h:460
struct scsi_inquiry_data inq_data
Definition: cam_ccb.h:518
target_id_t target_id
Definition: cam_ccb.h:515
cam_proto protocol
Definition: cam_ccb.h:517
path_id_t path_id
Definition: cam_ccb.h:514
struct ata_params ident_data
Definition: cam_ccb.h:519
dev_result_flags flags
Definition: cam_ccb.h:520
lun_id_t target_lun
Definition: cam_ccb.h:516
periph_pattern_flags flags
Definition: cam_ccb.h:439
char periph_name[DEV_IDLEN]
Definition: cam_ccb.h:501
path_id_t path_id
Definition: cam_ccb.h:503
lun_id_t target_lun
Definition: cam_ccb.h:505
target_id_t target_id
Definition: cam_ccb.h:504
u_int32_t unit_number
Definition: cam_ccb.h:502
Definition: cam_ccb.h:1345
struct ccb_dev_match cdm
Definition: cam_ccb.h:1356
struct ccb_trans_settings cts
Definition: cam_ccb.h:1357
struct ccb_hdr ccb_h
Definition: cam_ccb.h:1346
struct ccb_pathinq cpi
Definition: cam_ccb.h:1350
struct bus_match_pattern bus_pattern
Definition: cam_ccb.h:486
struct device_match_pattern device_pattern
Definition: cam_ccb.h:485
struct periph_match_pattern periph_pattern
Definition: cam_ccb.h:484
struct device_match_result device_result
Definition: cam_ccb.h:532
struct bus_match_result bus_result
Definition: cam_ccb.h:533
struct periph_match_result periph_result
Definition: cam_ccb.h:531