Home
last modified time | relevance | path

Searched refs:ccb (Results 1 – 25 of 201) sorted by relevance

123456789

/src/usr.sbin/mptutil/
H A Dmpt_cam.c63 union ccb ccb; in fetch_path_id() local
71 bzero(&ccb, sizeof(ccb)); in fetch_path_id()
73 ccb.ccb_h.func_code = XPT_DEV_MATCH; in fetch_path_id()
76 ccb.cdm.num_matches = 0; in fetch_path_id()
77 ccb.cdm.match_buf_len = bufsize; in fetch_path_id()
78 ccb.cdm.matches = calloc(1, bufsize); in fetch_path_id()
81 ccb.cdm.num_patterns = 1; in fetch_path_id()
82 ccb.cdm.pattern_buf_len = bufsize; in fetch_path_id()
83 ccb.cdm.patterns = calloc(1, bufsize); in fetch_path_id()
86 ccb.cdm.patterns[0].type = DEV_MATCH_BUS; in fetch_path_id()
[all …]
/src/sys/dev/aacraid/
H A Daacraid_cam.c102 static void aac_cam_action(struct cam_sim *, union ccb *);
108 static void aac_set_scsi_error(struct aac_softc *sc, union ccb *ccb,
112 static void aac_container_rw_command(struct cam_sim *, union ccb *, u_int8_t *);
113 static void aac_container_special_command(struct cam_sim *, union ccb *,
115 static void aac_passthrough_command(struct cam_sim *, union ccb *);
117 static u_int32_t aac_cam_reset_bus(struct cam_sim *, union ccb *);
118 static u_int32_t aac_cam_abort_ccb(struct cam_sim *, union ccb *);
119 static u_int32_t aac_cam_term_io(struct cam_sim *, union ccb *);
140 aac_set_scsi_error(struct aac_softc *sc, union ccb *ccb, u_int8_t status, in aac_set_scsi_error() argument
144 (struct scsi_sense_data_fixed *)&ccb->csio.sense_data; in aac_set_scsi_error()
[all …]
/src/sys/dev/isci/
H A Disci_io_request.c87 union ccb *ccb; in isci_io_request_complete() local
96 ccb = isci_request->ccb; in isci_io_request_complete()
97 csio = &ccb->csio; in isci_io_request_complete()
98 ccb->ccb_h.status &= ~CAM_STATUS_MASK; in isci_io_request_complete()
103 if (ccb->ccb_h.func_code == XPT_SMP_IO) { in isci_io_request_complete()
108 memcpy(ccb->smpio.smp_response, smp_response, in isci_io_request_complete()
109 ccb->smpio.smp_response_len); in isci_io_request_complete()
111 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete()
115 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete()
116 ccb->csio.resid = ccb->csio.dxfer_len - in isci_io_request_complete()
[all …]
/src/lib/libcam/
H A Dcamlib.c66 cam_send_ccb(struct cam_device *device, union ccb *ccb) in cam_send_ccb() argument
68 return(ioctl(device->fd, CAMIOCOMMAND, ccb)); in cam_send_ccb()
74 union ccb *
77 union ccb *ccb; in cam_getccb() local
79 ccb = calloc(1, sizeof(*ccb)); in cam_getccb()
80 if (ccb != NULL) { in cam_getccb()
81 ccb->ccb_h.path_id = dev->path_id; in cam_getccb()
82 ccb->ccb_h.target_id = dev->target_id; in cam_getccb()
83 ccb->ccb_h.target_lun = dev->target_lun; in cam_getccb()
86 return(ccb); in cam_getccb()
[all …]
H A Dscsi_wrap.c51 union ccb *ccb = NULL; in scsi_wrap_get_physical_element_status() local
56 ccb = cam_getccb(device); in scsi_wrap_get_physical_element_status()
57 if (ccb == NULL) { in scsi_wrap_get_physical_element_status()
78 scsi_get_physical_element_status(&ccb->csio, in scsi_wrap_get_physical_element_status()
90 ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; in scsi_wrap_get_physical_element_status()
92 if (cam_send_ccb(device, ccb) < 0) { in scsi_wrap_get_physical_element_status()
97 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { in scsi_wrap_get_physical_element_status()
98 cam_error_print(device, ccb, CAM_ESF_ALL, in scsi_wrap_get_physical_element_status()
116 cam_freeccb(ccb); in scsi_wrap_get_physical_element_status()
119 cam_freeccb(ccb); in scsi_wrap_get_physical_element_status()
[all …]
/src/sys/dev/aac/
H A Daac_cam.c79 static void aac_cam_action(struct cam_sim *, union ccb *);
85 static u_int32_t aac_cam_reset_bus(struct cam_sim *, union ccb *);
86 static u_int32_t aac_cam_abort_ccb(struct cam_sim *, union ccb *);
87 static u_int32_t aac_cam_term_io(struct cam_sim *, union ccb *);
110 union ccb *ccb; in aac_cam_rescan() local
123 ccb = xpt_alloc_ccb_nowait(); in aac_cam_rescan()
124 if (ccb == NULL) { in aac_cam_rescan()
130 if (xpt_create_path(&ccb->ccb_h.path, NULL, in aac_cam_rescan()
133 xpt_free_ccb(ccb); in aac_cam_rescan()
138 xpt_rescan(ccb); in aac_cam_rescan()
[all …]
/src/sys/dev/nvmf/host/
H A Dnvmf_sim.c29 ccb_refs(union ccb *ccb) in ccb_refs() argument
31 return ((u_int *)&ccb->ccb_h.spriv_field0); in ccb_refs()
37 nvmf_ccb_done(union ccb *ccb) in nvmf_ccb_done() argument
39 if (!refcount_release(ccb_refs(ccb))) in nvmf_ccb_done()
42 if (nvmf_cqe_aborted(&ccb->nvmeio.cpl)) { in nvmf_ccb_done()
43 struct cam_sim *sim = xpt_path_sim(ccb->ccb_h.path); in nvmf_ccb_done()
47 ccb->ccb_h.status = CAM_DEV_NOT_THERE; in nvmf_ccb_done()
49 ccb->ccb_h.status = CAM_REQUEUE_REQ; in nvmf_ccb_done()
50 xpt_done(ccb); in nvmf_ccb_done()
51 } else if (ccb->nvmeio.cpl.status != 0) { in nvmf_ccb_done()
[all …]
/src/sys/cam/ctl/
H A Dctl_frontend_cam_sim.c68 union ccb *ccb; member
98 void cfcs_action(struct cam_sim *sim, union ccb *ccb);
240 union ccb *ccb; in cfcs_onoffline() local
244 ccb = xpt_alloc_ccb_nowait(); in cfcs_onoffline()
245 if (ccb == NULL) { in cfcs_onoffline()
250 if (xpt_create_path(&ccb->ccb_h.path, NULL, in cfcs_onoffline()
254 xpt_free_ccb(ccb); in cfcs_onoffline()
257 xpt_rescan(ccb); in cfcs_onoffline()
283 union ccb *ccb; in cfcs_datamove() local
292 ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfcs_datamove()
[all …]
/src/sys/cam/
H A Dcam_periph.c73 union ccb *done_ccb);
75 static int camperiphscsistatuserror(union ccb *ccb,
76 union ccb **orig_ccb,
84 static int camperiphscsisenseerror(union ccb *ccb,
85 union ccb **orig_ccb,
93 static void cam_periph_devctl_notify(union ccb *ccb);
806 cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, in cam_periph_mapmem() argument
819 switch(ccb->ccb_h.func_code) { in cam_periph_mapmem()
821 if (ccb->cdm.match_buf_len == 0) { in cam_periph_mapmem()
826 if (ccb->cdm.pattern_buf_len > 0) { in cam_periph_mapmem()
[all …]
H A Dcam.c321 cam_error_string(union ccb *ccb, char *str, int str_len, in cam_error_string() argument
326 cam_error_string(struct cam_device *device, union ccb *ccb, char *str, in cam_error_string()
334 if ((ccb == NULL) in cam_error_string()
342 switch (ccb->ccb_h.func_code) { in cam_error_string()
406 xpt_path_string(ccb->csio.ccb_h.path, path_str, sizeof(path_str)); in cam_error_string()
415 switch (ccb->ccb_h.func_code) { in cam_error_string()
417 ata_command_sbuf(&ccb->ataio, &sb); in cam_error_string()
421 scsi_command_string(&ccb->csio, &sb); in cam_error_string()
423 scsi_command_string(device, &ccb->csio, &sb); in cam_error_string()
427 smp_command_sbuf(&ccb->smpio, &sb, path_str, 79 - in cam_error_string()
[all …]
/src/sbin/camcontrol/
H A Dcamcontrol.c402 union ccb *ccb; in getdevlist() local
406 ccb = cam_getccb(device); in getdevlist()
408 ccb->ccb_h.func_code = XPT_GDEVLIST; in getdevlist()
409 ccb->ccb_h.flags = CAM_DIR_NONE; in getdevlist()
410 ccb->ccb_h.retry_count = 1; in getdevlist()
411 ccb->cgdl.index = 0; in getdevlist()
412 ccb->cgdl.status = CAM_GDEVLIST_MORE_DEVS; in getdevlist()
413 while (ccb->cgdl.status == CAM_GDEVLIST_MORE_DEVS) { in getdevlist()
414 if (cam_send_ccb(device, ccb) < 0) { in getdevlist()
416 cam_freeccb(ccb); in getdevlist()
[all …]
H A Dtimestamp.c79 union ccb *ccb = NULL; in set_restore_flags() local
85 ccb = cam_getccb(device); in set_restore_flags()
86 if (ccb == NULL) { in set_restore_flags()
95 scsi_mode_sense_subpage(&ccb->csio, in set_restore_flags()
109 ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; in set_restore_flags()
111 ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; in set_restore_flags()
113 error = cam_send_ccb(device, ccb); in set_restore_flags()
119 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { in set_restore_flags()
120 cam_error_print(device, ccb, CAM_ESF_ALL, in set_restore_flags()
148 scsi_mode_select_len(&ccb->csio, in set_restore_flags()
[all …]
/src/usr.bin/iscsictl/
H A Dperiphs.c67 union ccb ccb; in print_periphs() local
82 bzero(&ccb, sizeof(union ccb)); in print_periphs()
84 ccb.ccb_h.path_id = CAM_XPT_PATH_ID; in print_periphs()
85 ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; in print_periphs()
86 ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; in print_periphs()
88 ccb.ccb_h.func_code = XPT_DEV_MATCH; in print_periphs()
90 ccb.cdm.match_buf_len = bufsize; in print_periphs()
91 ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); in print_periphs()
92 if (ccb.cdm.matches == NULL) { in print_periphs()
97 ccb.cdm.num_matches = 0; in print_periphs()
[all …]
/src/sys/dev/ata/
H A Data-all.c59 static void ataaction(struct cam_sim *sim, union ccb *ccb);
61 static void ata_cam_begin_transaction(device_t dev, union ccb *ccb);
64 static int ata_check_ids(device_t dev, union ccb *ccb);
262 union ccb *ccb; in ata_conn_event() local
270 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in ata_conn_event()
272 if (xpt_create_path(&ccb->ccb_h.path, NULL, in ata_conn_event()
275 xpt_free_ccb(ccb); in ata_conn_event()
278 xpt_rescan(ccb); in ata_conn_event()
442 request->u.atapi.saved_cmd : request->u.atapi.ccb[0]) { in ata_cmd2str()
730 ata_cam_begin_transaction(device_t dev, union ccb *ccb) in ata_cam_begin_transaction() argument
[all …]
/src/sys/cam/mmc/
H A Dmmc_sim.c59 if (mmc_sim->ccb == NULL) in mmc_sim_task()
62 cts = &mmc_sim->ccb->cts; in mmc_sim_task()
63 switch (mmc_sim->ccb->ccb_h.func_code) { in mmc_sim_task()
67 mmc_sim->ccb->ccb_h.status = CAM_REQ_INVALID; in mmc_sim_task()
69 mmc_sim->ccb->ccb_h.status = CAM_REQ_CMP; in mmc_sim_task()
74 mmc_sim->ccb->ccb_h.status = CAM_REQ_INVALID; in mmc_sim_task()
76 mmc_sim->ccb->ccb_h.status = CAM_REQ_CMP; in mmc_sim_task()
79 panic("Unsupported ccb func %x\n", mmc_sim->ccb->ccb_h.func_code); in mmc_sim_task()
83 xpt_done(mmc_sim->ccb); in mmc_sim_task()
84 mmc_sim->ccb = NULL; in mmc_sim_task()
[all …]
/src/sys/powerpc/mpc85xx/
H A Dfsl_sata.c66 static void fsl_sata_begin_transaction(struct fsl_sata_channel *ch, union ccb *ccb);
71 …sata_setup_fis(struct fsl_sata_channel *ch, struct fsl_sata_cmd_tab *ctp, union ccb *ccb, int tag);
82 static void fsl_sata_process_read_log(struct fsl_sata_channel *ch, union ccb *ccb);
83 static void fsl_sata_process_request_sense(struct fsl_sata_channel *ch, union ccb *ccb);
85 static void fsl_sataaction(struct cam_sim *sim, union ccb *ccb);
234 union ccb *ccb; /* CCB occupying slot */ member
264 union ccb *hold[FSL_SATA_MAX_SLOTS];
282 union ccb *frozen; /* Frozen command */
647 slot->ccb = NULL; in fsl_sata_slotsalloc()
680 union ccb *ccb; in fsl_sata_phy_check_events() local
[all …]
/src/sys/dev/isp/
H A Disp_freebsd.h92 void * ccb; member
172 #define ISP_PCMD(ccb) (ccb)->ccb_h.spriv_ptr1 argument
173 #define PISP_PCMD(ccb) ((struct isp_pcmd *)ISP_PCMD(ccb)) argument
443 #define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path)) argument
444 #define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)) argument
445 #define XS_TGT(ccb) (ccb)->ccb_h.target_id argument
446 #define XS_LUN(ccb) (ccb)->ccb_h.target_lun argument
448 #define XS_CDBP(ccb) \ argument
449 (((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \
450 (ccb)->cdb_io.cdb_ptr : (ccb)->cdb_io.cdb_bytes)
[all …]
H A Disp_freebsd.c63 static void isp_action(struct cam_sim *, union ccb *);
597 static ISP_INLINE int isp_get_pcmd(ispsoftc_t *, union ccb *);
598 static ISP_INLINE void isp_free_pcmd(ispsoftc_t *, union ccb *);
601 isp_get_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_get_pcmd() argument
603 ISP_PCMD(ccb) = isp->isp_osinfo.pcmd_free; in isp_get_pcmd()
604 if (ISP_PCMD(ccb) == NULL) { in isp_get_pcmd()
607 isp->isp_osinfo.pcmd_free = ((struct isp_pcmd *)ISP_PCMD(ccb))->next; in isp_get_pcmd()
612 isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_free_pcmd() argument
614 if (ISP_PCMD(ccb)) { in isp_free_pcmd()
616 PISP_PCMD(ccb)->datalen = 0; in isp_free_pcmd()
[all …]
/src/sys/dev/ufshci/
H A Dufshci_sim.c31 union ccb *ccb = (union ccb *)ccb_arg; in ufshci_sim_scsiio_done() local
44 memcpy(&ccb->csio.sense_data, sense_data, in ufshci_sim_scsiio_done()
47 ccb->ccb_h.status &= ~CAM_SIM_QUEUED; in ufshci_sim_scsiio_done()
54 ccb->ccb_h.status = CAM_REQ_CMP_ERR; in ufshci_sim_scsiio_done()
55 xpt_done(ccb); in ufshci_sim_scsiio_done()
57 ccb->ccb_h.status = CAM_REQ_CMP; in ufshci_sim_scsiio_done()
58 xpt_done_direct(ccb); in ufshci_sim_scsiio_done()
66 ufshci_sim_illegal_request(union ccb *ccb) in ufshci_sim_illegal_request() argument
68 scsi_set_sense_data(&ccb->csio.sense_data, in ufshci_sim_illegal_request()
75 ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; in ufshci_sim_illegal_request()
[all …]
/src/sys/dev/mvs/
H A Dmvs.c71 static void mvs_softreset(device_t dev, union ccb *ccb);
76 static void mvs_tfd_read(device_t dev, union ccb *ccb);
77 static void mvs_tfd_write(device_t dev, union ccb *ccb);
80 static void mvs_begin_transaction(device_t dev, union ccb *ccb);
90 static void mvs_process_read_log(device_t dev, union ccb *ccb);
91 static void mvs_process_request_sense(device_t dev, union ccb *ccb);
93 static void mvsaction(struct cam_sim *sim, union ccb *ccb);
438 slot->ccb = NULL; in mvs_slotsalloc()
599 union ccb *ccb; in mvs_phy_check_events() local
610 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in mvs_phy_check_events()
[all …]
/src/sys/dev/ocs_fc/
H A Docs_cam.c80 static void ocs_action(struct cam_sim *, union ccb *);
86 static uint32_t ocs_abort_initiator_io(struct ocs_softc *ocs, union ccb *accb);
87 static void ocs_abort_inot(struct ocs_softc *ocs, union ccb *ccb);
88 static void ocs_abort_atio(struct ocs_softc *ocs, union ccb *ccb);
617 xpt_done((union ccb *)atio); in ocs_scsi_recv_cmd()
790 xpt_done((union ccb *)inot); in ocs_scsi_recv_tmf()
1036 union ccb *ccb = NULL; in ocs_add_new_tgt() local
1042 if (NULL == (ccb = xpt_alloc_ccb_nowait())) { in ocs_add_new_tgt()
1047 if (CAM_REQ_CMP != xpt_create_path(&ccb->ccb_h.path, xpt_periph, in ocs_add_new_tgt()
1052 xpt_free_ccb(ccb); in ocs_add_new_tgt()
[all …]
/src/sys/powerpc/ps3/
H A Dps3cdrom.c80 union ccb *x_ccb;
132 static void ps3cdrom_action(struct cam_sim *sim, union ccb *ccb);
268 xpt_action((union ccb *) &csa); in ps3cdrom_attach()
336 ps3cdrom_action(struct cam_sim *sim, union ccb *ccb) in ps3cdrom_action() argument
345 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, in ps3cdrom_action()
346 ("function code 0x%02x\n", ccb->ccb_h.func_code)); in ps3cdrom_action()
348 switch (ccb->ccb_h.func_code) { in ps3cdrom_action()
350 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG) in ps3cdrom_action()
353 if(ccb->ccb_h.target_id > 0) { in ps3cdrom_action()
354 ccb->ccb_h.status = CAM_TID_INVALID; in ps3cdrom_action()
[all …]
/src/sys/dev/smartpqi/
H A Dsmartpqi_cam.c110 union ccb *ccb; in os_add_device() local
117 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) { in os_add_device()
122 if (xpt_create_path(&ccb->ccb_h.path, NULL, in os_add_device()
126 xpt_free_ccb(ccb); in os_add_device()
129 xpt_rescan(ccb); in os_add_device()
300 xpt_done((union ccb *)csio); in pqi_complete_scsi_io()
534 pqi_freeze_ccb(union ccb *ccb) in pqi_freeze_ccb() argument
536 if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { in pqi_freeze_ccb()
537 ccb->ccb_h.status |= CAM_DEV_QFRZN; in pqi_freeze_ccb()
538 xpt_freeze_devq(ccb->ccb_h.path, 1); in pqi_freeze_ccb()
[all …]
/src/sys/dev/siis/
H A Dsiis.c70 static void siis_begin_transaction(device_t dev, union ccb *ccb);
75 static int siis_setup_fis(device_t dev, struct siis_cmd *ctp, union ccb *ccb, int tag);
88 static void siis_process_read_log(device_t dev, union ccb *ccb);
89 static void siis_process_request_sense(device_t dev, union ccb *ccb);
91 static void siisaction(struct cam_sim *sim, union ccb *ccb);
747 slot->ccb = NULL; in siis_slotsalloc()
813 union ccb *ccb; in siis_phy_check_events() local
824 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in siis_phy_check_events()
826 if (xpt_create_path(&ccb->ccb_h.path, NULL, in siis_phy_check_events()
829 xpt_free_ccb(ccb); in siis_phy_check_events()
[all …]
/src/sys/dev/ahci/
H A Dahciem.c56 static void ahciemaction(struct cam_sim *sim, union ccb *ccb);
353 ahci_check_ids(union ccb *ccb) in ahci_check_ids() argument
356 if (ccb->ccb_h.target_id != 0) { in ahci_check_ids()
357 ccb->ccb_h.status = CAM_TID_INVALID; in ahci_check_ids()
358 xpt_done(ccb); in ahci_check_ids()
361 if (ccb->ccb_h.target_lun != 0) { in ahci_check_ids()
362 ccb->ccb_h.status = CAM_LUN_INVALID; in ahci_check_ids()
363 xpt_done(ccb); in ahci_check_ids()
370 ahci_em_emulate_ses_on_led(device_t dev, union ccb *ccb) in ahci_em_emulate_ses_on_led() argument
383 buf = ccb->ataio.data_ptr; in ahci_em_emulate_ses_on_led()
[all …]

123456789