Home
last modified time | relevance | path

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

1234567

/freebsd/sys/cam/ctl/
H A Dctl.c399 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 Dctl_error.c71 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 Dctl_tpc.c88 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 Dctl_tpc_local.c270 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 Dctl_frontend.c312 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 Dctl.h191 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 Dctl_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/usr.sbin/ctld/
H A Dctld.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 …]
H A Dkernel.c424 struct lun *cl; in conf_new_from_kernel()
428 struct cctl_lun *lun; in conf_new_from_kernel() local
635 STAILQ_FOREACH(lun, &devlist.lun_list, links) { in conf_new_from_kernel()
638 if (lun->ctld_name == NULL) { in conf_new_from_kernel()
640 "ignoring", (uintmax_t)lun->lun_id); in conf_new_from_kernel()
644 cl = lun_find(conf, lun->ctld_name); in conf_new_from_kernel()
648 (uintmax_t)lun->lun_id, lun->ctld_name, in conf_new_from_kernel()
654 (uintmax_t)lun->lun_id, lun->ctld_name); in conf_new_from_kernel()
656 cl = lun_new(conf, lun->ctld_name); in conf_new_from_kernel()
661 lun_set_backend(cl, lun->backend_type); in conf_new_from_kernel()
[all …]
H A Dparse.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 …]
H A Dctld.c115 struct lun *lun, *ltmp; in conf_delete() local
123 TAILQ_FOREACH_SAFE(lun, &conf->conf_luns, l_next, ltmp) in conf_delete()
124 lun_delete(lun); in conf_delete()
1459 struct lun *
1462 struct lun *lun; in lun_new() local
1464 lun = lun_find(conf, name); in lun_new()
1465 if (lun != NULL) { in lun_new()
1470 lun = calloc(1, sizeof(*lun)); in lun_new()
1471 if (lun == NULL) in lun_new()
1473 lun->l_conf = conf; in lun_new()
[all …]
H A Duclparse.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/tools/tools/usbtest/
H A Dusb_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/sys/dev/mps/
H A Dmps_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/sys/dev/mpr/
H A Dmpr_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/sys/dev/isci/
H A Disci_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/tools/tools/vhba/mptest/
H A Dvhba_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/usr.sbin/ctladm/
H A Dctladm.c217 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, in
287 int num_entries, len, lun = -1, retval = 0; cctl_dump_ooa() local
728 cctl_delay(int fd,int lun,int argc,char ** argv,char * combinedopt) cctl_delay() argument
854 cctl_error_inject(int fd,uint32_t lun,int argc,char ** argv,char * combinedopt) cctl_error_inject() argument
1148 cctl_sync_cache(int fd,int lun,int iid,int retries,int argc,char ** argv,char * combinedopt) cctl_sync_cache() argument
1232 cctl_start_stop(int fd,int lun,int iid,int retries,int start,int argc,char ** argv,char * combinedopt) cctl_start_stop() argument
1295 cctl_mode_sense(int fd,int lun,int iid,int retries,int argc,char ** argv,char * combinedopt) cctl_mode_sense() argument
1510 cctl_read_capacity(int fd,int lun,int iid,int retries,int argc,char ** argv,char * combinedopt) cctl_read_capacity() argument
1633 cctl_read_write(int fd,int lun,int iid,int retries,int argc,char ** argv,char * combinedopt,ctladm_cmdfunction command) cctl_read_write() argument
1813 cctl_get_luns(int fd,int lun,int iid,int retries,struct scsi_report_luns_data ** lun_data,uint32_t * num_luns) cctl_get_luns() argument
1883 cctl_report_luns(int fd,int lun,int iid,int retries) cctl_report_luns() argument
1936 cctl_tur(int fd,int lun,int iid,int retries) cctl_tur() argument
1967 cctl_get_inquiry(int fd,int lun,int iid,int retries,char * path_str,int path_len,struct scsi_inquiry_data * inq_data) cctl_get_inquiry() argument
2011 cctl_inquiry(int fd,int lun,int iid,int retries) cctl_inquiry() argument
2039 cctl_req_sense(int fd,int lun,int iid,int retries) cctl_req_sense() argument
2086 cctl_report_target_port_group(int fd,int lun,int iid) cctl_report_target_port_group() argument
2151 cctl_inquiry_vpd_devid(int fd,int lun,int iid) cctl_inquiry_vpd_devid() argument
2217 cctl_persistent_reserve_in(int fd,int lun,int iid,int argc,char ** argv,char * combinedopt,int retry_count) cctl_persistent_reserve_in() argument
2318 cctl_persistent_reserve_out(int fd,int lun,int iid,int argc,char ** argv,char * combinedopt,int retry_count) cctl_persistent_reserve_out() argument
3393 struct cctl_lun *lun; cctl_devlist() local
3684 int verbose = 0, init = 0, lun = 0, quiet = 0; cctl_portlist() local
4318 int lun; main() local
[all...]
/freebsd/sys/dev/pms/RefTisa/tisa/sassata/common/
H A Dtdmisc.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/tools/regression/iscsi/
H A Dctl.conf13 lun 0 {
17 lun 1 {
26 lun 0 {
30 lun 1 {
/freebsd/tests/sys/cam/ctl/
H A Dctl.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/sys/dev/virtio/scsi/
H A Dvirtio_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/sys/dev/ocs_fc/
H A Docs_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/sys/dev/smartpqi/
H A Dsmartpqi_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/sys/dev/pms/freebsd/driver/common/
H A Dlxencrypt.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