/freebsd/sys/cam/ctl/ |
H A D | ctl.c | 831 msg->lun.flags = lun->flags; in ctl_isc_announce_lun() 2469 entry->lun_num = lun->lun; in ctl_ioctl_fill_ooa() 3074 (uintmax_t)lun->lun); in ctl_ioctl() 3764 if ((lun[0] & 0x3f) == 0 && lun[2] == 0 && lun[3] == 0 && in ctl_decode_lun() 3765 lun[4] == 0 && lun[5] == 0 && lun[6] == 0 && lun[7] == 0) in ctl_decode_lun() 3769 if (lun[2] == 0 && lun[3] == 0 && lun[4] == 0 && lun[5] == 0 && in ctl_decode_lun() 3770 lun[6] == 0 && lun[7] == 0) in ctl_decode_lun() 3785 if (lun[1] == 0 && lun[6] == 0 && lun[7] == 0) in ctl_decode_lun() 4601 lun->lun = lun_number; in ctl_add_lun() 9659 if (lun && lun->lun_devid) in ctl_inquiry_evpd_devid() [all …]
|
H A D | ctl_tpc.c | 259 if (token->lun != lun->lun || token->active) in ctl_tpc_lun_shutdown() 768 return (list->lun->lun); in tpc_resolve() 1290 tior->lun = list->token->lun; in tpc_process_wut() 1309 tiow->lun = list->lun->lun; in tpc_process_wut() 1393 tiow->lun = list->lun->lun; in tpc_process_zero_wut() 1418 struct ctl_lun *lun = list->lun; in tpc_process() local 1783 list->lun = lun; in ctl_extended_copy_lid1() 1937 list->lun = lun; in ctl_extended_copy_lid4() 2123 list->lun = lun; in ctl_populate_token() 2142 token->lun = lun->lun; in ctl_populate_token() [all …]
|
H A D | ctl_error.c | 71 struct ctl_lun *lun; in ctl_set_sense_data_va() local 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() 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() 477 *info = lun->ua_tpt_info; in ctl_ua_to_ascq() 486 *asc = lun->ie_asc; in ctl_ua_to_ascq() 487 *ascq = lun->ie_ascq; in ctl_ua_to_ascq() 546 mtx_lock(&lun->lun_lock); in ctl_build_ua() [all …]
|
H A D | ctl_tpc_local.c | 270 struct ctl_lun *lun; in tpcl_resolve() local 286 ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in tpcl_resolve() 288 if (lun->lun_devid == NULL) 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() 300 *pso = lun->be_lun->blocksize * in tpcl_resolve() 301 lun->be_lun->pblockoff; in tpcl_resolve() 318 tpcl_queue(union ctl_io *io, uint64_t lun) in tpcl_queue() argument [all …]
|
H A D | ctl_frontend.c | 314 struct ctl_lun *lun; in ctl_port_online() local 328 port->lun_enable(port->targ_lun_arg, lun->lun); in ctl_port_online() 343 if (ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in ctl_port_online() 345 mtx_lock(&lun->lun_lock); in ctl_port_online() 346 ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); in ctl_port_online() 347 mtx_unlock(&lun->lun_lock); in ctl_port_online() 357 struct ctl_lun *lun; in ctl_port_offline() local 372 port->lun_disable(port->targ_lun_arg, lun->lun); in ctl_port_offline() 378 if (ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in ctl_port_offline() 380 mtx_lock(&lun->lun_lock); 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/usr.sbin/ctld/ |
H A D | ctld.h | 167 struct lun { struct 334 void lun_delete(struct lun *lun); 336 void lun_set_backend(struct lun *lun, const char *value); 338 void lun_set_blocksize(struct lun *lun, size_t value); 340 void lun_set_path(struct lun *lun, const char *value); 342 void lun_set_serial(struct lun *lun, const char *value); 343 void lun_set_size(struct lun *lun, size_t value); 344 void lun_set_ctl_lun(struct lun *lun, uint32_t value); 353 int kernel_lun_add(struct lun *lun); 354 int kernel_lun_modify(struct lun *lun); [all …]
|
H A D | kernel.c | 424 struct lun *cl; in conf_new_from_kernel() 632 (uintmax_t)lun->lun_id, lun->ctld_name, in conf_new_from_kernel() 638 (uintmax_t)lun->lun_id, lun->ctld_name); in conf_new_from_kernel() 672 kernel_lun_add(struct lun *lun) in kernel_lun_add() argument 713 o = option_new(&lun->l_options, "file", lun->l_path); in kernel_lun_add() 722 o = option_new(&lun->l_options, "ctld_name", lun->l_name); in kernel_lun_add() 777 kernel_lun_modify(struct lun *lun) in kernel_lun_modify() argument 796 o = option_new(&lun->l_options, "file", lun->l_path); in kernel_lun_modify() 805 o = option_new(&lun->l_options, "ctld_name", lun->l_name); in kernel_lun_modify() 859 kernel_lun_remove(struct lun *lun) in kernel_lun_remove() argument [all …]
|
H A D | parse.y | 52 static struct lun *lun = NULL; variable 104 lun 532 lun: LUN lun_name 535 lun = NULL; 543 if (lun == NULL) 890 lun = NULL; 915 if (lun == NULL) 942 if (lun == NULL) 981 lun->l_name); 1003 lun->l_name); [all …]
|
H A D | ctld.c | 116 struct lun *lun, *ltmp; in conf_delete() local 1464 struct lun *lun; in lun_new() local 1472 lun = calloc(1, sizeof(*lun)); in lun_new() 1485 lun_delete(struct lun *lun) in lun_delete() argument 1513 struct lun *lun; in lun_find() local 1531 lun_set_blocksize(struct lun *lun, size_t value) in lun_set_blocksize() argument 1573 lun_set_size(struct lun *lun, size_t value) in lun_set_size() argument 1706 struct lun *lun; 1747 conf_verify_lun(struct lun *lun) in conf_verify_lun() argument 1782 if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { in conf_verify_lun() [all …]
|
H A D | uclparse.c | 189 struct lun *lun; in uclparse_target_lun() local 203 lun = lun_new(conf, name); in uclparse_target_lun() 204 if (lun == NULL) in uclparse_target_lun() 207 lun_set_scsiname(lun, name); in uclparse_target_lun() 208 target->t_luns[tmp] = lun; in uclparse_target_lun() 235 if (lun == NULL) in uclparse_target_lun() 238 target->t_luns[tmp] = lun; in uclparse_target_lun() 919 struct lun *lun; in uclparse_lun() local 924 lun = lun_new(conf, name); in uclparse_lun() 925 if (lun == NULL) in uclparse_lun() [all …]
|
/freebsd/tools/tools/usbtest/ |
H A D | usb_msc_test.c | 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() 239 do_msc_reset(lun); in do_msc_cmd() 508 uint8_t lun; in usb_msc_test() local 515 lun = 0; in usb_msc_test() 518 lun = 1; in usb_msc_test() 521 lun = 2; in usb_msc_test() 524 lun = 3; in usb_msc_test() 527 lun = 0; in usb_msc_test() [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) 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() 135 lun[0] |= 0x02; 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) 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() 141 lun[0] |= 0x02; 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 416 if (lun == 0 || lun == 1) { in vhba_timer() 417 if (vhbas->luns[lun]) { 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() 434 if (lun == 0 || lun == 1) { in vhba_timer() 435 if (vhbas->luns[lun] == 0) { in vhba_timer() 446 vhbas->luns[lun] = 1; in vhba_timer() 449 vhbas->luns[lun] = 1; in vhba_timer() [all …]
|
/freebsd/usr.sbin/ctladm/ |
H A D | ctladm.c | 299 if (lun >= 0) { in cctl_dump_ooa() 300 ooa.lun_num = lun; in cctl_dump_ooa() 842 err_desc.lun_id = lun; in cctl_error_inject() 3366 struct cctl_lun *lun; in cctl_devlist() local 3457 lun->backend_type, (uintmax_t)lun->size_blocks, in cctl_devlist() 3458 lun->blocksize, lun->serial_number, lun->device_id); in cctl_devlist() 3674 lun++; in cctl_portlist() 3768 if (lun || verbose) { in cctl_portlist() 3800 lm.lun = UINT32_MAX; in cctl_lunmap() 4294 int lun; in main() local [all …]
|
/freebsd/tools/regression/iscsi/ |
H A D | ctl.conf | 13 lun 0 { 17 lun 1 { 26 lun 0 { 30 lun 1 {
|
/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/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);
|
H A D | ocs_cam.h | 53 lun_id_t lun; member 85 uint64_t lun; /* target_lun */ member 102 uint64_t lun; /* target_lun */ member
|
/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() 143 uint64_t lun; in os_remove_device() local 147 lun = (device->is_multi_lun) ? CAM_LUN_WILDCARD : device->lun; in os_remove_device() 263 int lun = csio->ccb_h.target_lun; in smartpqi_fix_ld_inquiry() local 694 int lun) in smartpqi_lun_rescan() argument 813 int target, lun, index; in pqisrc_io_start() local 819 lun = ccb->ccb_h.target_lun; in pqisrc_io_start() 1021 int bus, target, lun; in pqisrc_target_reset() local 1028 lun = ccb->ccb_h.target_lun; in pqisrc_target_reset() [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() 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 701 for (lun = 0; lun < AGTIAPI_MAX_LUN; lun++) { in agtiapi_CleanupEncryption() [all …]
|
/freebsd/sys/cam/ |
H A D | cam.h | 52 #define CAM_EXTLUN_BYTE_SWIZZLE(lun) ( \ argument 53 ((((uint64_t)lun) & 0xffff000000000000L) >> 48) | \ 54 ((((uint64_t)lun) & 0x0000ffff00000000L) >> 16) | \ 55 ((((uint64_t)lun) & 0x00000000ffff0000L) << 16) | \ 56 ((((uint64_t)lun) & 0x000000000000ffffL) << 48))
|