| /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_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_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, in ctl_ua_to_ascq() argument 477 *info = lun->ua_tpt_info; in ctl_ua_to_ascq() [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,
|
| /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 | conf.cc | 51 static struct lun *lun = NULL; variable 66 lun = NULL; in conf_finish() 274 lun = conf->add_lun(name); in lun_start() 275 return (lun != NULL); in lun_start() 281 lun = NULL; in lun_finish() 287 return (lun->add_option(name, value)); in lun_add_option() 293 return (lun->set_backend(value)); in lun_set_backend() 299 return (lun->set_blocksize(value)); in lun_set_blocksize() 305 return (lun->set_device_type(value)); in lun_set_device_type() 311 return (lun->set_device_id(value)); in lun_set_device_id() [all …]
|
| H A D | kernel.cc | 568 for (const auto &lun : devlist.lun_list) { in conf_new_from_kernel() local 569 if (lun.ctld_name.empty()) { in conf_new_from_kernel() 571 "ignoring", (uintmax_t)lun.lun_id); in conf_new_from_kernel() 575 const char *l_name = lun.ctld_name.c_str(); in conf_new_from_kernel() 576 struct lun *cl = conf->find_lun(l_name); in conf_new_from_kernel() 580 (uintmax_t)lun.lun_id, l_name, in conf_new_from_kernel() 586 (uintmax_t)lun.lun_id, l_name); in conf_new_from_kernel() 593 cl->set_backend(lun.backend_type.c_str()); in conf_new_from_kernel() 594 cl->set_device_type(lun.device_type); in conf_new_from_kernel() 595 cl->set_blocksize(lun.blocksize); in conf_new_from_kernel() [all …]
|
| H A D | ctld.cc | 1324 struct lun *t_lun; in add_lun() 1415 struct lun * 1428 struct lun *new_lun = t_conf->add_lun(lun_name); in start_lun() 1452 target::remove_lun(struct lun *lun) in remove_lun() argument 1455 std::replace(t_luns.begin(), t_luns.end(), lun, in remove_lun() 1456 static_cast<struct lun *>(nullptr)); in remove_lun() 1473 [](struct lun *lun) { return (lun != nullptr); }); in verify() argument 1481 lun::lun(struct conf *conf, std::string_view name) in lun() function in lun 1486 struct lun * 1490 std::make_unique<lun>(this, name)); in add_lun() [all …]
|
| H A D | ctld.hh | 337 struct lun { struct 338 lun(struct conf *conf, std::string_view name); 358 bool changed(const struct lun &old) const; argument 396 const struct lun *lun(int idx) const { return t_luns[idx]; } in lun() argument 414 virtual struct lun *start_lun(u_int) { return nullptr; } in start_lun() 415 virtual struct lun *start_namespace(u_int) { return nullptr; } in start_namespace() 418 void remove_lun(struct lun *lun); 425 struct lun *start_lun(u_int id, const char *lun_label, 430 std::array<struct lun *, MAX_LUNS> t_luns = {}; 500 struct lun *add_lun(const char *name); [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/usr.sbin/bhyve/ |
| H A D | pci_virtio_scsi.c | 205 const uint8_t lun[8]; member 220 const uint8_t lun[8]; member 247 uint8_t lun[8]; member 252 const uint8_t lun[8]; member 342 "%zu", pci_vtscsi_get_lun(req->vsr_cmd_rd->lun), in pci_vtscsi_proc() 442 pci_vtscsi_check_lun(const uint8_t *lun) in pci_vtscsi_check_lun() argument 444 if (lun[0] == 0xC1) in pci_vtscsi_check_lun() 447 if (lun[0] != 0x01) in pci_vtscsi_check_lun() 450 if (lun[1] != 0x00) in pci_vtscsi_check_lun() 453 if (lun[2] != 0x00 && (lun[2] & 0xc0) != 0x40) in pci_vtscsi_check_lun() [all …]
|
| /freebsd/tests/sys/cam/ctl/ |
| H A D | ctl.subr | 41 dev=`camcontrol devlist | awk -v lun=$HEXLUN ' 42 /FREEBSD CTL.*,pass/ && $9==lun { 45 /FREEBSD CTL.*\(pass/ && $9==lun { 52 cat lun-create.txt 78 atf_check -o save:lun-create.txt ctladm create -b block $EXTRA_ARGS 79 atf_check egrep -q "LUN created successfully" lun-create.txt 80 LUN=`awk '/LUN ID:/ {print $NF}' lun-create.txt` 91 atf_check -o save:lun-create.txt ctladm create -b ramdisk -s 1048576 $EXTRA_ARGS 92 atf_check egrep -q "LUN created successfully" lun-create.txt 93 LUN=`awk '/LUN ID:/ {print $NF}' lun-create.txt` [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/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 | 111 uint64_t lun; in os_add_device() local 115 lun = (device->is_multi_lun) ? CAM_LUN_WILDCARD : device->lun; in os_add_device() 124 device->target, lun) != CAM_REQ_CMP) { in os_add_device() 142 uint64_t lun; in os_remove_device() local 146 lun = (device->is_multi_lun) ? CAM_LUN_WILDCARD : device->lun; in os_remove_device() 150 device->target, lun) != CAM_REQ_CMP) { in os_remove_device() 258 int lun = csio->ccb_h.target_lun; in smartpqi_fix_ld_inquiry() local 259 int index = pqisrc_find_btl_list_index(softs,softs->bus_id,target,lun); in smartpqi_fix_ld_inquiry() 689 int lun) in smartpqi_lun_rescan() argument 704 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/ufshci/ |
| H A D | ufshci_ctrlr_cmd.c | 12 ufshci_cb_fn_t cb_fn, void *cb_arg, uint8_t function, uint8_t lun, in ufshci_ctrlr_cmd_send_task_mgmt_request() argument 27 upiu->header.lun = lun; in ufshci_ctrlr_cmd_send_task_mgmt_request() 29 upiu->input_param1 = lun; in ufshci_ctrlr_cmd_send_task_mgmt_request()
|