/freebsd/sys/cam/ctl/ |
H A D | ctl.c | 399 static void ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, 404 static int ctl_enable_lun(struct ctl_lun *lun); 405 static int ctl_disable_lun(struct ctl_lun *lun); 406 static int ctl_free_lun(struct ctl_lun *lun); 409 static int ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun, 415 static void ctl_pro_preempt_other(struct ctl_lun *lun, 436 static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, 439 static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, 441 static void ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, 443 static void ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *io, [all …]
|
H A D | ctl_error.c | 71 struct ctl_lun *lun; in ctl_set_sense_data_va() local 73 lun = (struct ctl_lun *)lunptr; in ctl_set_sense_data_va() 91 if ((lun != NULL) && (lun->MODE_CTRL.rlec & SCP_DSENSE)) in ctl_set_sense_data_va() 101 if ((lun != NULL) && (lun->MODE_CTRLE.max_sense != 0)) in ctl_set_sense_data_va() 102 *sense_len = lun->MODE_CTRLE.max_sense; in ctl_set_sense_data_va() 129 struct ctl_lun *lun; in ctl_set_sense() local 137 lun = CTL_LUN(ctsio); in ctl_set_sense() 142 lun, in ctl_set_sense() 390 ctl_ua_to_ascq(struct ctl_lun * lun,ctl_ua_type ua_to_build,int * asc,int * ascq,ctl_ua_type * ua_to_clear,uint8_t ** info) ctl_ua_to_ascq() argument 495 ctl_build_qae(struct ctl_lun * lun,uint32_t initidx,uint8_t * resp) ctl_build_qae() argument 529 ctl_build_ua(struct ctl_lun * lun,uint32_t initidx,struct scsi_sense_data * sense,u_int * sense_len,scsi_sense_data_type sense_format) ctl_build_ua() argument [all...] |
H A D | ctl_tpc.c | 88 uint64_t lun; member 98 uint64_t lun; member 149 struct ctl_lun *lun; member 159 struct ctl_lun *lun; in tpc_timeout() local 164 STAILQ_FOREACH(lun, &softc->lun_list, links) { in tpc_timeout() 165 mtx_lock(&lun->lun_lock); in tpc_timeout() 166 TAILQ_FOREACH_SAFE(list, &lun->tpc_lists, links, tlist) { in tpc_timeout() 170 TAILQ_REMOVE(&lun->tpc_lists, list, links); in tpc_timeout() 173 mtx_unlock(&lun->lun_lock); in tpc_timeout() 220 ctl_tpc_lun_init(struct ctl_lun *lun) in ctl_tpc_lun_init() argument [all …]
|
H A D | ctl_tpc_local.c | 270 struct ctl_lun *lun; in tpcl_resolve() local 284 STAILQ_FOREACH(lun, &softc->lun_list, links) { in tpcl_resolve() 286 ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in tpcl_resolve() 288 if (lun->lun_devid == NULL) in tpcl_resolve() 290 if (scsi_devid_match(lun->lun_devid->data, in tpcl_resolve() 291 lun->lun_devid->len, &cscdid->codeset, in tpcl_resolve() 293 lunid = lun->lun; in tpcl_resolve() 295 *ss = lun->be_lun->blocksize; in tpcl_resolve() 297 *ps = lun->be_lun->blocksize << in tpcl_resolve() 298 lun->be_lun->pblockexp; in tpcl_resolve() [all …]
|
H A D | ctl_frontend.c | 312 struct ctl_lun *lun; in ctl_port_online() local 325 STAILQ_FOREACH(lun, &softc->lun_list, links) in ctl_port_online() 326 port->lun_enable(port->targ_lun_arg, lun->lun); in ctl_port_online() 340 STAILQ_FOREACH(lun, &softc->lun_list, links) { in ctl_port_online() 341 if (ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in ctl_port_online() 343 mtx_lock(&lun->lun_lock); in ctl_port_online() 344 ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); in ctl_port_online() 345 mtx_unlock(&lun->lun_lock); in ctl_port_online() 355 struct ctl_lun *lun; in ctl_port_offline() local 369 STAILQ_FOREACH(lun, &softc->lun_list, links) in ctl_port_offline() [all …]
|
H A D | ctl.h | 191 void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); 192 void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, 194 void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); 195 void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); 196 void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); 203 void ctl_isc_announce_lun(struct ctl_lun *lun); 206 void ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx,
|
H A D | ctl_error.h | 50 void *lun, scsi_sense_data_type sense_format, int current_error, 53 void *lun, scsi_sense_data_type sense_format, int current_error, 62 ctl_ua_type ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp); 63 ctl_ua_type ctl_build_ua(struct ctl_lun *lun, uint32_t initidx,
|
/freebsd/tools/tools/usbtest/ |
H A D | usb_msc_test.c | 121 static void usb_request_sense(uint8_t lun); 124 do_msc_reset(uint8_t lun) in do_msc_reset() argument 146 usb_request_sense(lun); in do_msc_reset() 151 uint8_t isread, uint8_t isshort, uint8_t lun, uint8_t flags) in do_msc_cmd() argument 167 cbw.bCBWLUN = lun; in do_msc_cmd() 179 do_msc_reset(lun); in do_msc_cmd() 185 do_msc_reset(lun); in do_msc_cmd() 197 do_msc_reset(lun); in do_msc_cmd() 203 do_msc_reset(lun); in do_msc_cmd() 233 do_msc_reset(lun); in do_msc_cmd() [all …]
|
/freebsd/usr.sbin/ctld/ |
H A D | kernel.c | 405 struct lun *cl; in conf_new_from_kernel() 408 struct cctl_lun *lun; in conf_new_from_kernel() local 598 STAILQ_FOREACH(lun, &devlist.lun_list, links) { in conf_new_from_kernel() 599 if (lun->ctld_name == NULL) { in conf_new_from_kernel() 601 "ignoring", (uintmax_t)lun->lun_id); in conf_new_from_kernel() 605 cl = lun_find(conf, lun->ctld_name); in conf_new_from_kernel() 609 (uintmax_t)lun->lun_id, lun->ctld_name, in conf_new_from_kernel() 615 (uintmax_t)lun->lun_id, lun->ctld_name); in conf_new_from_kernel() 617 cl = lun_new(conf, lun->ctld_name); in conf_new_from_kernel() 622 cl->l_backend = lun->backend_type; in conf_new_from_kernel() [all …]
|
H A D | conf.c | 49 static struct lun *lun = NULL; variable 64 lun = NULL; in conf_finish() 380 lun = lun_new(conf, name); in lun_start() 381 return (lun != NULL); in lun_start() 387 lun = NULL; in lun_finish() 393 return (option_new(lun->l_options, name, value)); in lun_add_option() 399 if (lun->l_backend != NULL) { in lun_set_backend() 401 lun->l_name); in lun_set_backend() 405 lun->l_backend = checked_strdup(value); in lun_set_backend() 412 if (lun->l_blocksize != 0) { in lun_set_blocksize() [all …]
|
H A D | ctld.h | 159 struct lun { struct 160 TAILQ_ENTRY(lun) l_next; 179 struct lun *t_luns[MAX_LUNS]; argument 198 TAILQ_HEAD(, lun) conf_luns; 326 struct lun *lun_new(struct conf *conf, const char *name); 327 void lun_delete(struct lun *lun); 328 struct lun *lun_find(const struct conf *conf, const char *name); 329 void lun_set_scsiname(struct lun *lun, const char *value); 335 int kernel_lun_add(struct lun *lun); 336 int kernel_lun_modify(struct lun *lun); [all …]
|
H A D | ctld.c | 120 struct lun *lun, *ltmp; in conf_delete() local 128 TAILQ_FOREACH_SAFE(lun, &conf->conf_luns, l_next, ltmp) in conf_delete() 129 lun_delete(lun); in conf_delete() 1237 struct lun * 1240 struct lun *lun; in lun_new() local 1242 lun = lun_find(conf, name); in lun_new() 1243 if (lun != NULL) { in lun_new() 1248 lun = calloc(1, sizeof(*lun)); in lun_new() 1249 if (lun == NULL) in lun_new() 1251 lun->l_conf = conf; in lun_new() [all …]
|
/freebsd/sys/dev/mps/ |
H A D | mps_sas.h | 110 #define MPS_SET_LUN(lun, ccblun) \ argument 111 mpssas_set_lun(lun, ccblun) 114 mpssas_set_lun(uint8_t *lun, u_int ccblun) in mpssas_set_lun() argument 118 newlun = (uint64_t *)lun; in mpssas_set_lun() 122 lun[1] = ccblun; in mpssas_set_lun() 125 scsi_ulto2b(ccblun, lun); in mpssas_set_lun() 126 lun[0] |= 0x40; in mpssas_set_lun() 129 scsi_ulto3b(ccblun, &lun[1]); in mpssas_set_lun() 131 lun[0] = 0xc0; in mpssas_set_lun() 133 lun[0] |= 0x10; in mpssas_set_lun() [all …]
|
/freebsd/sys/dev/mpr/ |
H A D | mpr_sas.h | 116 #define MPR_SET_LUN(lun, ccblun) \ argument 117 mprsas_set_lun(lun, ccblun) 120 mprsas_set_lun(uint8_t *lun, u_int ccblun) in mprsas_set_lun() argument 124 newlun = (uint64_t *)lun; in mprsas_set_lun() 128 lun[1] = ccblun; in mprsas_set_lun() 131 scsi_ulto2b(ccblun, lun); in mprsas_set_lun() 132 lun[0] |= 0x40; in mprsas_set_lun() 135 scsi_ulto3b(ccblun, &lun[1]); in mprsas_set_lun() 137 lun[0] = 0xc0; in mprsas_set_lun() 139 lun[0] |= 0x10; in mprsas_set_lun() [all …]
|
/freebsd/sys/dev/isci/ |
H A D | isci_remote_device.c | 260 lun_id_t lun) in isci_remote_device_freeze_lun_queue() argument 262 if (!(remote_device->frozen_lun_mask & (1 << lun))) { in isci_remote_device_freeze_lun_queue() 267 remote_device->index, lun); in isci_remote_device_freeze_lun_queue() 270 remote_device->frozen_lun_mask |= (1 << lun); in isci_remote_device_freeze_lun_queue() 276 lun_id_t lun) in isci_remote_device_release_lun_queue() argument 278 if (remote_device->frozen_lun_mask & (1 << lun)) { in isci_remote_device_release_lun_queue() 281 remote_device->frozen_lun_mask &= ~(1 << lun); in isci_remote_device_release_lun_queue() 284 remote_device->index, lun); in isci_remote_device_release_lun_queue() 295 lun_id_t lun; in isci_remote_device_release_device_queue() local 297 for (lun = 0; lun < ISCI_MAX_LUN; lun++) in isci_remote_device_release_device_queue() [all …]
|
/freebsd/tools/tools/vhba/mptest/ |
H A D | vhba_mptest.c | 411 int lun; in vhba_timer() local 415 lun = (vhba_stop_lun & 1)? 0 : 1; in vhba_timer() 416 if (lun == 0 || lun == 1) { in vhba_timer() 417 if (vhbas->luns[lun]) { in vhba_timer() 420 if (xpt_create_path(&tp, xpt_periph, cam_sim_path(vhba->sim), 0, lun) != CAM_REQ_CMP) { in vhba_timer() 423 vhbas->luns[lun] = 0; in vhba_timer() 427 vhbas->luns[lun] = 0; in vhba_timer() 431 vhba_stop_lun &= ~(1 << lun); in vhba_timer() 433 lun = (vhba_start_lun & 1)? 0 : 1; in vhba_timer() 434 if (lun == 0 || lun == 1) { in vhba_timer() [all …]
|
/freebsd/usr.sbin/ctladm/ |
H A D | ctladm.c | 217 static int cctl_delay(int fd, int lun, int argc, char **argv, 220 static int cctl_sync_cache(int fd, int lun, int iid, int retries, 222 static int cctl_start_stop(int fd, int lun, int iid, int retries, 224 static int cctl_mode_sense(int fd, int lun, int iid, int retries, 226 static int cctl_read_capacity(int fd, int lun, int iid, 229 static int cctl_read_write(int fd, int lun, int iid, int retries, 232 static int cctl_get_luns(int fd, int lun, int iid, int retries, 235 static int cctl_report_luns(int fd, int lun, int iid, int retries); 236 static int cctl_tur(int fd, int lun, int iid, int retries); 237 static int cctl_get_inquiry(int fd, int lun, int iid, int retries, [all …]
|
/freebsd/sys/dev/pms/RefTisa/tisa/sassata/common/ |
H A D | tdmisc.c | 692 tiLUN_t *lun, in tiINITaskManagement() argument 941 if (lun == agNULL) in tiINITaskManagement() 943 osti_memset(agSSPTaskMgntRequest->lun, 0, 8); in tiINITaskManagement() 947 osti_memcpy(agSSPTaskMgntRequest->lun, lun->lun, 8); in tiINITaskManagement() 1085 if ( (lun->lun[0] | lun->lun[1] | lun->lun[2] | lun->lun[3] | in tiINITaskManagement() 1086 lun->lun[4] | lun->lun[5] | lun->lun[6] | lun->lun[7] ) != 0 ) in tiINITaskManagement() 1154 (smLUN_t*)lun, in tiINITaskManagement() 1199 if ( (lun->lun[0] | lun->lun[1] | lun->lun[2] | lun->lun[3] | in tiINITaskManagement() 1200 lun->lun[4] | lun->lun[5] | lun->lun[6] | lun->lun[7] ) != 0 ) in tiINITaskManagement() 1297 lun, in tiINITaskManagement()
|
/freebsd/tests/sys/cam/ctl/ |
H A D | ctl.subr | 50 dev=`camcontrol devlist | awk -v lun=$HEXLUN ' 51 /FREEBSD CTL.*,pass/ && $9==lun { 54 /FREEBSD CTL.*\(pass/ && $9==lun { 61 cat lun-create.txt 87 atf_check -o save:lun-create.txt ctladm create -b ramdisk -s 1048576 $EXTRA_ARGS 88 atf_check egrep -q "LUN created successfully" lun-create.txt 89 LUN=`awk '/LUN ID:/ {print $NF}' lun-create.txt` 97 if [ -e "lun-create.txt" ]; then 98 lun_id=`awk '/LUN ID:/ {print $NF}' lun-create.txt`
|
/freebsd/tools/regression/iscsi/ |
H A D | ctl.conf | 13 lun 0 { 17 lun 1 { 26 lun 0 { 30 lun 1 {
|
/freebsd/sys/dev/virtio/scsi/ |
H A D | virtio_scsi.h | 38 uint8_t lun[8]; /* Logical Unit Number */ member 48 uint8_t lun[8]; /* Logical Unit Number */ member 72 uint8_t lun[8]; member 83 uint8_t lun[8]; member 94 uint8_t lun[8]; member
|
/freebsd/sys/dev/ocs_fc/ |
H A D | ocs_scsi.h | 295 extern int32_t ocs_scsi_recv_cmd(ocs_io_t *io, uint64_t lun, uint8_t *cdb, uint32_t cdb_len, uint32… 296 extern int32_t ocs_scsi_recv_cmd_first_burst(ocs_io_t *io, uint64_t lun, uint8_t *cdb, uint32_t cdb… 298 extern int32_t ocs_scsi_recv_tmf(ocs_io_t *tmfio, uint64_t lun, ocs_scsi_tmf_cmd_e cmd, ocs_io_t *a… 348 extern int32_t ocs_scsi_send_rd_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_… 351 extern int32_t ocs_scsi_send_wr_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uint32_… 354 extern int32_t ocs_scsi_send_wr_io_first_burst(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *… 358 …tern int32_t ocs_scsi_send_tmf(ocs_node_t *node, ocs_io_t *io, ocs_io_t *io_to_abort, uint64_t lun, 360 extern int32_t ocs_scsi_send_nodata_io(ocs_node_t *node, ocs_io_t *io, uint64_t lun, void *cdb, uin… 394 uint32_t ocs_get_crn(ocs_node_t *node, uint8_t *crn, uint64_t lun); 396 void ocs_reset_crn(ocs_node_t *node, uint64_t lun);
|
/freebsd/sys/dev/smartpqi/ |
H A D | smartpqi_cam.c | 112 uint64_t lun; in os_add_device() local 116 lun = (device->is_multi_lun) ? CAM_LUN_WILDCARD : device->lun; in os_add_device() 125 device->target, lun) != CAM_REQ_CMP) { in os_add_device() 143 uint64_t lun; in os_remove_device() local 147 lun = (device->is_multi_lun) ? CAM_LUN_WILDCARD : device->lun; in os_remove_device() 151 device->target, lun) != CAM_REQ_CMP) { in os_remove_device() 263 int lun = csio->ccb_h.target_lun; in smartpqi_fix_ld_inquiry() local 264 int index = pqisrc_find_btl_list_index(softs,softs->bus_id,target,lun); in smartpqi_fix_ld_inquiry() 694 int lun) in smartpqi_lun_rescan() argument 709 cam_sim_path(softs->os_specific.sim), target, lun); in smartpqi_lun_rescan() [all …]
|
/freebsd/sys/dev/pms/freebsd/driver/common/ |
H A D | lxencrypt.c | 326 unsigned int chan, device, lun = 0; in show_target_dek_map() local 338 for(lun = 0; lun < AGTIAPI_MAX_LUN; lun++) { in show_target_dek_map() 340 lh = MAP_TABLE_ENTRY(pCard, chan, device, lun); in show_target_dek_map() 344 …E_SIZE, " %u:%u:%u: %x %8x %8x %16lx %16lx %08x:%08x %1x\n", chan, device, lun, p->dekTable, p->de… in show_target_dek_map() 476 bit32 chan, device, lun; in agtiapi_MapDek() local 484 lun = dek_map->lun; in agtiapi_MapDek() 501 if (lun >= AGTIAPI_MAX_LUN) { in agtiapi_MapDek() 502 printf("%s: Bad lun %d.\n", __FUNCTION__, lun); in agtiapi_MapDek() 527 lh = MAP_TABLE_ENTRY(pCard, chan, device, lun); in agtiapi_MapDek() 695 int chan, device, lun; in agtiapi_CleanupEncryption() local [all …]
|
/freebsd/sys/dev/aic7xxx/ |
H A D | aic79xx.h | 94 ((scb)->hscb->lun) 114 #define BUILD_TCL(scsiid, lun) \ argument 115 ((lun) | (((scsiid) & TID) << 4)) 116 #define BUILD_TCL_RAW(target, channel, lun) \ argument 117 ((lun) | ((target) << 8)) 127 #define AHD_BUILD_COL_IDX(target, lun) \ argument 128 (((lun) << 4) | target) 136 (scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \ 142 dst->hscb->lun = src->hscb->lun; \ 509 /*20*/ uint8_t lun; global() member 1357 u_int lun; global() member [all...] |