Home
last modified time | relevance | path

Searched refs:lun (Results 1 – 25 of 170) sorted by relevance

1234567

/freebsd-14-stable/sys/cam/ctl/
HDctl.c465 static void ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
470 static int ctl_enable_lun(struct ctl_lun *lun);
471 static int ctl_disable_lun(struct ctl_lun *lun);
472 static int ctl_free_lun(struct ctl_lun *lun);
475 static int ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun,
481 static void ctl_pro_preempt_other(struct ctl_lun *lun,
502 static ctl_action ctl_check_for_blockage(struct ctl_lun *lun,
505 static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io,
507 static void ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io,
509 static void ctl_try_unblock_others(struct ctl_lun *lun, union ctl_io *io,
[all …]
HDctl_error.c72 struct ctl_lun *lun; in ctl_set_sense_data_va() local
74 lun = (struct ctl_lun *)lunptr; in ctl_set_sense_data_va()
92 if ((lun != NULL) && (lun->MODE_CTRL.rlec & SCP_DSENSE)) in ctl_set_sense_data_va()
102 if ((lun != NULL) && (lun->MODE_CTRLE.max_sense != 0)) in ctl_set_sense_data_va()
103 *sense_len = lun->MODE_CTRLE.max_sense; in ctl_set_sense_data_va()
130 struct ctl_lun *lun; in ctl_set_sense() local
138 lun = CTL_LUN(ctsio); in ctl_set_sense()
143 lun, in ctl_set_sense()
391 ctl_ua_to_ascq(struct ctl_lun *lun, ctl_ua_type ua_to_build, int *asc, in ctl_ua_to_ascq() argument
478 *info = lun->ua_tpt_info; in ctl_ua_to_ascq()
[all …]
HDctl_tpc.c89 uint64_t lun; member
99 uint64_t lun; member
150 struct ctl_lun *lun; member
160 struct ctl_lun *lun; in tpc_timeout() local
165 STAILQ_FOREACH(lun, &softc->lun_list, links) { in tpc_timeout()
166 mtx_lock(&lun->lun_lock); in tpc_timeout()
167 TAILQ_FOREACH_SAFE(list, &lun->tpc_lists, links, tlist) { in tpc_timeout()
171 TAILQ_REMOVE(&lun->tpc_lists, list, links); in tpc_timeout()
174 mtx_unlock(&lun->lun_lock); in tpc_timeout()
221 ctl_tpc_lun_init(struct ctl_lun *lun) in ctl_tpc_lun_init() argument
[all …]
HDctl_tpc_local.c271 struct ctl_lun *lun; in tpcl_resolve() local
285 STAILQ_FOREACH(lun, &softc->lun_list, links) { in tpcl_resolve()
287 ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in tpcl_resolve()
289 if (lun->lun_devid == NULL) in tpcl_resolve()
291 if (scsi_devid_match(lun->lun_devid->data, in tpcl_resolve()
292 lun->lun_devid->len, &cscdid->codeset, in tpcl_resolve()
294 lunid = lun->lun; in tpcl_resolve()
296 *ss = lun->be_lun->blocksize; in tpcl_resolve()
298 *ps = lun->be_lun->blocksize << in tpcl_resolve()
299 lun->be_lun->pblockexp; in tpcl_resolve()
[all …]
HDctl_frontend.c315 struct ctl_lun *lun; in ctl_port_online() local
328 STAILQ_FOREACH(lun, &softc->lun_list, links) in ctl_port_online()
329 port->lun_enable(port->targ_lun_arg, lun->lun); in ctl_port_online()
343 STAILQ_FOREACH(lun, &softc->lun_list, links) { in ctl_port_online()
344 if (ctl_lun_map_to_port(port, lun->lun) == UINT32_MAX) in ctl_port_online()
346 mtx_lock(&lun->lun_lock); in ctl_port_online()
347 ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); in ctl_port_online()
348 mtx_unlock(&lun->lun_lock); in ctl_port_online()
358 struct ctl_lun *lun; in ctl_port_offline() local
372 STAILQ_FOREACH(lun, &softc->lun_list, links) in ctl_port_offline()
[all …]
HDctl.h190 void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua);
191 void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except,
193 void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua);
194 void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua);
195 void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua);
202 void ctl_isc_announce_lun(struct ctl_lun *lun);
205 void ctl_isc_announce_mode(struct ctl_lun *lun, uint32_t initidx,
HDctl_error.h50 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-14-stable/usr.sbin/ctld/
HDctld.h168 struct lun { struct
169 TAILQ_ENTRY(lun) l_next;
188 struct lun *t_luns[MAX_LUNS]; argument
207 TAILQ_HEAD(, lun) conf_luns;
342 struct lun *lun_new(struct conf *conf, const char *name);
343 void lun_delete(struct lun *lun);
344 struct lun *lun_find(const struct conf *conf, const char *name);
345 void lun_set_backend(struct lun *lun, const char *value);
346 void lun_set_device_type(struct lun *lun, uint8_t value);
347 void lun_set_blocksize(struct lun *lun, size_t value);
[all …]
HDkernel.c425 struct lun *cl; in conf_new_from_kernel()
429 struct cctl_lun *lun; in conf_new_from_kernel() local
636 STAILQ_FOREACH(lun, &devlist.lun_list, links) { in conf_new_from_kernel()
639 if (lun->ctld_name == NULL) { in conf_new_from_kernel()
641 "ignoring", (uintmax_t)lun->lun_id); in conf_new_from_kernel()
645 cl = lun_find(conf, lun->ctld_name); in conf_new_from_kernel()
649 (uintmax_t)lun->lun_id, lun->ctld_name, in conf_new_from_kernel()
655 (uintmax_t)lun->lun_id, lun->ctld_name); in conf_new_from_kernel()
657 cl = lun_new(conf, lun->ctld_name); in conf_new_from_kernel()
662 lun_set_backend(cl, lun->backend_type); in conf_new_from_kernel()
[all …]
HDparse.y52 static struct lun *lun = NULL; variable
104 lun
532 lun: LUN lun_name
535 lun = NULL;
541 lun = lun_new(conf, $1);
543 if (lun == NULL)
855 lun = NULL;
879 lun = lun_new(conf, name);
880 if (lun == NULL)
883 lun_set_scsiname(lun, name);
[all …]
HDctld.c116 struct lun *lun, *ltmp; in conf_delete() local
124 TAILQ_FOREACH_SAFE(lun, &conf->conf_luns, l_next, ltmp) in conf_delete()
125 lun_delete(lun); in conf_delete()
1460 struct lun *
1463 struct lun *lun; in lun_new() local
1465 lun = lun_find(conf, name); in lun_new()
1466 if (lun != NULL) { in lun_new()
1471 lun = calloc(1, sizeof(*lun)); in lun_new()
1472 if (lun == NULL) in lun_new()
1474 lun->l_conf = conf; in lun_new()
[all …]
HDuclparse.c189 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()
234 lun = lun_find(conf, ucl_object_tostring(name)); in uclparse_target_lun()
235 if (lun == NULL) in uclparse_target_lun()
238 target->t_luns[tmp] = lun; in uclparse_target_lun()
888 struct lun *lun; in uclparse_lun() local
893 lun = lun_new(conf, name); in uclparse_lun()
[all …]
/freebsd-14-stable/tools/tools/usbtest/
HDusb_msc_test.c121 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-14-stable/sys/dev/mps/
HDmps_sas.h110 #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-14-stable/sys/dev/mpr/
HDmpr_sas.h116 #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-14-stable/sys/dev/isci/
HDisci_remote_device.c260 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-14-stable/tools/tools/vhba/mptest/
HDvhba_mptest.c411 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-14-stable/usr.sbin/ctladm/
HDctladm.c213 static int cctl_delay(int fd, int lun, int argc, char **argv,
216 static int cctl_sync_cache(int fd, int lun, int iid, int retries,
218 static int cctl_start_stop(int fd, int lun, int iid, int retries,
220 static int cctl_mode_sense(int fd, int lun, int iid, int retries,
222 static int cctl_read_capacity(int fd, int lun, int iid,
225 static int cctl_read_write(int fd, int lun, int iid, int retries,
228 static int cctl_get_luns(int fd, int lun, int iid, int retries,
231 static int cctl_report_luns(int fd, int lun, int iid, int retries);
232 static int cctl_tur(int fd, int lun, int iid, int retries);
233 static int cctl_get_inquiry(int fd, int lun, int iid, int retries,
[all …]
/freebsd-14-stable/sys/dev/pms/RefTisa/tisa/sassata/common/
HDtdmisc.c692 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-14-stable/tools/regression/iscsi/
HDctl.conf13 lun 0 {
17 lun 1 {
26 lun 0 {
30 lun 1 {
/freebsd-14-stable/sys/dev/virtio/scsi/
HDvirtio_scsi.h38 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-14-stable/tests/sys/cam/ctl/
HDctl.subr50 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-14-stable/sys/dev/ocs_fc/
HDocs_scsi.h295 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-14-stable/sys/dev/smartpqi/
HDsmartpqi_cam.c112 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-14-stable/sys/dev/pms/freebsd/driver/common/
HDlxencrypt.c326 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 …]

1234567