Home
last modified time | relevance | path

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

12345678910>>...18

/openbmc/ipmitool/lib/
H A Dipmi_firewall.c141 if (str2int(argv[i], &(p->lun)) != 0) { in ipmi_firewall_parse_args()
187 if (p->lun >= MAX_LUN) { in ipmi_firewall_parse_args()
191 if (p->netfn >= 0 && p->lun < 0) { in ipmi_firewall_parse_args()
218 _get_netfn_support(struct ipmi_intf * intf, int channel, unsigned char * lun, unsigned char * netfn) in _get_netfn_support() argument
225 if (!lun || !netfn) { in _get_netfn_support()
250 lun[l] = (*d)>>(2*l) & 0x3; in _get_netfn_support()
287 rqdata[2] = p->lun; in _get_command_support()
293 lprintf(LOG_ERR, "Get Command Support (LUN=%d, NetFn=%d, op=0) command failed", p->lun, p->netfn); in _get_command_support()
298 p->lun, p->netfn, val2str(rsp->ccode, completion_code_vals)); in _get_command_support()
314 rqdata[2] = p->lun; in _get_command_support()
[all …]
/openbmc/linux/drivers/staging/rts5208/
H A Drtsx_scsi.c313 void set_sense_type(struct rtsx_chip *chip, unsigned int lun, int sense_type) in set_sense_type() argument
317 set_sense_data(chip, lun, CUR_ERR, 0x06, 0, 0x28, 0, 0, 0); in set_sense_type()
321 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x3A, 0, 0, 0); in set_sense_type()
325 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x21, 0, 0, 0); in set_sense_type()
329 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x25, 0, 0, 0); in set_sense_type()
333 set_sense_data(chip, lun, CUR_ERR, 0x07, 0, 0x27, 0, 0, 0); in set_sense_type()
337 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x11, 0, 0, 0); in set_sense_type()
341 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x0C, 0x02, 0, 0); in set_sense_type()
345 set_sense_data(chip, lun, CUR_ERR, ILGAL_REQ, 0, in set_sense_type()
350 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x04, 0x04, 0, 0); in set_sense_type()
[all …]
/openbmc/linux/drivers/target/
H A Dtarget_core_tpg.c110 struct se_lun *lun; in core_tpg_add_node_to_devs() local
114 hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) { in core_tpg_add_node_to_devs()
115 if (lun_orig && lun != lun_orig) in core_tpg_add_node_to_devs()
118 dev = rcu_dereference_check(lun->lun_se_dev, in core_tpg_add_node_to_devs()
140 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_tpg_add_node_to_devs()
143 core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, in core_tpg_add_node_to_devs()
150 core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, in core_tpg_add_node_to_devs()
151 lun->unpacked_lun); in core_tpg_add_node_to_devs()
438 struct se_lun *lun = container_of(ref, struct se_lun, lun_ref); in core_tpg_lun_ref_release() local
440 complete(&lun->lun_shutdown_comp); in core_tpg_lun_ref_release()
[all …]
H A Dtarget_core_alua.c35 struct se_lun *lun, int explicit, int offline);
39 static void __target_attach_tg_pt_gp(struct se_lun *lun,
140 struct se_lun *lun; in target_emulate_report_target_port_groups() local
217 list_for_each_entry(lun, &tg_pt_gp->tg_pt_gp_lun_list, in target_emulate_report_target_port_groups()
228 put_unaligned_be16(lun->lun_tpg->tpg_rtpi, &buf[off]); in target_emulate_report_target_port_groups()
387 struct se_lun *lun; in target_emulate_set_target_port_groups() local
400 list_for_each_entry(lun, &dev->dev_sep_list, in target_emulate_set_target_port_groups()
402 if (lun->lun_tpg->tpg_rtpi != rtpi) in target_emulate_set_target_port_groups()
409 lun, 1, 1)) in target_emulate_set_target_port_groups()
648 struct se_lun *lun = cmd->se_lun; in target_alua_state_check() local
[all …]
H A Dtarget_core_fabric_configfs.c71 struct se_lun *lun; in target_fabric_mappedlun_link() local
83 lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); in target_fabric_mappedlun_link()
88 if (!lun->lun_se_dev) { in target_fabric_mappedlun_link()
92 if (lun->lun_shutdown) { in target_fabric_mappedlun_link()
97 se_tpg = lun->lun_tpg; in target_fabric_mappedlun_link()
139 return core_dev_add_initiator_node_lun_acl(se_tpg, lacl, lun, lun_access_ro); in target_fabric_mappedlun_link()
148 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_unlink() local
151 core_dev_del_initiator_node_lun_acl(lun, lacl); in target_fabric_mappedlun_unlink()
522 struct se_lun *lun = item_to_lun(item); in target_fabric_port_alua_tg_pt_gp_show() local
524 if (!lun->lun_se_dev) in target_fabric_port_alua_tg_pt_gp_show()
[all …]
H A Dtarget_core_stat.c345 CONFIGFS_ATTR_RO(target_stat_lu_, lun);
423 struct se_lun *lun = to_stat_port(item); in target_stat_port_inst_show() local
428 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_inst_show()
437 struct se_lun *lun = to_stat_port(item); in target_stat_port_dev_show() local
442 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_dev_show()
451 struct se_lun *lun = to_stat_port(item); in target_stat_port_indx_show() local
456 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_indx_show()
458 ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_tpg->tpg_rtpi); in target_stat_port_indx_show()
465 struct se_lun *lun = to_stat_port(item); in target_stat_port_role_show() local
470 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_role_show()
[all …]
H A Dtarget_core_device.c209 struct se_lun *lun; in core_get_se_deve_from_rtpi() local
214 lun = deve->se_lun; in core_get_se_deve_from_rtpi()
215 if (!lun) { in core_get_se_deve_from_rtpi()
221 if (lun->lun_tpg->tpg_rtpi != rtpi) in core_get_se_deve_from_rtpi()
288 struct se_lun *lun; in target_dev_ua_allocate() local
291 list_for_each_entry(lun, &dev->dev_sep_list, lun_dev_link) { in target_dev_ua_allocate()
293 spin_lock(&lun->lun_deve_lock); in target_dev_ua_allocate()
294 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) in target_dev_ua_allocate()
296 spin_unlock(&lun->lun_deve_lock); in target_dev_ua_allocate()
318 struct se_lun *lun, in core_enable_device_list_for_node() argument
[all …]
/openbmc/linux/drivers/usb/gadget/function/
H A Dstorage_common.h18 #define VLDBG(lun, fmt, args...) do { } while (0) argument
21 #define _LMSG(func, lun, fmt, args...) \ argument
23 if ((lun)->name_pfx && *(lun)->name_pfx) \
24 func("%s/%s: " fmt, *(lun)->name_pfx, \
25 (lun)->name, ## args); \
27 func("%s: " fmt, (lun)->name, ## args); \
30 #define LDBG(lun, fmt, args...) _LMSG(pr_debug, lun, fmt, ## args) argument
31 #define LERROR(lun, fmt, args...) _LMSG(pr_err, lun, fmt, ## args) argument
32 #define LWARN(lun, fmt, args...) _LMSG(pr_warn, lun, fmt, ## args) argument
33 #define LINFO(lun, fmt, args...) _LMSG(pr_info, lun, fmt, ## args) argument
H A Df_mass_storage.c259 unsigned int lun; member
1728 unsigned int lun = common->cmnd[1] >> 5; in check_command() local
1793 if (common->lun != lun) in check_command()
1795 common->lun, lun); in check_command()
1814 DBG(common, "unsupported LUN %u\n", common->lun); in check_command()
2245 common->lun = cbw->Lun; in received_cbw()
2246 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2247 common->curlun = common->luns[common->lun]; in received_cbw()
2778 void fsg_common_remove_lun(struct fsg_lun *lun) in fsg_common_remove_lun() argument
2780 if (device_is_registered(&lun->dev)) in fsg_common_remove_lun()
[all …]
/openbmc/u-boot/drivers/scsi/
H A Dscsi.c60 pccb->cmd[1] = pccb->lun << 5; in scsi_setup_read16()
89 pccb->cmd[1] = pccb->lun << 5; in scsi_setup_read_ext()
110 pccb->cmd[1] = pccb->lun << 5; in scsi_setup_write_ext()
131 pccb->cmd[1] = pccb->lun << 5; in scsi_setup_inquiry()
164 pccb->lun = block_dev->lun; in scsi_read()
240 pccb->lun = block_dev->lun; in scsi_write()
366 pccb->cmd[1] = pccb->lun << 5; in scsi_read_capacity()
427 pccb->cmd[1] = pccb->lun << 5; in scsi_setup_test_unit_ready()
444 dev_desc->lun = 0xff; in scsi_init_dev_desc_priv()
489 static int scsi_detect_dev(struct udevice *dev, int target, int lun, in scsi_detect_dev() argument
[all …]
/openbmc/qemu/hw/scsi/
H A Dscsi-bus.c30 int channel, int id, int lun, in do_scsi_device_find() argument
41 if (dev->lun == lun) { in do_scsi_device_find()
71 SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int id, int lun) in scsi_device_find() argument
74 return do_scsi_device_find(bus, channel, id, lun, false); in scsi_device_find()
77 SCSIDevice *scsi_device_get(SCSIBus *bus, int channel, int id, int lun) in scsi_device_get() argument
81 d = do_scsi_device_find(bus, channel, id, lun, false); in scsi_device_get()
204 static SCSIRequest *scsi_device_alloc_req(SCSIDevice *s, uint32_t tag, uint32_t lun, in scsi_device_alloc_req() argument
209 return sc->alloc_req(s, tag, lun, buf, hba_private); in scsi_device_alloc_req()
272 int channel, int target, int lun, in scsi_bus_is_address_free() argument
278 d = do_scsi_device_find(bus, channel, target, lun, true); in scsi_bus_is_address_free()
[all …]
H A Dvirtio-scsi.c69 static inline int virtio_scsi_get_lun(uint8_t *lun) in virtio_scsi_get_lun() argument
71 return ((lun[2] << 8) | lun[3]) & 0x3FFF; in virtio_scsi_get_lun()
74 static inline SCSIDevice *virtio_scsi_device_get(VirtIOSCSI *s, uint8_t *lun) in virtio_scsi_device_get() argument
76 if (lun[0] != 1) { in virtio_scsi_device_get()
79 if (lun[2] != 0 && !(lun[2] >= 0x40 && lun[2] < 0x80)) { in virtio_scsi_device_get()
82 return scsi_device_get(&s->bus, 0, lun[1], virtio_scsi_get_lun(lun)); in virtio_scsi_device_get()
306 trace_virtio_scsi_tmf_resp(virtio_scsi_get_lun(req->req.tmf.lun), in virtio_scsi_cancel_notify()
323 SCSIDevice *d = virtio_scsi_device_get(s, req->req.tmf.lun); in virtio_scsi_do_one_tmf_bh()
333 if (d->lun != virtio_scsi_get_lun(req->req.tmf.lun)) { in virtio_scsi_do_one_tmf_bh()
343 target = req->req.tmf.lun[1]; in virtio_scsi_do_one_tmf_bh()
[all …]
H A Dtrace-events4 scsi_req_alloc(int target, int lun, int tag) "target %d lun %d tag %d"
5 scsi_req_cancel(int target, int lun, int tag) "target %d lun %d tag %d"
6 scsi_req_data(int target, int lun, int tag, int len) "target %d lun %d tag %d len %d"
7 scsi_req_data_canceled(int target, int lun, int tag, int len) "target %d lun %d tag %d len %d"
8 scsi_req_dequeue(int target, int lun, int tag) "target %d lun %d tag %d"
11 scsi_req_continue(int target, int lun, int tag) "target %d lun %d tag %d"
12 scsi_req_continue_canceled(int target, int lun, int tag) "target %d lun %d tag %d"
13 scsi_req_parsed(int target, int lun, int tag, int cmd, int mode, int xfer) "target %d lun %d tag %d…
14 scsi_req_parsed_lba(int target, int lun, int tag, int cmd, uint64_t lba) "target %d lun %d tag %d c…
15 scsi_req_parse_bad(int target, int lun, int tag, int cmd) "target %d lun %d tag %d command %d"
[all …]
/openbmc/linux/drivers/scsi/
H A Dscsi_common.c132 u64 lun; in scsilun_to_int() local
134 lun = 0; in scsilun_to_int()
135 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int()
136 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) | in scsilun_to_int()
138 return lun; in scsilun_to_int()
157 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun) in int_to_scsilun() argument
163 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun()
164 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun()
165 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun()
166 lun = lun >> 16; in int_to_scsilun()
H A Dsd_trace.h27 __field( unsigned int, lun )
36 __entry->lun = cmnd->device->lun;
43 __entry->lun, __entry->lba, __entry->wp_offset)
57 __field( unsigned int, lun )
67 __entry->lun = cmnd->device->lun;
76 __entry->lun, __entry->rq_sector, __entry->wp_offset,
H A Dscsi_scan.c279 u64 lun, void *hostdata) in scsi_alloc_sdev() argument
298 sdev->lun = lun; in scsi_alloc_sdev()
916 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun()
919 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun()
1155 u64 lun, blist_flags_t *bflagsp, in scsi_probe_and_add_lun() argument
1170 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun()
1189 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun()
1219 if (lun == 0) { in scsi_probe_and_add_lun()
1258 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun()
1311 u64 sparse_lun, lun; in scsi_sequential_lun_scan() local
[all …]
H A Dvirtio_scsi.c281 unsigned int target = event->lun[1]; in virtscsi_handle_transport_reset()
282 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_transport_reset() local
286 if (lun == 0) { in virtscsi_handle_transport_reset()
290 scsi_add_device(shost, 0, target, lun); in virtscsi_handle_transport_reset()
294 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_transport_reset()
300 shost->host_no, target, lun); in virtscsi_handle_transport_reset()
313 unsigned int target = event->lun[1]; in virtscsi_handle_param_change()
314 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_param_change() local
318 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_param_change()
321 shost->host_no, target, lun); in virtscsi_handle_param_change()
[all …]
H A D53c700.c433 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument
437 (lun & NCR_700_LUN_MASK); in NCR_700_identify()
798 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local
802 lun = SCp->device->lun; in process_extended_message()
847 host->host_no, pun, lun); in process_extended_message()
857 host->host_no, pun, lun, in process_extended_message()
879 __u8 pun = 0xff, lun = 0xff; in process_message() local
883 lun = SCp->device->lun; in process_message()
887 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
921 pun, lun, in process_message()
[all …]
/openbmc/skeleton/pyipmitest/
H A Dipmi_debug.py18 def header(seq, netfn, lun, cmd): argument
22 lun,
27 def print_request(seq, netfn, lun, cmd, data): argument
28 str = header(seq, netfn, lun, cmd)
33 def print_response(seq, netfn, lun, cmd, cc, data): argument
34 str = header(seq, netfn, lun, cmd)
47 def ReceivedMessage(self, seq, netfn, lun, cmd, data): argument
49 print_request(seq, netfn, lun, cmd, data)
52 def sendMessage(self, seq, netfn, lun, cmd, ccode, data): argument
54 print_response(seq, netfn, lun, cmd, ccode, data)
/openbmc/qemu/contrib/vhost-user-scsi/
H A Dvhost-user-scsi.c36 VusIscsiLun lun; member
45 static int vus_iscsi_add_lun(VusIscsiLun *lun, char *iscsi_uri) in vus_iscsi_add_lun() argument
51 assert(lun); in vus_iscsi_add_lun()
53 assert(!lun->iscsi_ctx); in vus_iscsi_add_lun()
69 if (iscsi_full_connect_sync(iscsi_ctx, iscsi_url->portal, iscsi_url->lun)) { in vus_iscsi_add_lun()
75 lun->iscsi_ctx = iscsi_ctx; in vus_iscsi_add_lun()
76 lun->iscsi_lun = iscsi_url->lun; in vus_iscsi_add_lun()
140 if (!(!req->lun[1] && req->lun[2] == 0x40 && !req->lun[3])) { in handle_cmd_sync()
143 req->lun[1], req->lun[3]); in handle_cmd_sync()
279 if (handle_cmd_sync(vdev_scsi->lun.iscsi_ctx, in vus_proc_req()
[all …]
/openbmc/qemu/hw/ufs/
H A Dlu.c107 for (uint8_t lun = 0; lun < UFS_MAX_LUS; ++lun) { in ufs_emulate_report_luns() local
108 if (u->lus[lun]) { in ufs_emulate_report_luns()
115 outbuf[len + 1] = lun; in ufs_emulate_report_luns()
196 uint8_t lun = lu->lun; in ufs_emulate_scsi_cmd() local
229 if (lun == UFS_UPIU_UFS_DEVICE_WLUN) { in ufs_emulate_scsi_cmd()
266 scsi_req_new(lu->scsi_dev, task_tag, lu->lun, req->req_upiu.sc.cdb, in ufs_process_scsi_cmd()
279 DEFINE_PROP_UINT8("lun", UfsLu, lun, 0),
295 if (u->lus[lu->lun] != NULL) { in ufs_add_lu()
296 error_setg(errp, "ufs logical unit %d already exists.", lu->lun); in ufs_add_lu()
300 u->lus[lu->lun] = lu; in ufs_add_lu()
[all …]
/openbmc/linux/drivers/scsi/libsas/
H A Dsas_scsi_host.c134 struct scsi_lun lun; in sas_create_task() local
145 int_to_scsilun(cmd->device->lun, &lun); in sas_create_task()
146 memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); in sas_create_task()
236 cmd->device->lun == my_cmd->device->lun) in sas_scsi_clear_queue_lu()
327 struct scsi_lun lun; in sas_recover_lu() local
331 int_to_scsilun(cmd->device->lun, &lun); in sas_recover_lu()
335 cmd->device->lun); in sas_recover_lu()
338 res = i->dft->lldd_abort_task_set(dev, lun.scsi_lun); in sas_recover_lu()
342 res = i->dft->lldd_clear_task_set(dev, lun.scsi_lun); in sas_recover_lu()
347 res = i->dft->lldd_lu_reset(dev, lun.scsi_lun); in sas_recover_lu()
[all …]
/openbmc/linux/drivers/usb/storage/
H A Drealtek_cr.c67 #define SET_LUN_READY(chip, lun) ((chip)->lun_ready |= ((u8)1 << (lun))) argument
68 #define CLR_LUN_READY(chip, lun) ((chip)->lun_ready &= ~((u8)1 << (lun))) argument
69 #define TST_LUN_READY(chip, lun) ((chip)->lun_ready & ((u8)1 << (lun))) argument
117 #define SCSI_LUN(srb) ((srb)->device->lun)
201 static int rts51x_bulk_transport(struct us_data *us, u8 lun, in rts51x_bulk_transport() argument
217 bcb->Lun = lun; in rts51x_bulk_transport()
291 static int rts51x_bulk_transport_special(struct us_data *us, u8 lun, in rts51x_bulk_transport_special() argument
306 bcb->Lun = lun; in rts51x_bulk_transport_special()
420 u8 lun, u8 *status, int len, int *actlen) in rts51x_read_status() argument
430 usb_stor_dbg(us, "lun = %d\n", lun); in rts51x_read_status()
[all …]
/openbmc/qemu/pc-bios/s390-ccw/
H A Dvirtio-scsi.c71 req.lun = make_lun(sdev->channel, sdev->target, sdev->lun); in prepare_request()
235 sdev->lun = vdev->selected_scsi_device.lun; in virtio_scsi_locate_device()
239 IPL_check(sdev->lun <= vdev->config.scsi.max_lun, "LUN# high"); in virtio_scsi_locate_device()
246 sdev->lun = 0; /* LUN has to be 0 for REPORT LUNS */ in virtio_scsi_locate_device()
273 sdev->lun = r->lun[0].v16[0]; /* it's returned this way */ in virtio_scsi_locate_device()
274 debug_print_int("Have to use LUN", sdev->lun); in virtio_scsi_locate_device()
278 if (r->lun[i].v64) { in virtio_scsi_locate_device()
280 sdev->lun = r->lun[i].v16[0]; in virtio_scsi_locate_device()
281 debug_print_int("Will use LUN", sdev->lun); in virtio_scsi_locate_device()
/openbmc/u-boot/include/linux/mtd/
H A Dnand.h74 unsigned int lun; member
437 pos->lun = do_div(tmp, nand->memorg.luns_per_target); in nanddev_offs_to_pos()
458 if (a->lun != b->lun) in nanddev_pos_cmp()
459 return a->lun < b->lun ? -1 : 1; in nanddev_pos_cmp()
488 (pos->lun + in nanddev_pos_to_offs()
509 return (pos->lun << nand->rowconv.lun_addr_shift) | in nanddev_pos_to_row()
528 pos->lun = 0; in nanddev_pos_next_target()
543 if (pos->lun >= nand->memorg.luns_per_target - 1) in nanddev_pos_next_lun()
546 pos->lun++; in nanddev_pos_next_lun()
716 ((pos->lun + (pos->target * nand->memorg.luns_per_target)) * in nanddev_bbt_pos_to_entry()

12345678910>>...18