Home
last modified time | relevance | path

Searched refs:lun (Results 1 – 200 of 318) sorted by relevance

12

/linux-4.4.14/drivers/lightnvm/
Dgennvm.c26 struct gen_lun *lun; in gennvm_blocks_free() local
29 gennvm_for_each_lun(gn, lun, i) { in gennvm_blocks_free()
30 if (!lun->vlun.blocks) in gennvm_blocks_free()
32 vfree(lun->vlun.blocks); in gennvm_blocks_free()
45 struct gen_lun *lun; in gennvm_luns_init() local
52 gennvm_for_each_lun(gn, lun, i) { in gennvm_luns_init()
53 spin_lock_init(&lun->vlun.lock); in gennvm_luns_init()
54 INIT_LIST_HEAD(&lun->free_list); in gennvm_luns_init()
55 INIT_LIST_HEAD(&lun->used_list); in gennvm_luns_init()
56 INIT_LIST_HEAD(&lun->bb_list); in gennvm_luns_init()
[all …]
Dgennvm.h44 #define gennvm_for_each_lun(bm, lun, i) \ argument
45 for ((i) = 0, lun = &(bm)->luns[0]; \
46 (i) < (bm)->nr_luns; (i)++, lun = &(bm)->luns[(i)])
Drrpc.c148 l.g.lun = luns; in linear_to_generic_addr()
421 struct nvm_lun *lun = rlun->parent; in rrpc_lun_gc() local
430 spin_lock(&lun->lock); in rrpc_lun_gc()
431 while (nr_blocks_need > lun->nr_free_blocks && in rrpc_lun_gc()
457 spin_unlock(&lun->lock); in rrpc_lun_gc()
468 struct nvm_lun *lun = rblk->parent->lun; in rrpc_gc_queue() local
469 struct rrpc_lun *rlun = &rrpc->luns[lun->id - rrpc->lun_offset]; in rrpc_gc_queue()
561 struct nvm_lun *lun; in rrpc_map_page() local
565 lun = rlun->parent; in rrpc_map_page()
567 if (!is_gc && lun->nr_free_blocks < rrpc->nr_luns * 4) in rrpc_map_page()
[all …]
/linux-4.4.14/drivers/target/
Dtarget_core_tpg.c113 struct se_lun *lun; in core_tpg_add_node_to_devs() local
117 hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) { in core_tpg_add_node_to_devs()
118 if (lun_orig && lun != lun_orig) in core_tpg_add_node_to_devs()
121 dev = rcu_dereference_check(lun->lun_se_dev, in core_tpg_add_node_to_devs()
143 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_tpg_add_node_to_devs()
147 core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, in core_tpg_add_node_to_devs()
154 core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, in core_tpg_add_node_to_devs()
155 lun->unpacked_lun); in core_tpg_add_node_to_devs()
500 struct se_lun *lun = container_of(ref, struct se_lun, lun_ref); in core_tpg_lun_ref_release() local
502 complete(&lun->lun_ref_comp); in core_tpg_lun_ref_release()
[all …]
Dtarget_core_fabric_configfs.c75 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_link() local
83 if (lun->lun_link_magic != SE_LUN_LINK_MAGIC) { in target_fabric_mappedlun_link()
85 " %p to struct lun: %p\n", lun_ci, lun); in target_fabric_mappedlun_link()
91 if (!lun->lun_se_dev) { in target_fabric_mappedlun_link()
95 se_tpg = lun->lun_tpg; in target_fabric_mappedlun_link()
138 return core_dev_add_initiator_node_lun_acl(se_tpg, lacl, lun, lun_access); in target_fabric_mappedlun_link()
147 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_unlink() local
150 return core_dev_del_initiator_node_lun_acl(lun, lacl); in target_fabric_mappedlun_unlink()
571 struct se_lun *lun = item_to_lun(item); in target_fabric_port_alua_tg_pt_gp_show() local
573 if (!lun || !lun->lun_se_dev) in target_fabric_port_alua_tg_pt_gp_show()
[all …]
Dtarget_core_alua.c45 struct se_lun *lun, int explicit, int offline);
49 static void __target_attach_tg_pt_gp(struct se_lun *lun,
150 struct se_lun *lun; in target_emulate_report_target_port_groups() local
225 list_for_each_entry(lun, &tg_pt_gp->tg_pt_gp_lun_list, in target_emulate_report_target_port_groups()
236 buf[off++] = ((lun->lun_rtpi >> 8) & 0xff); in target_emulate_report_target_port_groups()
237 buf[off++] = (lun->lun_rtpi & 0xff); in target_emulate_report_target_port_groups()
395 struct se_lun *lun; in target_emulate_set_target_port_groups() local
408 list_for_each_entry(lun, &dev->dev_sep_list, in target_emulate_set_target_port_groups()
410 if (lun->lun_rtpi != rtpi) in target_emulate_set_target_port_groups()
417 lun, 1, 1)) in target_emulate_set_target_port_groups()
[all …]
Dtarget_core_stat.c361 CONFIGFS_ATTR_RO(target_stat_lu_, lun);
438 struct se_lun *lun = to_stat_port(item); in target_stat_port_inst_show() local
443 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_inst_show()
452 struct se_lun *lun = to_stat_port(item); in target_stat_port_dev_show() local
457 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_dev_show()
466 struct se_lun *lun = to_stat_port(item); in target_stat_port_indx_show() local
471 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_indx_show()
473 ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_rtpi); in target_stat_port_indx_show()
480 struct se_lun *lun = to_stat_port(item); in target_stat_port_role_show() local
485 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_role_show()
[all …]
Dtarget_core_device.c219 struct se_lun *lun; in core_get_se_deve_from_rtpi() local
224 lun = rcu_dereference(deve->se_lun); in core_get_se_deve_from_rtpi()
225 if (!lun) { in core_get_se_deve_from_rtpi()
231 if (lun->lun_rtpi != rtpi) in core_get_se_deve_from_rtpi()
252 struct se_lun *lun = rcu_dereference_check(deve->se_lun, in core_free_device_list_for_node() local
254 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_free_device_list_for_node()
319 struct se_lun *lun, in core_enable_device_list_for_node() argument
357 if (orig_lun != lun) { in core_enable_device_list_for_node()
367 rcu_assign_pointer(new->se_lun, lun); in core_enable_device_list_for_node()
373 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
[all …]
Dtarget_core_spc.c41 static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf) in spc_fill_alua_data() argument
56 spin_lock(&lun->lun_tg_pt_gp_lock); in spc_fill_alua_data()
57 tg_pt_gp = lun->lun_tg_pt_gp; in spc_fill_alua_data()
60 spin_unlock(&lun->lun_tg_pt_gp_lock); in spc_fill_alua_data()
66 struct se_lun *lun = cmd->se_lun; in spc_emulate_inquiry_std() local
91 spc_fill_alua_data(lun, buf); in spc_emulate_inquiry_std()
177 struct se_lun *lun = cmd->se_lun; in spc_emulate_evpd_83() local
270 tpg = lun->lun_tpg; in spc_emulate_evpd_83()
290 buf[off++] = ((lun->lun_rtpi >> 8) & 0xff); in spc_emulate_evpd_83()
291 buf[off++] = (lun->lun_rtpi & 0xff); in spc_emulate_evpd_83()
[all …]
Dtarget_core_internal.h58 int core_alloc_rtpi(struct se_lun *lun, struct se_device *dev);
71 struct se_lun *lun);
76 struct se_lun_acl *, struct se_lun *lun, u32);
Dtarget_core_pscsi.c314 sd->lun, sd->queue_depth); in pscsi_add_device_to_list()
376 sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_disk()
402 phv->phv_host_id, sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_disk()
418 sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_rom()
431 sd->channel, sd->id, sd->lun); in pscsi_create_type_rom()
454 sd->channel, sd->id, sd->lun); in pscsi_create_type_other()
534 (pdv->pdv_lun_id != sd->lun)) in pscsi_configure_device()
Dtarget_core_pr.c620 struct se_lun *lun, in __core_scsi3_do_alloc_registration() argument
667 pr_reg->pr_aptpl_target_lun = lun->unpacked_lun; in __core_scsi3_do_alloc_registration()
668 pr_reg->tg_pt_sep_rtpi = lun->lun_rtpi; in __core_scsi3_do_alloc_registration()
695 struct se_lun *lun, in __core_scsi3_alloc_registration() argument
714 pr_reg = __core_scsi3_do_alloc_registration(dev, nacl, lun, deve, mapped_lun, in __core_scsi3_alloc_registration()
926 struct se_lun *lun, in __core_scsi3_check_aptpl_registration() argument
977 pr_reg->tg_pt_sep_rtpi = lun->lun_rtpi; in __core_scsi3_check_aptpl_registration()
1008 struct se_lun *lun, in core_scsi3_check_aptpl_registration() argument
1015 return __core_scsi3_check_aptpl_registration(dev, tpg, lun, in core_scsi3_check_aptpl_registration()
1016 lun->unpacked_lun, nacl, in core_scsi3_check_aptpl_registration()
[all …]
/linux-4.4.14/drivers/staging/rts5208/
Drtsx_scsi.c324 void set_sense_type(struct rtsx_chip *chip, unsigned int lun, int sense_type) in set_sense_type() argument
328 set_sense_data(chip, lun, CUR_ERR, 0x06, 0, 0x28, 0, 0, 0); in set_sense_type()
332 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x3A, 0, 0, 0); in set_sense_type()
336 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x21, 0, 0, 0); in set_sense_type()
340 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x25, 0, 0, 0); in set_sense_type()
344 set_sense_data(chip, lun, CUR_ERR, 0x07, 0, 0x27, 0, 0, 0); in set_sense_type()
348 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x11, 0, 0, 0); in set_sense_type()
352 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x0C, 0x02, 0, 0); in set_sense_type()
356 set_sense_data(chip, lun, CUR_ERR, ILGAL_REQ, 0, in set_sense_type()
361 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x04, 0x04, 0, 0); in set_sense_type()
[all …]
Drtsx_card.c989 unsigned int lun = SCSI_LUN(srb); in card_rw() local
992 if (chip->rw_card[lun] == NULL) { in card_rw()
1000 retval = chip->rw_card[lun](srb, chip, sec_addr, sec_cnt); in card_rw()
1163 int check_card_exist(struct rtsx_chip *chip, unsigned int lun) in check_card_exist() argument
1165 if (chip->card_exist & chip->lun2card[lun]) in check_card_exist()
1171 int check_card_ready(struct rtsx_chip *chip, unsigned int lun) in check_card_ready() argument
1173 if (chip->card_ready & chip->lun2card[lun]) in check_card_ready()
1179 int check_card_wp(struct rtsx_chip *chip, unsigned int lun) in check_card_wp() argument
1181 if (chip->card_wp & chip->lun2card[lun]) in check_card_wp()
1187 int check_card_fail(struct rtsx_chip *chip, unsigned int lun) in check_card_fail() argument
[all …]
Drtsx_card.h1024 int check_card_exist(struct rtsx_chip *chip, unsigned int lun);
1025 int check_card_ready(struct rtsx_chip *chip, unsigned int lun);
1026 int check_card_wp(struct rtsx_chip *chip, unsigned int lun);
1027 int check_card_fail(struct rtsx_chip *chip, unsigned int lun);
1028 int check_card_ejected(struct rtsx_chip *chip, unsigned int lun);
1029 void eject_card(struct rtsx_chip *chip, unsigned int lun);
1030 u8 get_lun_card(struct rtsx_chip *chip, unsigned int lun);
1032 static inline u32 get_card_size(struct rtsx_chip *chip, unsigned int lun) in get_card_size() argument
1037 if ((get_lun_card(chip, lun) == SD_CARD) && in get_card_size()
1041 return chip->capacity[lun]; in get_card_size()
[all …]
Dms.c3818 unsigned int lun = SCSI_LUN(srb); local
3853 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT);
3870 set_sense_type(chip, lun,
3886 set_sense_type(chip, lun,
3896 set_sense_type(chip, lun,
3906 set_sense_type(chip, lun,
3911 set_sense_type(chip, lun,
3924 set_sense_type(chip, lun,
3929 set_sense_type(chip, lun,
3938 set_sense_type(chip, lun,
[all …]
Drtsx_scsi.h137 void set_sense_type(struct rtsx_chip *chip, unsigned int lun, int sense_type);
138 void set_sense_data(struct rtsx_chip *chip, unsigned int lun, u8 err_code,
Dxd.c1985 unsigned int lun = SCSI_LUN(srb); in xd_rw() local
2014 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT); in xd_rw()
2028 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT); in xd_rw()
2046 set_sense_type(chip, lun, in xd_rw()
2063 set_sense_type(chip, lun, in xd_rw()
2073 set_sense_type(chip, lun, in xd_rw()
2084 set_sense_type(chip, lun, in xd_rw()
2089 set_sense_type(chip, lun, in xd_rw()
2102 set_sense_type(chip, lun, in xd_rw()
2107 set_sense_type(chip, lun, in xd_rw()
[all …]
Dsd.c4231 unsigned int lun = SCSI_LUN(srb); local
4256 if (!(CHK_BIT(chip->lun_mc, lun))) {
4257 SET_BIT(chip->lun_mc, lun);
4258 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_CHANGE);
4267 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD);
4282 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD);
4344 unsigned int lun = SCSI_LUN(srb); local
4351 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD);
4364 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_CHANGE);
4381 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD);
[all …]
Drtsx.h90 #define SCSI_LUN(srb) ((srb)->device->lun)
Drtsx.c457 (u8)chip->srb->device->lun); in rtsx_control_thread()
461 else if (chip->srb->device->lun > chip->max_lun) { in rtsx_control_thread()
464 (u8)chip->srb->device->lun); in rtsx_control_thread()
/linux-4.4.14/drivers/usb/gadget/function/
Dstorage_common.h17 #define VLDBG(lun, fmt, args...) do { } while (0) argument
20 #define _LMSG(func, lun, fmt, args...) \ argument
22 if ((lun)->name_pfx && *(lun)->name_pfx) \
23 func("%s/%s: " fmt, *(lun)->name_pfx, \
24 (lun)->name, ## args); \
26 func("%s: " fmt, (lun)->name, ## args); \
29 #define LDBG(lun, fmt, args...) _LMSG(pr_debug, lun, fmt, ## args) argument
30 #define LERROR(lun, fmt, args...) _LMSG(pr_err, lun, fmt, ## args) argument
31 #define LWARN(lun, fmt, args...) _LMSG(pr_warn, lun, fmt, ## args) argument
32 #define LINFO(lun, fmt, args...) _LMSG(pr_info, lun, fmt, ## args) argument
Df_mass_storage.c282 unsigned int lun; member
1693 unsigned int lun = common->cmnd[1] >> 5; in check_command() local
1758 if (common->lun != lun) in check_command()
1760 common->lun, lun); in check_command()
1779 DBG(common, "unsupported LUN %u\n", common->lun); in check_command()
2171 common->lun = cbw->Lun; in received_cbw()
2172 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2173 common->curlun = common->luns[common->lun]; in received_cbw()
2753 void fsg_common_remove_lun(struct fsg_lun *lun) in fsg_common_remove_lun() argument
2755 if (device_is_registered(&lun->dev)) in fsg_common_remove_lun()
[all …]
Df_mass_storage.h76 struct fsg_lun *lun; member
140 void fsg_common_remove_lun(struct fsg_lun *lun);
/linux-4.4.14/drivers/scsi/
Dscsi_common.c79 u64 lun; in scsilun_to_int() local
81 lun = 0; in scsilun_to_int()
82 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int()
83 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) | in scsilun_to_int()
85 return lun; in scsilun_to_int()
104 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun) in int_to_scsilun() argument
110 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun()
111 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun()
112 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun()
113 lun = lun >> 16; in int_to_scsilun()
Dscsi_scan.c211 u64 lun, void *hostdata) in scsi_alloc_sdev() argument
230 sdev->lun = lun; in scsi_alloc_sdev()
823 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun()
826 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun()
1051 u64 lun, int *bflagsp, in scsi_probe_and_add_lun() argument
1064 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun()
1083 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun()
1114 if (lun == 0) { in scsi_probe_and_add_lun()
1153 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun()
1205 u64 sparse_lun, lun; in scsi_sequential_lun_scan() local
[all …]
Datari_NCR5380.c276 int target, lun; in init_tags() local
283 for (lun = 0; lun < 8; ++lun) { in init_tags()
284 ta = &hostdata->TagAlloc[target][lun]; in init_tags()
306 u8 lun = cmd->device->lun; in is_lun_busy() local
309 if (hostdata->busy[cmd->device->id] & (1 << lun)) in is_lun_busy()
315 if (hostdata->TagAlloc[scmd_id(cmd)][lun].nr_allocated >= in is_lun_busy()
316 hostdata->TagAlloc[scmd_id(cmd)][lun].queue_size) { in is_lun_busy()
318 H_NO(cmd), cmd->device->id, lun); in is_lun_busy()
332 u8 lun = cmd->device->lun; in cmd_get_tag() local
342 hostdata->busy[cmd->device->id] |= (1 << lun); in cmd_get_tag()
[all …]
Dvirtio_scsi.c326 unsigned int target = event->lun[1]; in virtscsi_handle_transport_reset()
327 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_transport_reset() local
331 scsi_add_device(shost, 0, target, lun); in virtscsi_handle_transport_reset()
334 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_transport_reset()
340 shost->host_no, target, lun); in virtscsi_handle_transport_reset()
353 unsigned int target = event->lun[1]; in virtscsi_handle_param_change()
354 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_param_change() local
358 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_param_change()
361 shost->host_no, target, lun); in virtscsi_handle_param_change()
494 cmd->lun[0] = 1; in virtio_scsi_init_hdr()
[all …]
Dscsi_proc.c189 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in proc_print_scsidevice()
242 static int scsi_add_single_device(uint host, uint channel, uint id, uint lun) in scsi_add_single_device() argument
252 error = shost->transportt->user_scan(shost, channel, id, lun); in scsi_add_single_device()
254 error = scsi_scan_host_selected(shost, channel, id, lun, 1); in scsi_add_single_device()
269 static int scsi_remove_single_device(uint host, uint channel, uint id, uint lun) in scsi_remove_single_device() argument
278 sdev = scsi_device_lookup(shost, channel, id, lun); in scsi_remove_single_device()
311 int host, channel, id, lun; in proc_scsi_write() local
342 lun = simple_strtoul(p + 1, &p, 0); in proc_scsi_write()
344 err = scsi_add_single_device(host, channel, id, lun); in proc_scsi_write()
356 lun = simple_strtoul(p + 1, &p, 0); in proc_scsi_write()
[all …]
D53c700.c419 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument
423 (lun & NCR_700_LUN_MASK); in NCR_700_identify()
784 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local
788 lun = SCp->device->lun; in process_extended_message()
833 host->host_no, pun, lun); in process_extended_message()
844 host->host_no, pun, lun, in process_extended_message()
867 __u8 pun = 0xff, lun = 0xff; in process_message() local
871 lun = SCp->device->lun; in process_message()
875 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
909 pun, lun, in process_message()
[all …]
Dwd33c93.c506 (1 << (cmd->device->lun & 0xff)))) in DEF_SCSI_QCMD()
576 (prev->device->lun != cmd->device->lun)) { in DEF_SCSI_QCMD()
597 write_wd33c93(regs, WD_TARGET_LUN, (u8)cmd->device->lun); in DEF_SCSI_QCMD()
600 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF)); in DEF_SCSI_QCMD()
808 uchar asr, sr, phs, id, lun, *ucp, msg; in wd33c93_intr() local
866 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); in wd33c93_intr()
899 hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun); in wd33c93_intr()
1180 lun = read_wd33c93(regs, WD_TARGET_LUN); in wd33c93_intr()
1181 DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) in wd33c93_intr()
1183 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); in wd33c93_intr()
[all …]
Dqla1280.h521 uint8_t lun; /* SCSI LUN */ member
607 uint8_t lun; /* SCSI LUN */ member
628 uint8_t lun; /* SCSI LUN */ member
648 uint8_t lun; /* SCSI LUN */ member
694 __le16 lun; /* Bit 15 is bus number. */ member
722 uint8_t lun; /* SCSI LUN */ member
747 uint8_t lun; member
773 uint8_t lun; member
794 uint8_t lun; member
817 uint8_t lun; /* SCSI LUN */ member
[all …]
Dch.c247 cmd[1] = ((ch->device->lun & 0x7) << 5) | in ch_read_element_status()
284 cmd[1] = (ch->device->lun & 0x7) << 5; in ch_init_elem()
295 int result,id,lun,i; in ch_readconfig() local
304 cmd[1] = (ch->device->lun & 0x7) << 5; in ch_readconfig()
369 lun = 0; in ch_readconfig()
372 lun = dt_lun[elem]; in ch_readconfig()
389 lun = 0; in ch_readconfig()
391 if (data[6] & 0x10) lun = data[6] & 7; in ch_readconfig()
395 VPRINTK(KERN_CONT, "ID %i, LUN %i, ",id,lun); in ch_readconfig()
399 id,lun); in ch_readconfig()
[all …]
Din2000.c474 if (!(hostdata->busy[cmd->device->id] & (1 << cmd->device->lun))) in DEF_SCSI_QCMD()
544 if ((prev->device->id != cmd->device->id) || (prev->device->lun != cmd->device->lun)) { in DEF_SCSI_QCMD()
562 write_3393(hostdata, WD_TARGET_LUN, cmd->device->lun); in DEF_SCSI_QCMD()
564 hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); in DEF_SCSI_QCMD()
838 uchar asr, sr, phs, id, lun, *ucp, msg; in in2000_intr() local
1078 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in in2000_intr()
1100 hostdata->outgoing_msg[0] = (0x80 | 0x00 | cmd->device->lun); in in2000_intr()
1333 lun = read_3393(hostdata, WD_TARGET_LUN); in in2000_intr()
1334 DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) in in2000_intr()
1336 hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); in in2000_intr()
[all …]
Dgdth_ioctl.h95 u8 lun; /* LUN */ member
114 u8 lun; /* LUN */ member
211 u8 lun; /* LUN */ member
258 u8 lun; /* LUN */ member
327 u8 lun; /* LUN */ member
Dscsi.c1037 u64 lun) in __scsi_device_lookup_by_target() argument
1044 if (sdev->lun ==lun) in __scsi_device_lookup_by_target()
1062 u64 lun) in scsi_device_lookup_by_target() argument
1069 sdev = __scsi_device_lookup_by_target(starget, lun); in scsi_device_lookup_by_target()
1095 uint channel, uint id, u64 lun) in __scsi_device_lookup() argument
1101 sdev->lun ==lun) in __scsi_device_lookup()
1121 uint channel, uint id, u64 lun) in scsi_device_lookup() argument
1127 sdev = __scsi_device_lookup(shost, channel, id, lun); in scsi_device_lookup()
D3w-sas.h173 #define TW_REQ_LUN_IN(lun, request_id) (((lun << 12) & 0xf000) | (request_id & 0xfff)) argument
174 #define TW_LUN_OUT(lun) ((lun >> 12) & 0xf) argument
Dvmw_pvscsi.h130 u8 lun[8]; member
247 u8 lun[8]; member
332 u8 lun[8]; member
DNCR5380.c756 …destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); in lprint_Scsi_Cmnd()
998 …%d busy=%d lun=%llu\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun); in DEF_SCSI_QCMD()
1001 (1 << (u8)(tmp->device->lun & 0xff)))) { in DEF_SCSI_QCMD()
1017 …get %d lun %llu removed from issue_queue\n", instance->host_no, tmp->device->id, tmp->device->lun); in DEF_SCSI_QCMD()
1440 tmp[0] = IDENTIFY(((instance->irq == NO_IRQ) ? 0 : 1), cmd->device->lun); in NCR5380_select()
1452 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF)); in NCR5380_select()
2138 …get %d lun %llu linked command complete.\n", instance->host_no, cmd->device->id, cmd->device->lun);
2145 …llu linked command complete, no next_link\n" instance->host_no, cmd->device->id, cmd->device->lun);
2154 …inked request done, calling scsi_done().\n", instance->host_no, cmd->device->id, cmd->device->lun);
2165 …ommand for target %d, lun %llu completed\n", instance->host_no, cmd->device->id, cmd->device->lun);
[all …]
D3w-9xxx.h440 #define TW_REQ_LUN_IN(lun, request_id) (((lun << 12) & 0xf000) | (request_id & 0xfff)) argument
441 #define TW_LUN_OUT(lun) ((lun >> 12) & 0xf) argument
Dqla1280.c526 #define SCSI_LUN_32(Cmnd) Cmnd->device->lun
851 int bus, target, lun; in qla1280_error_action() local
865 lun = SCSI_LUN_32(cmd); in qla1280_error_action()
900 target, lun); in qla1280_error_action()
921 "command.\n", ha->host_no, bus, target, lun); in qla1280_error_action()
973 ha->host_no, bus, target, lun); in qla1280_error_action()
1148 int status, lun; in qla1280_set_target_parameters() local
1180 for (lun = 0; lun < MAX_LUNS; lun++) { in qla1280_set_target_parameters()
1183 mb[1] |= lun; in qla1280_set_target_parameters()
1272 int bus, target, lun; in qla1280_done() local
[all …]
Dstorvsc_drv.c187 u8 lun; member
452 uint lun; member
458 uint lun; in storvsc_device_scan() local
462 lun = wrk->lun; in storvsc_device_scan()
464 sdev = scsi_device_lookup(wrk->host, 0, 0, lun); in storvsc_device_scan()
515 sdev = scsi_device_lookup(wrk->host, 0, 0, wrk->lun); in storvsc_remove_lun()
918 wrk->lun = vm_srb->lun; in storvsc_handle_error()
1440 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
Ddc395x.c952 static struct DeviceCtlBlk *find_dcb(struct AdapterCtlBlk *acb, u8 id, u8 lun) in find_dcb() argument
954 return acb->children[id][lun]; in find_dcb()
1090 cmd, cmd->device->id, (u8)cmd->device->lun, cmd->cmnd[0]); in dc395x_queue_command_lck()
1097 cmd->device->lun >= acb->scsi_host->max_lun || in dc395x_queue_command_lck()
1098 cmd->device->lun >31) { in dc395x_queue_command_lck()
1103 if (!(acb->dcb_map[cmd->device->id] & (1 << cmd->device->lun))) { in dc395x_queue_command_lck()
1105 cmd->device->id, (u8)cmd->device->lun); in dc395x_queue_command_lck()
1110 dcb = find_dcb(acb, cmd->device->id, cmd->device->lun); in dc395x_queue_command_lck()
1114 cmd->device->id, (u8)cmd->device->lun); in dc395x_queue_command_lck()
1210 (u8)srb->cmd->device->lun); in dump_register_info()
[all …]
Desp_scsi.c640 int tgt, lun; in esp_autosense() local
644 lun = dev->lun; in esp_autosense()
649 tgt, lun); in esp_autosense()
664 *p++ = IDENTIFY(0, lun); in esp_autosense()
667 (lun << 5) : 0); in esp_autosense()
726 int tgt, lun, i; in esp_maybe_execute_command() local
746 lun = dev->lun; in esp_maybe_execute_command()
809 *p++ = IDENTIFY(1, lun); in esp_maybe_execute_command()
811 *p++ = IDENTIFY(0, lun); in esp_maybe_execute_command()
860 printk("ESP: tgt[%d] lun[%d] scsi_cmd [ ", tgt, lun); in esp_maybe_execute_command()
[all …]
Dvmw_pvscsi.c686 memset(e->lun, 0, sizeof(e->lun)); in pvscsi_queue_ring()
687 e->lun[1] = sdev->lun; in pvscsi_queue_ring()
1000 desc->bus, desc->target, desc->lun[1]); in pvscsi_process_msg()
1006 desc->lun[1]); in pvscsi_process_msg()
1012 desc->target, desc->lun[1]); in pvscsi_process_msg()
1021 desc->bus, desc->target, desc->lun[1]); in pvscsi_process_msg()
1027 desc->lun[1]); in pvscsi_process_msg()
1034 desc->bus, desc->target, desc->lun[1]); in pvscsi_process_msg()
Dipr.h341 u8 lun; member
343 (((res_addr).bus << 16) | ((res_addr).target << 8) | (res_addr).lun)
436 __be64 lun; member
1300 u32 lun; member
1306 (((res)->bus << 24) | ((res)->target << 8) | (res)->lun)
1781 #define ipr_res_printk(level, ioa_cfg, bus, target, lun, fmt, ...) \ argument
1783 bus, target, lun, ##__VA_ARGS__)
1786 ipr_res_printk(KERN_ERR, ioa_cfg, (res)->bus, (res)->target, (res)->lun, fmt, ##__VA_ARGS__)
1790 (ra).bus, (ra).target, (ra).lun, ##__VA_ARGS__)
1802 (res).bus, (res).target, (res).lun); \
Dlibiscsi.c149 hdr->lun = task->lun; in iscsi_prep_data_out_pdu()
276 hdr_lun = scsilun_to_int(&tmf->lun); in iscsi_check_tmf_restrictions()
277 if (hdr_lun != task->sc->device->lun) in iscsi_check_tmf_restrictions()
369 int_to_scsilun(sc->device->lun, &hdr->lun); in iscsi_prep_scsi_cmd_pdu()
370 task->lun = hdr->lun; in iscsi_prep_scsi_cmd_pdu()
992 hdr.lun = rhdr->lun; in iscsi_send_nopout()
1853 static void fail_scsi_tasks(struct iscsi_conn *conn, u64 lun, int error) in fail_scsi_tasks() argument
1863 if (lun != -1 && lun != task->sc->device->lun) in fail_scsi_tasks()
2118 hdr->lun = task->lun; in iscsi_prep_abort_task_pdu()
2259 int_to_scsilun(sc->device->lun, &hdr->lun); in iscsi_prep_lun_reset_pdu()
[all …]
Daha1542.c375 u8 lun = cmd->device->lun; in aha1542_queuecommand() local
473 ccb[mbo].idlun = (target & 7) << 5 | direction | (lun & 7); /*SCSI Target Id */ in aha1542_queuecommand()
799 u8 lun = cmd->device->lun; in aha1542_dev_reset() local
831 ccb[mbo].idlun = (target & 7) << 5 | (lun & 7); /*SCSI Target Id */ in aha1542_dev_reset()
Dxen-scsifront.c500 ring_req->lun = sc->device->lun; in scsifront_command2ring()
987 unsigned int hst, chn, tgt, lun; in scsifront_do_lun_hotplug() local
1009 "%u:%u:%u:%u", &hst, &chn, &tgt, &lun); in scsifront_do_lun_hotplug()
1026 if (scsi_add_device(info->host, chn, tgt, lun)) { in scsifront_do_lun_hotplug()
1037 sdev = scsi_device_lookup(info->host, chn, tgt, lun); in scsifront_do_lun_hotplug()
DFlashPoint.c1498 unsigned char thisCard, lun; in FlashPoint_StartCCB() local
1570 lun = p_Sccb->Lun; in FlashPoint_StartCCB()
1572 lun = 0; in FlashPoint_StartCCB()
1575 && (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarLUNBusy[lun] in FlashPoint_StartCCB()
2198 unsigned char lun, qtag; in FPT_SccbMgrTableInitTarget() local
2211 for (lun = 0; lun < MAX_LUN; lun++) { in FPT_SccbMgrTableInitTarget()
2212 currTar_Info->TarLUNBusy[lun] = 0; in FPT_SccbMgrTableInitTarget()
2213 currTar_Info->LunDiscQ_Idx[lun] = 0; in FPT_SccbMgrTableInitTarget()
2313 unsigned char lastTag, lun; in FPT_ssel() local
2329 lun = currSCCB->Lun; in FPT_ssel()
[all …]
Dhptiop.h217 u8 lun; member
235 u8 lun; member
Dncr53c8xx.c799 static int device_queue_depth(int unit, int target, int lun) in device_queue_depth() argument
822 if (u != lun) in device_queue_depth()
823 u = (lun == v) ? v : NO_LUN; in device_queue_depth()
828 (u == ALL_LUNS || u == lun)) in device_queue_depth()
1139 u_long lun; member
1579 u_char lun; member
4123 struct lcb *lp = tp->lp[sdev->lun]; in ncr_queue_command()
4140 (sdev->lun >= MAX_LUN )) { in ncr_queue_command()
4192 idmsg = IDENTIFY(0, sdev->lun); in ncr_queue_command()
4709 int target, lun; in ncr_detach() local
[all …]
Dhpsa.c792 hdev->bus, hdev->target, hdev->lun, in path_info_show()
1131 unsigned char scsi3addr[], int bus, int *target, int *lun) in hpsa_find_target_lun() argument
1150 *lun = 0; in hpsa_find_target_lun()
1199 h->scsi_host->host_no, dev->bus, dev->target, dev->lun, in hpsa_show_dev_msg()
1228 if (device->lun != -1) in hpsa_scsi_add_entry()
1239 device->bus, &device->target, &device->lun) != 0) in hpsa_scsi_add_entry()
1262 device->lun = device->scsi3addr[4]; in hpsa_scsi_add_entry()
1266 if (device->lun == -1) { in hpsa_scsi_add_entry()
1351 new_entry->lun = h->dev[entry]->lun; in hpsa_scsi_replace_entry()
1535 sd->bus, sd->target, sd->lun); in hpsa_show_volume_status()
[all …]
Dstex.c218 u8 lun; member
230 u8 lun; member
554 unsigned int id, lun; in stex_queuecommand_lck() local
560 lun = cmd->device->lun; in stex_queuecommand_lck()
602 if (lun >= host->max_lun) { in stex_queuecommand_lck()
609 if (!lun && !cmd->device->channel && in stex_queuecommand_lck()
650 req->lun = lun; in stex_queuecommand_lck()
Dwd719x.c118 static int wd719x_direct_cmd(struct wd719x *wd, u8 opcode, u8 dev, u8 lun, in wd719x_direct_cmd() argument
133 wd719x_writeb(wd, WD719X_AMR_CMD_PARAM_2, lun); in wd719x_direct_cmd()
238 scb->lun = cmd->device->lun; in wd719x_queuecommand()
476 cmd->device->lun, cmd->tag, scb->phys, 0); in wd719x_abort()
Dscsi_sysfs.c103 unsigned long long channel, id, lun; in scsi_scan() local
113 if (check_set(&lun, s3)) in scsi_scan()
116 res = shost->transportt->user_scan(shost, channel, id, lun); in scsi_scan()
118 res = scsi_scan_host_selected(shost, channel, id, lun, 1); in scsi_scan()
1272 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in scsi_sysfs_device_initialize()
1278 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in scsi_sysfs_device_initialize()
Daha1740.h114 u16 lun:3, /* Logical Unit */ member
Dwd719x.h33 u8 lun; /* 06 SCSI LUN */ member
Dscsi_debug.c591 u64 lun; member
1294 have_wlun = (scp->device->lun == SCSI_W_LUN_REPORT_LUNS); in resp_inquiry()
1297 else if (scsi_debug_no_lun_0 && (0 == devip->lun)) in resp_inquiry()
1316 (devip->target * 1000) + devip->lun); in resp_inquiry()
3326 u64 lun; in resp_report_luns() local
3359 for (i = 0, lun = (scsi_debug_no_lun_0 ? 1 : 0); in resp_report_luns()
3361 i++, lun++) { in resp_report_luns()
3362 upper = (lun >> 8) & 0x3f; in resp_report_luns()
3366 one_lun[i].scsi_lun[1] = lun & 0xff; in resp_report_luns()
3590 (devip->lun == sdev->lun)) in devInfoReg()
[all …]
Dgdth_proc.c278 'A'+i,pdi->target_id,pdi->lun,hrec); in gdth_show_info()
297 pds->list[k].lun == pdi->lun) { in gdth_show_info()
Dscsi_ioctl.c225 + ((sdev->lun & 0xff) << 8) in scsi_ioctl()
Dinitio.c905 scbp_tarlun = (tmp->lun << 8) | (tmp->target); in initio_find_busy_scb()
1933 u8 tar, lun; in int_initio_resel() local
1944 lun = inb(host->addr + TUL_SIdent) & 0x0F; in int_initio_resel()
1978 if (scb->target != tar || scb->lun != lun) { in int_initio_resel()
1989 if ((scb = initio_find_busy_scb(host, tar | (lun << 8))) == NULL) { in int_initio_resel()
2576 cblk->lun = cmnd->device->lun; in initio_build_scb()
2577 cblk->ident = cmnd->device->lun | DISC_ALLOW; in initio_build_scb()
Da100u2w.h150 u8 lun; /*03 Lun */ member
Dultrastor.c185 unsigned char lun: 3; /* logical unit number */ member
738 my_mscp->lun = SCpnt->device->lun; in ultrastor_queuecommand_lck()
Du14-34f.c554 unsigned char lun: 3, channel:2, target:3; member
563 lun: 3; /* SCSI logical unit number */
1290 (u8)SCpnt->device->lun); in u14_34f_queuecommand_lck()
1295 cpp->lun = (u8)SCpnt->device->lun; in u14_34f_queuecommand_lck()
1669 (u8)SCpnt->lun, k, flushcount, n_ready, in reorder()
Dscsi_transport_sas.c1579 int lun; in sas_rphy_add() local
1582 lun = SCAN_WILD_CARD; in sas_rphy_add()
1584 lun = 0; in sas_rphy_add()
1586 scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id, lun, 0); in sas_rphy_add()
1698 uint id, u64 lun) in sas_user_scan() argument
1712 rphy->scsi_target_id, lun, 1); in sas_user_scan()
Daha1740.c420 host->ecb[ecbno].lun = SCpnt->device->lun; in aha1740_queuecommand_lck()
Deata_generic.h371 __u8 lun; /* drive lun */ member
Da100u2w.c858 scb->lun = cmd->device->lun; in inia100_build_scb()
894 scb->ident = (u8)(cmd->device->lun & 0xff) | DISC_ALLOW; in inia100_build_scb()
/linux-4.4.14/drivers/usb/storage/
Drealtek_cr.c78 #define SET_LUN_READY(chip, lun) ((chip)->lun_ready |= ((u8)1 << (lun))) argument
79 #define CLR_LUN_READY(chip, lun) ((chip)->lun_ready &= ~((u8)1 << (lun))) argument
80 #define TST_LUN_READY(chip, lun) ((chip)->lun_ready & ((u8)1 << (lun))) argument
128 #define SCSI_LUN(srb) ((srb)->device->lun)
212 static int rts51x_bulk_transport(struct us_data *us, u8 lun, in rts51x_bulk_transport() argument
228 bcb->Lun = lun; in rts51x_bulk_transport()
299 static int rts51x_bulk_transport_special(struct us_data *us, u8 lun, in rts51x_bulk_transport_special() argument
314 bcb->Lun = lun; in rts51x_bulk_transport_special()
428 u8 lun, u8 *status, int len, int *actlen) in rts51x_read_status() argument
438 usb_stor_dbg(us, "lun = %d\n", lun); in rts51x_read_status()
[all …]
Ddatafab.c73 signed char lun; /* used for dual-slot readers */ member
167 if (info->lun == -1) { in datafab_read_data()
197 command[5] = 0xE0 + (info->lun << 4); in datafab_read_data()
251 if (info->lun == -1) { in datafab_write_data()
285 command[5] = 0xE0 + (info->lun << 4); in datafab_write_data()
362 info->lun = 0; in datafab_determine_lun()
377 info->lun = 1; in datafab_determine_lun()
407 if (info->lun == -1) { in datafab_id_device()
418 command[5] += (info->lun << 4); in datafab_id_device()
575 ((struct datafab_info *)us->extra)->lun = -1; in datafab_transport()
Dsddr09.c1503 usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); in dpcm_transport()
1505 switch (srb->device->lun) { in dpcm_transport()
1523 srb->device->lun = 0; in dpcm_transport()
1525 srb->device->lun = 1; in dpcm_transport()
1529 usb_stor_dbg(us, "Invalid LUN %d\n", (u8)srb->device->lun); in dpcm_transport()
Dusb.c354 us->srb->device->lun); in usb_stor_control_thread()
358 else if (us->srb->device->lun > us->max_lun) { in usb_stor_control_thread()
361 us->srb->device->lun); in usb_stor_control_thread()
/linux-4.4.14/drivers/scsi/aic94xx/
Daic94xx_tmf.c220 static int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun) in asd_clear_nexus_I_T_L() argument
227 memcpy(scb->clear_nexus.ssp_task.lun, lun, 8); in asd_clear_nexus_I_T_L()
240 memcpy(scb->clear_nexus.ssp_task.lun, task->ssp_task.LUN, 8); in asd_clear_nexus_tag()
462 memcpy(scb->abort_task.ssp_task.lun, task->ssp_task.LUN, 8); in asd_abort_task()
575 static int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun, in asd_initiate_ssp_tmf() argument
611 memcpy(scb->ssp_tmf.ssp_task.lun, lun, 8); in asd_initiate_ssp_tmf()
657 int asd_abort_task_set(struct domain_device *dev, u8 *lun) in asd_abort_task_set() argument
659 int res = asd_initiate_ssp_tmf(dev, lun, TMF_ABORT_TASK_SET, 0); in asd_abort_task_set()
662 asd_clear_nexus_I_T_L(dev, lun); in asd_abort_task_set()
666 int asd_clear_aca(struct domain_device *dev, u8 *lun) in asd_clear_aca() argument
[all …]
Daic94xx.h87 int asd_abort_task_set(struct domain_device *, u8 *lun);
88 int asd_clear_aca(struct domain_device *, u8 *lun);
89 int asd_clear_task_set(struct domain_device *, u8 *lun);
90 int asd_lu_reset(struct domain_device *, u8 *lun);
Daic94xx_sas.h333 u8 lun[LUN_SIZE]; /* BE */ member
344 u8 lun[LUN_SIZE]; member
614 u8 lun[LUN_SIZE]; member
/linux-4.4.14/include/uapi/linux/
Dvirtio_scsi.h45 __u8 lun[8]; /* Logical Unit Number */ member
55 __u8 lun[8]; /* Logical Unit Number */ member
79 __u8 lun[8]; member
90 __u8 lun[8]; member
101 __u8 lun[8]; member
Dipmi.h87 unsigned char lun; member
99 unsigned char lun; member
127 unsigned char lun; member
Dedd.h123 __u8 lun; member
131 __u64 lun; member
145 __u64 lun; member
/linux-4.4.14/drivers/scsi/isci/
Dtask.h93 unsigned char lun[8]; member
141 u8 *lun);
145 u8 *lun);
149 u8 *lun);
156 u8 *lun);
Dtask.c382 u8 *lun) in isci_task_send_lu_reset_sas() argument
412 int isci_task_lu_reset(struct domain_device *dev, u8 *lun) in isci_task_lu_reset() argument
448 ret = isci_task_send_lu_reset_sas(ihost, idev, lun); in isci_task_lu_reset()
622 u8 *lun) in isci_task_abort_task_set() argument
639 u8 *lun) in isci_task_clear_aca() argument
657 u8 *lun) in isci_task_clear_task_set() argument
/linux-4.4.14/drivers/block/paride/
Dpf.c236 int lun; member
294 pf->lun = (*drives[unit])[D_LUN]; in pf_init_units()
481 { ATAPI_REQ_SENSE, pf->lun << 5, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 }; in pf_req_sense()
511 char lo_cmd[12] = { ATAPI_LOCK, pf->lun << 5, 0, 0, func, 0, 0, 0, 0, 0, 0, 0 }; in pf_lock()
518 char ej_cmd[12] = { ATAPI_DOOR, pf->lun << 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 }; in pf_eject()
571 { ATAPI_MODE_SENSE, pf->lun << 5, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0 }; in pf_mode_sense()
606 char rc_cmd[12] = { ATAPI_CAPACITY, pf->lun << 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; in pf_get_capacity()
621 pf->name, pf->drive, pf->lun, bs); in pf_get_capacity()
631 { ATAPI_IDENTIFY, pf->lun << 5, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0 }; in pf_identify()
642 pf->name, pf->drive, pf->lun, dt); in pf_identify()
[all …]
/linux-4.4.14/drivers/scsi/libsas/
Dsas_scsi_host.c153 struct scsi_lun lun; in sas_create_task() local
165 int_to_scsilun(cmd->device->lun, &lun); in sas_create_task()
166 memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); in sas_create_task()
262 cmd->device->lun == my_cmd->device->lun) in sas_scsi_clear_queue_lu()
353 struct scsi_lun lun; in sas_recover_lu() local
357 int_to_scsilun(cmd->device->lun, &lun); in sas_recover_lu()
361 cmd->device->lun); in sas_recover_lu()
364 res = i->dft->lldd_abort_task_set(dev, lun.scsi_lun); in sas_recover_lu()
368 res = i->dft->lldd_clear_task_set(dev, lun.scsi_lun); in sas_recover_lu()
373 res = i->dft->lldd_lu_reset(dev, lun.scsi_lun); in sas_recover_lu()
[all …]
/linux-4.4.14/include/trace/events/
Dscsi.h211 __field( unsigned int, lun )
224 __entry->lun = cmd->device->lun;
236 __entry->lun, __entry->data_sglen, __entry->prot_sglen,
253 __field( unsigned int, lun )
267 __entry->lun = cmd->device->lun;
280 __entry->lun, __entry->data_sglen, __entry->prot_sglen,
298 __field( unsigned int, lun )
312 __entry->lun = cmd->device->lun;
326 __entry->lun, __entry->data_sglen, __entry->prot_sglen,
/linux-4.4.14/drivers/s390/scsi/
Dzfcp_unit.c24 u64 lun; in zfcp_unit_scsi_scan() local
26 lun = scsilun_to_int((struct scsi_lun *) &unit->fcp_lun); in zfcp_unit_scsi_scan()
29 scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, lun, 1); in zfcp_unit_scsi_scan()
191 u64 lun; in zfcp_unit_sdev() local
193 lun = scsilun_to_int((struct scsi_lun *) &unit->fcp_lun); in zfcp_unit_sdev()
196 return scsi_device_lookup(shost, 0, port->starget_id, lun); in zfcp_unit_sdev()
Dzfcp_aux.c56 static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun) in zfcp_init_device_configure() argument
78 zfcp_unit_add(port, lun); in zfcp_init_device_configure()
93 u64 wwpn, lun; in zfcp_init_device_setup() local
111 if (!token || kstrtoull(token, 0, (unsigned long long *) &lun)) in zfcp_init_device_setup()
115 zfcp_init_device_configure(busid, wwpn, lun); in zfcp_init_device_setup()
Dzfcp_dbf.h75 u64 lun; member
143 u64 lun; member
Dzfcp_dbf.c131 rec->u.uss.lun = srb->fcp_lun; in zfcp_dbf_hba_fsf_uss()
243 rec->lun = zfcp_scsi_dev_lun(sdev); in zfcp_dbf_set_common()
422 rec->scsi_lun = (u32)sc->device->lun; in zfcp_dbf_scsi()
Dzfcp_fc.h215 int_to_scsilun(scsi->device->lun, (struct scsi_lun *) &fcp->fc_lun); in zfcp_fc_scsi_to_fcp()
Dzfcp_def.h277 int_to_scsilun(sdev->lun, (struct scsi_lun *)&fcp_lun); in zfcp_scsi_dev_lun()
/linux-4.4.14/drivers/scsi/arm/
Dqueue.c171 (u8)(q->SCpnt->device->lun & 0x7), exclude)) { in queue_remove_exclude()
209 struct scsi_cmnd *queue_remove_tgtluntag(Queue_t *queue, int target, int lun, in queue_remove_tgtluntag() argument
219 if (q->SCpnt->device->id == target && q->SCpnt->device->lun == lun && in queue_remove_tgtluntag()
260 int queue_probetgtlun (Queue_t *queue, int target, int lun) in queue_probetgtlun() argument
269 if (q->SCpnt->device->id == target && q->SCpnt->device->lun == lun) { in queue_probetgtlun()
Dqueue.h76 int lun, int tag);
96 extern int queue_probetgtlun (Queue_t *queue, int target, int lun);
Dacornscsi.c764 (u8)(SCpnt->device->lun & 0x07), host->busyluns); in acornscsi_kick()
868 (u8)(SCpnt->device->lun & 0x7), host->busyluns); in acornscsi_done()
1582 (u8)(host->SCpnt->device->lun & 0x7), host->busyluns); in acornscsi_message()
1694 host->SCpnt->device->lun)); in acornscsi_buildmessages()
1769 unsigned int target, lun, ok = 0; in acornscsi_reconnect() local
1787 lun = sbic_arm_read(host, SBIC_DATA) & 7; in acornscsi_reconnect()
1790 host->scsi.reconnected.lun = lun; in acornscsi_reconnect()
1794 host->SCpnt->device->id == target && host->SCpnt->device->lun == lun) in acornscsi_reconnect()
1797 if (!ok && queue_probetgtlun(&host->queues.disconnected, target, lun)) in acornscsi_reconnect()
1832 host->SCpnt->device->lun == host->scsi.reconnected.lun && in acornscsi_reconnect_finish()
[all …]
Dfas216.c941 unsigned char target, lun, tag; in fas216_reselected_intr() local
970 lun = msg[1] & 7; in fas216_reselected_intr()
986 target, lun, tag); in fas216_reselected_intr()
991 info->SCpnt->device->lun == lun && in fas216_reselected_intr()
1002 target, lun, tag); in fas216_reselected_intr()
1782 msgqueue_addmsg(&info->scsi.msgs, 1, IDENTIFY(disconnect_ok, SCpnt->device->lun)); in fas216_start_command()
1824 (u8)(SCpnt->device->lun & 0x7), info->busyluns); in fas216_allocate_tag()
2172 (u8)(SCpnt->device->lun & 0x7), info->busyluns); in fas216_done()
2400 (u8)(SCpnt->device->lun & 0x7), info->busyluns); in fas216_find_command()
2997 seq_printf(m, " %d/%llu ", scd->id, scd->lun); in fas216_print_devices()
Dacornscsi.h291 unsigned char lun; /* reconnected lun */ member
/linux-4.4.14/include/linux/
Dlightnvm.h143 u64 lun : NVM_LUN_BITS; member
233 struct nvm_lun *lun; member
294 l.ppa |= ((u64)r.g.lun) << dev->ppaf.lun_offset; in generic_to_dev_addr()
316 l.g.lun |= (r.ppa >> dev->ppaf.lun_offset) & in dev_to_generic_addr()
338 struct nvm_lun *lun = blk->lun; in block_to_ppa() local
342 ppa.g.lun = lun->lun_id; in block_to_ppa()
343 ppa.g.ch = lun->chnl_id; in block_to_ppa()
/linux-4.4.14/include/scsi/
Discsi_proto.h93 struct scsi_lun lun; member
155 struct scsi_lun lun; member
231 struct scsi_lun lun; member
259 struct scsi_lun lun; member
274 struct scsi_lun lun; member
290 struct scsi_lun lun; member
348 struct scsi_lun lun; member
366 struct scsi_lun lun; member
386 struct scsi_lun lun; member
592 uint8_t lun[8]; member
Dscsi.h112 static inline int scsi_is_wlun(u64 lun) in scsi_is_wlun() argument
114 return (lun & 0xff00) == SCSI_W_LUN_BASE; in scsi_is_wlun()
256 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ argument
258 ((lun) & 0x07))
Dsrp.h183 struct scsi_lun lun; member
204 struct scsi_lun lun; member
269 struct scsi_lun lun; member
Dlibsas.h657 int (*lldd_abort_task_set)(struct domain_device *, u8 *lun);
658 int (*lldd_clear_aca)(struct domain_device *, u8 *lun);
659 int (*lldd_clear_task_set)(struct domain_device *, u8 *lun);
663 int (*lldd_lu_reset)(struct domain_device *, u8 *lun);
Dscsi_device.h103 u64 lun; member
304 uint target, u64 lun);
392 unsigned int id, u64 lun, int rescan);
Dsg.h108 int lun; member
/linux-4.4.14/drivers/scsi/snic/
Dsnic_res.h29 u16 flags, u64 tgt_id, u8 *lun, u8 *scsi_cdb, u8 cdb_len, in snic_icmnd_init() argument
38 memcpy(&req->u.icmnd.lun_id, lun, LUN_ADDR_LEN); in snic_icmnd_init()
50 u16 flags, u32 req_id, u64 tgt_id, u8 *lun, u8 tm_type) in snic_itmf_init() argument
59 memcpy(&req->u.itmf.lun_id, lun, LUN_ADDR_LEN); in snic_itmf_init()
Dsnic_scsi.c171 struct scsi_lun lun; in snic_queue_icmnd_req() local
202 int_to_scsilun(sc->device->lun, &lun); in snic_queue_icmnd_req()
215 lun.scsi_lun, in snic_queue_icmnd_req()
356 sc, snic_cmd_tag(sc), sc->cmnd[0], sc->device->lun); in snic_queuecommand()
598 sc->device->lun, sc, sc->cmnd[0], snic_cmd_tag(sc), in snic_icmnd_cmpl_handler()
1295 struct scsi_lun lun; in snic_queue_itmf_req() local
1303 int_to_scsilun(sc->device->lun, &lun); in snic_queue_itmf_req()
1313 lun.scsi_lun, in snic_queue_itmf_req()
/linux-4.4.14/drivers/vhost/
Dscsi.c583 unsigned char *cdb, u64 scsi_tag, u16 lun, u8 task_attr, in vhost_scsi_get_tag() argument
617 cmd->tvc_lun = lun; in vhost_scsi_get_tag()
860 u16 lun; in vhost_scsi_handle_vq() local
909 lunp = &v_req_pi.lun[0]; in vhost_scsi_handle_vq()
910 target = &v_req_pi.lun[1]; in vhost_scsi_handle_vq()
914 lunp = &v_req.lun[0]; in vhost_scsi_handle_vq()
915 target = &v_req.lun[1]; in vhost_scsi_handle_vq()
1025 lun = ((v_req_pi.lun[2] << 8) | v_req_pi.lun[3]) & 0x3FFF; in vhost_scsi_handle_vq()
1030 lun = ((v_req.lun[2] << 8) | v_req.lun[3]) & 0x3FFF; in vhost_scsi_handle_vq()
1046 cmd = vhost_scsi_get_tag(vq, tpg, cdb, tag, lun, task_attr, in vhost_scsi_handle_vq()
[all …]
/linux-4.4.14/drivers/scsi/aic7xxx/
Daic79xx.h84 ((scb)->hscb->lun)
104 #define BUILD_TCL(scsiid, lun) \ argument
105 ((lun) | (((scsiid) & TID) << 4))
106 #define BUILD_TCL_RAW(target, channel, lun) \ argument
107 ((lun) | ((target) << 8))
117 #define AHD_BUILD_COL_IDX(target, lun) \ argument
118 ((((u8)lun) << 4) | target)
126 (scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
132 dst->hscb->lun = src->hscb->lun; \
496 /*20*/ uint8_t lun; member
[all …]
Daic79xx_proc.c163 int lun; in ahd_dump_target_state() local
179 for (lun = 0; lun < AHD_NUM_LUNS; lun++) { in ahd_dump_target_state()
182 dev = scsi_device_lookup_by_target(starget, lun); in ahd_dump_target_state()
198 sdev->sdev_target->id, (u8)sdev->lun); in ahd_dump_device_state()
Daic7xxx_proc.c141 int lun; in ahc_dump_target_state() local
159 for (lun = 0; lun < AHC_NUM_LUNS; lun++) { in ahc_dump_target_state()
162 sdev = scsi_device_lookup_by_target(starget, lun); in ahc_dump_target_state()
178 sdev->sdev_target->id, (u8)sdev->lun); in ahc_dump_device_state()
Daic7xxx.h86 ((scb)->hscb->lun & LID)
103 #define BUILD_TCL(scsiid, lun) \ argument
104 ((lun) | (((scsiid) & TID) << 4))
464 /*26*/ uint8_t lun; member
1103 u_int lun; member
1157 int target, char channel, int lun,
1184 char channel, int lun, u_int tag,
1190 int lun, uint32_t status,
1193 char channel, int lun, u_int tag,
1202 u_int lun, char channel,
Dscsi_message.h47 #define MSG_IDENTIFY(lun, disc) (((disc) ? 0xc0 : MSG_IDENTIFYFLAG) | (lun)) argument
Daic7xxx_core.c269 char channel, int lun, u_int tag,
626 scb->hscb->lun &= LID; in ahc_queue_scb()
628 scb->hscb->lun |= SCB_XFERLEN_ODD; in ahc_queue_scb()
1458 devinfo.lun); in ahc_handle_seqint()
2111 hscb->lun,
2683 devinfo->lun, AC_TRANSFER_NEG); in ahc_set_tags()
2821 u_int lun, char channel, role_t role) in ahc_compile_devinfo() argument
2825 devinfo->lun = lun; in ahc_compile_devinfo()
2838 devinfo->target, devinfo->lun); in ahc_print_devinfo()
3071 devinfo->lun, period, offset); in ahc_construct_sdtr()
[all …]
Daic79xx_core.c170 u_int lun, cam_status status,
197 char channel, int lun, u_int tag,
241 char channel, int lun, u_int tag,
266 int target, char channel, int lun,
1827 ahd_outb(ahd, SAVED_LUN, scb->hscb->lun); in ahd_handle_seqint()
2257 devinfo.lun); in ahd_handle_seqint()
2283 u_int lun; in ahd_handle_seqint() local
2290 lun = CAM_LUN_WILDCARD; in ahd_handle_seqint()
2298 lun = scb->hscb->lun; in ahd_handle_seqint()
2301 'A', lun, tag, ROLE_INITIATOR, in ahd_handle_seqint()
[all …]
Daic7xxx_osm.c1354 int lun, u_int tag, role_t role, uint32_t status) in ahc_platform_abort_scbs() argument
1403 sdev->sdev_target->id, sdev->lun, in ahc_linux_device_queue_depth()
1411 devinfo.lun, AC_TRANSFER_NEG); in ahc_linux_device_queue_depth()
1417 devinfo.lun, AC_TRANSFER_NEG); in ahc_linux_device_queue_depth()
1481 hscb->lun = cmd->device->lun; in ahc_linux_run_command()
1608 u_int target, u_int lun, ac_code code) in ahc_send_async() argument
1673 WARN_ON(lun != CAM_LUN_WILDCARD); in ahc_send_async()
1821 sdev->sdev_target->id, sdev->lun, in ahc_linux_handle_scsi_status()
2101 (u8)cmd->device->lun); in ahc_linux_queue_recovery_cmd()
2109 (u8)cmd->device->lun, in ahc_linux_queue_recovery_cmd()
[all …]
Daic79xx_inline.h152 dst->hscb->lun = src->hscb->lun; \
Daic79xx_osm.c841 reset_scb->hscb->lun = cmd->device->lun; in ahd_linux_dev_reset()
1488 int lun, u_int tag, role_t role, uint32_t status) in ahd_platform_abort_scbs() argument
1536 sdev->sdev_target->id, sdev->lun, in ahd_linux_device_queue_depth()
1544 devinfo.lun, AC_TRANSFER_NEG); in ahd_linux_device_queue_depth()
1550 devinfo.lun, AC_TRANSFER_NEG); in ahd_linux_device_queue_depth()
1583 cmd->device->lun); in ahd_linux_run_command()
1602 hscb->lun = cmd->device->lun; in ahd_linux_run_command()
1688 u_int target, u_int lun, ac_code code) in ahd_send_async() argument
1755 WARN_ON(lun != CAM_LUN_WILDCARD); in ahd_send_async()
1890 sdev->sdev_target->id, sdev->lun, in ahd_linux_handle_scsi_status()
[all …]
Daic7xxx_osm.h687 char channel, int lun, u_int tag,
694 u_int target, u_int lun, ac_code);
Daic79xx_osm.h678 char channel, int lun, u_int tag,
684 u_int target, u_int lun, ac_code);
/linux-4.4.14/drivers/block/
Dcciss_scsi.c349 find_bus_target_lun(ctlr_info_t *h, int *bus, int *target, int *lun) in find_bus_target_lun() argument
364 *bus = 0; *target=i; *lun = 0; found=1; in find_bus_target_lun()
372 int bus, target, lun; member
383 int i, bus, target, lun; in cciss_scsi_add_entry() local
393 lun = 0; in cciss_scsi_add_entry()
411 lun = device->scsi3addr[4]; in cciss_scsi_add_entry()
418 if (lun == 0) { in cciss_scsi_add_entry()
420 &sd->bus, &sd->target, &sd->lun) != 0) in cciss_scsi_add_entry()
425 sd->lun = lun; in cciss_scsi_add_entry()
429 added[*nadded].lun = sd->lun; in cciss_scsi_add_entry()
[all …]
Dcciss_scsi.h63 int bus, target, lun; /* as presented to the OS */ member
Dida_cmd.h325 __u8 lun; member
/linux-4.4.14/drivers/scsi/fnic/
Dfcpio.h217 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
265 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
287 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
532 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
565 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
596 u8 lun[LUN_ADDRESS]; /* FC vNIC only: LUN address */ member
769 u8 lun; member
Dfnic_res.h87 u32 data_len, u8 *lun, in fnic_queue_wq_copy_desc_icmnd_16() argument
114 memcpy(desc->u.icmnd_16.lun, lun, LUN_ADDRESS); /* LUN address */ in fnic_queue_wq_copy_desc_icmnd_16()
126 u32 tm_req, u32 tm_id, u8 *lun, in fnic_queue_wq_copy_desc_itmf() argument
141 memcpy(desc->u.itmf.lun, lun, LUN_ADDRESS); /* LUN address */ in fnic_queue_wq_copy_desc_itmf()
Dfnic_scsi.c372 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_queue_wq_copy_desc()
1574 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_rport_exch_reset()
1723 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_terminate_rport_io()
1794 rport->port_id, sc->device->lun, tag, CMD_FLAGS(sc)); in fnic_abort_cmd()
1854 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_abort_cmd()
1995 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_queue_dr_io_req()
2104 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_clean_pending_aborts()
2263 rport->port_id, sc->device->lun, sc); in fnic_device_reset()
2369 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_device_reset()
/linux-4.4.14/drivers/scsi/pm8001/
Dpm8001_sas.c878 u8 *lun, struct pm8001_tmf_task *tmf) in pm8001_issue_ssp_tmf() argument
884 strncpy((u8 *)&ssp_task.LUN, lun, 8); in pm8001_issue_ssp_tmf()
1078 int pm8001_lu_reset(struct domain_device *dev, u8 *lun) in pm8001_lu_reset() argument
1097 rc = pm8001_issue_ssp_tmf(dev, lun, &tmf_task); in pm8001_lu_reset()
1110 struct scsi_lun lun; in pm8001_query_task() local
1122 int_to_scsilun(cmnd->device->lun, &lun); in pm8001_query_task()
1135 rc = pm8001_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in pm8001_query_task()
1164 struct scsi_lun lun; in pm8001_abort_task() local
1183 int_to_scsilun(cmnd->device->lun, &lun); in pm8001_abort_task()
1195 rc = pm8001_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in pm8001_abort_task()
[all …]
Dpm8001_sas.h638 int pm8001_abort_task_set(struct domain_device *dev, u8 *lun);
639 int pm8001_clear_aca(struct domain_device *dev, u8 *lun);
640 int pm8001_clear_task_set(struct domain_device *dev, u8 *lun);
643 int pm8001_lu_reset(struct domain_device *dev, u8 *lun);
Dpm8001_hwi.h546 u8 lun[8]; member
553 u8 lun[8];/* SCSI Logical Unit Number */ member
/linux-4.4.14/drivers/scsi/esas2r/
Desas2r_ioctl.c334 rq->vrq->scsi.flags |= cpu_to_le32(rq->func_rsp.ioctl_rsp.csmi.lun); in esas2r_csmi_ioctl_tunnel_comp_cb()
357 ioctl->csmi.lun = (u8)le32_to_cpu(rq->vrq->scsi.flags); in csmi_ioctl_tunnel()
374 static bool check_lun(struct scsi_lun lun) in check_lun() argument
378 result = ((lun.scsi_lun[7] == 0) && in check_lun()
379 (lun.scsi_lun[6] == 0) && in check_lun()
380 (lun.scsi_lun[5] == 0) && in check_lun()
381 (lun.scsi_lun[4] == 0) && in check_lun()
382 (lun.scsi_lun[3] == 0) && in check_lun()
383 (lun.scsi_lun[2] == 0) && in check_lun()
385 (lun.scsi_lun[0] == 0)); in check_lun()
[all …]
Datioctl.h318 u8 lun[8]; member
441 u8 lun[8]; member
505 u8 lun; member
512 u8 lun; member
521 u8 lun; member
867 u8 lun[8]; member
Datvda.h51 u8 lun; member
64 u8 lun; member
257 u16 lun; member
306 u16 lun; member
1168 u8 lun; member
1255 u8 lun; member
Desas2r_io.c768 u8 lun = (u8)le32_to_cpu(rqaux->vrq->scsi.flags); in esas2r_send_task_mgmt() local
787 && (((u8)le32_to_cpu(rq->vrq->scsi.flags)) == lun in esas2r_send_task_mgmt()
806 rqaux->vrq->scsi.flags |= cpu_to_le32(lun); in esas2r_send_task_mgmt()
820 && (((u8)le32_to_cpu(rq->vrq->scsi.flags)) == lun in esas2r_send_task_mgmt()
Desas2r_main.c913 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_queuecommand()
941 (int)cmd->device->lun); in esas2r_queuecommand()
1191 cmd->device->lun); in esas2r_dev_targ_reset()
1199 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_dev_targ_reset()
1211 cmd->device->id, cmd->device->lun); in esas2r_dev_targ_reset()
1416 d->lun = le16_to_cpu(d->lun); in esas2r_nuxi_mgt_data()
/linux-4.4.14/drivers/staging/unisys/visorhba/
Dvisorhba_main.c94 u32 channel, id, lun; /* Disk Path */ member
110 u32 channel, id, lun; /* Disk Path */ member
152 (iter->lun == match->lun))
310 cmdrsp->scsitaskmgmt.vdest.lun = scsidev->lun; in forward_taskmgmt_command()
488 cmdrsp->scsi.vdest.lun = scsidev->lun; in visorhba_queue_command_lck()
561 tmpvdisk->lun = scsidev->lun; in visorhba_slave_alloc()
816 scsidev->lun, in do_scsi_nolinuxstat()
945 dar->lun = cmdrsp->disknotify.lun; in process_disk_notify()
/linux-4.4.14/drivers/scsi/qla2xxx/
Dqla_iocb.c402 cmd_pkt->lun = cpu_to_le16(cmd->device->lun); in qla2x00_start_scsi()
500 uint64_t lun, uint8_t type) in __qla2x00_marker() argument
523 int_to_scsilun(lun, (struct scsi_lun *)&mrk24->lun); in __qla2x00_marker()
524 host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun)); in __qla2x00_marker()
529 mrk->lun = cpu_to_le16((uint16_t)lun); in __qla2x00_marker()
541 struct rsp_que *rsp, uint16_t loop_id, uint64_t lun, in qla2x00_marker() argument
548 ret = __qla2x00_marker(vha, req, rsp, loop_id, lun, type); in qla2x00_marker()
1310 int_to_scsilun(cmd->device->lun, &fcp_cmnd->lun); in qla24xx_build_scsi_crc_2_iocbs()
1514 int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); in qla24xx_start_scsi()
1515 host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, sizeof(cmd_pkt->lun)); in qla24xx_start_scsi()
[all …]
Dqla_fw.h404 struct scsi_lun lun; /* FCP LUN (BE). */ member
442 struct scsi_lun lun; /* FCP LUN (BE). */ member
480 struct scsi_lun lun; /* FCP LUN (BE). */ member
528 struct scsi_lun lun; /* FCP LUN (BE). */ member
628 uint8_t lun[8]; /* FCP LUN (BE). */ member
848 struct scsi_lun lun; /* FCP LUN (BE). */ member
Dqla_target.c105 static int qlt_issue_task_mgmt(struct qla_tgt_sess *sess, uint32_t lun,
500 uint32_t unpacked_lun, lun = 0; in qlt_reset() local
552 lun = a->u.isp24.fcp_cmnd.lun; in qlt_reset()
553 unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun); in qlt_reset()
1328 uint32_t lun, uint8_t *s_id) in abort_cmds_for_lun() argument
1342 (struct scsi_lun *)&op->atio.u.isp24.fcp_cmnd.lun); in abort_cmds_for_lun()
1343 if (op_key == key && op_lun == lun) in abort_cmds_for_lun()
1352 (struct scsi_lun *)&cmd->atio.u.isp24.fcp_cmnd.lun); in abort_cmds_for_lun()
1353 if (cmd_key == key && cmd_lun == lun) in abort_cmds_for_lun()
1367 u32 lun = 0; in __qlt_24xx_handle_abts() local
[all …]
Dqla_bsg.h168 uint16_t lun; member
Dqla_mr.h36 struct scsi_lun lun; /* LUN (LE). */ member
108 struct scsi_lun lun; /* LUN (LE). */ member
Dqla_os.c942 uint64_t lun; in qla2xxx_eh_abort() local
956 lun = cmd->device->lun; in qla2xxx_eh_abort()
967 vha->host_no, id, lun, sp, cmd, sp->handle); in qla2xxx_eh_abort()
1007 vha->host_no, id, lun, wait, ret); in qla2xxx_eh_abort()
1047 cmd->device->lun == l); in qla2x00_eh_wait_for_pending_commands()
1087 cmd->device->id, cmd->device->lun, cmd); in __qla2xxx_eh_generic_reset()
1096 if (do_reset(fcport, cmd->device->lun, cmd->request->cpu + 1) in __qla2xxx_eh_generic_reset()
1104 cmd->device->lun, type) != QLA_SUCCESS) { in __qla2xxx_eh_generic_reset()
1112 vha->host_no, cmd->device->id, cmd->device->lun, cmd); in __qla2xxx_eh_generic_reset()
1119 reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun, in __qla2xxx_eh_generic_reset()
[all …]
Dqla_target.h139 uint16_t lun; member
368 uint64_t lun; member
412 uint16_t lun; member
/linux-4.4.14/drivers/char/ipmi/
Dipmi_poweroff.c213 smi_addr.lun = 0; in pps_poweroff_atca()
243 smi_addr.lun = 0; in ipmi_atca_detect()
280 smi_addr.lun = 0; in ipmi_poweroff_atca()
355 smi_addr.lun = 0; in ipmi_poweroff_cpi1()
395 ipmb_addr.lun = aer_lun; in ipmi_poweroff_cpi1()
484 smi_addr.lun = 0; in ipmi_poweroff_chassis()
587 smi_addr.lun = 0; in ipmi_po_new_smi()
Dipmi_msghandler.c185 unsigned char lun; member
656 return (smi_addr1->lun == smi_addr2->lun); in ipmi_addr_equal()
666 && (ipmb_addr1->lun == ipmb_addr2->lun)); in ipmi_addr_equal()
679 && (lan_addr1->lun == lan_addr2->lun)); in ipmi_addr_equal()
1157 user->intf->channels[channel].lun = LUN & 0x3; in ipmi_set_my_LUN()
1168 *address = user->intf->channels[channel].lun; in ipmi_get_my_LUN()
1427 smi_msg->data[i+4] = (msg->netfn << 2) | (ipmb_addr->lun & 0x3); in format_ipmb_msg()
1466 smi_msg->data[5] = (msg->netfn << 2) | (lan_addr->lun & 0x3); in format_lan_msg()
1600 if (smi_addr->lun > 3) { in i_ipmi_request()
1643 smi_msg->data[0] = (msg->netfn << 2) | (smi_addr->lun & 0x3); in i_ipmi_request()
[all …]
Dipmi_watchdog.c422 addr.lun = 0; in i_ipmi_set_timeout()
512 addr.lun = 0; in panic_halt_ipmi_heartbeat()
634 addr.lun = 0; in ipmi_heartbeat()
/linux-4.4.14/include/linux/usb/
Duas.h53 struct scsi_lun lun; member
64 struct scsi_lun lun; member
/linux-4.4.14/drivers/scsi/lpfc/
Dlpfc_nl.h109 uint32_t lun; member
119 uint32_t lun; member
Dlpfc_scsi.c3581 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3595 fast_path_evt->un.check_cond_evt.scsi_event.lun = in lpfc_send_scsi_error_event()
3596 cmnd->device->lun; in lpfc_send_scsi_error_event()
3625 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3708 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3719 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3975 cmd->device ? cmd->device->lun : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
4083 cmd->device->id, cmd->device->lun, cmd, in lpfc_scsi_cmd_iocb_cmpl()
4208 int_to_scsilun(lpfc_cmd->pCmd->device->lun, in lpfc_scsi_prep_cmnd()
4297 uint64_t lun, in lpfc_scsi_prep_task_mgmt_cmd() argument
[all …]
Dlpfc_scsi.h47 uint64_t lun; member
/linux-4.4.14/drivers/xen/
Dxen-scsiback.c76 unsigned int lun; /* LUN */ member
82 unsigned int lun; member
266 tpg->tport->tport_name, pending_req->v2p->lun, in scsiback_print_status()
398 pending_req->sense_buffer, pending_req->v2p->lun, in scsiback_cmd_exec()
610 if (transport_lookup_tmr_lun(se_cmd, pending_req->v2p->lun) < 0) in scsiback_device_action()
644 (entry->v.lun == v->lun)) { in scsiback_do_translation()
668 vir.lun = ring_req->lun; in prepare_pending_reqs()
674 vir.chn, vir.tgt, vir.lun); in prepare_pending_reqs()
923 (entry->v.lun == v->lun)) { in scsiback_add_translation_entry()
935 new->lun = unpacked_lun; in scsiback_add_translation_entry()
[all …]
/linux-4.4.14/drivers/ide/
Dide-disk_proc.c160 ide_devset_rw_field(lun, lun);
170 IDE_PROC_DEVSET(lun, 0, 7),
/linux-4.4.14/Documentation/DocBook/
Dscsi.xml.db73 API-scsi-probe-lun
74 API-scsi-add-lun
76 API-scsi-probe-and-add-lun
77 API-scsi-sequential-lun-scan
78 API-scsi-report-lun-scan
/linux-4.4.14/drivers/staging/unisys/include/
Diochannel.h164 u32 lun; /* lun == logical unit number */ member
271 #define SET_NO_DISK_INQUIRY_RESULT(buf, len, lun, lun0notpresent, notpresent) \ argument
277 if (lun == 0) { \
479 u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ member
/linux-4.4.14/drivers/message/fusion/
Dmptscsih.h101 u64 lun; member
118 u8 id, u64 lun, int ctx2abort, ulong timeout);
Dmptscsih.c98 u64 lun, int ctx2abort, ulong timeout);
540 ioc->name, pScsiReply->Bus, pScsiReply->TargetID, sc->device->lun); in mptscsih_info_scsiio()
698 sc->device->id, sc->device->lun, in mptscsih_io_done()
1082 struct scsi_lun lun; in mptscsih_search_running_cmds() local
1101 int_to_scsilun(vdevice->lun, &lun); in mptscsih_search_running_cmds()
1104 memcmp(lun.scsi_lun, mf->LUN, 8)) in mptscsih_search_running_cmds()
1159 ioc->name, 0, sc->device->id, sc->device->lun)); in mptscsih_report_queue_full()
1394 int_to_scsilun(SCpnt->device->lun, (struct scsi_lun *)pScsiReq->LUN); in mptscsih_qcmd()
1518 mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u64 lun, in mptscsih_IssueTaskMgmt() argument
1593 int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN); in mptscsih_IssueTaskMgmt()
[all …]
Dmptfc.c210 SCpnt->device->id, SCpnt->device->lun, in mptfc_block_error_handler()
224 SCpnt->device->id, SCpnt->device->lun, ready, in mptfc_block_error_handler()
231 SCpnt->device->id, SCpnt->device->lun)); in mptfc_block_error_handler()
640 vdevice->lun = sdev->lun; in mptfc_slave_alloc()
Dmptctl.h369 unsigned int lun; member
/linux-4.4.14/Documentation/target/
Dtcm_mod_builder.txt97 target:/mnt/sdb/lio-core-2.6.git# mkdir -p /sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun…
98 target:/mnt/sdb/lio-core-2.6.git# cd /sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0/
99 target:/sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0# ln -s /sys/kernel/config/target/…
101 target:/sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0# cd -
109 | |-- lun
/linux-4.4.14/arch/s390/include/asm/
Dipl.h52 u64 lun; member
131 u64 lun; member
/linux-4.4.14/drivers/scsi/cxlflash/
Dcommon.h186 static inline u64 lun_to_lunid(u64 lun) in lun_to_lunid() argument
190 int_to_scsilun(lun, (struct scsi_lun *)&lun_id); in lun_to_lunid()
Dlunmgt.c251 lli->lun_id[chan] = lun_to_lunid(sdev->lun); in cxlflash_manage_lun()
/linux-4.4.14/drivers/scsi/sym53c8xx_2/
Dsym_hipd.h581 #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL argument
583 #define sym_lp(tp, lun) \ argument
584 (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[((u8)lun)] : NULL
786 u_char lun; member
1065 int sym_clear_tasks(struct sym_hcb *np, int cam_status, int target, int lun, int task);
Dsym_hipd.c1659 struct sym_lcb *lp = sym_lp(tp, cp->lun);
2717 np->msgout[0] = IDENTIFY(0, cp->lun);
2978 sym_dequeue_from_squeue(struct sym_hcb *np, int i, int target, int lun, int task) argument
3001 (lun == -1 || cp->lun == lun) &&
3092 sym_dequeue_from_squeue(np, i, cp->target, cp->lun, -1);
3108 cp->scsi_smsg2[0] = IDENTIFY(0, cp->lun);
3140 if (cp->cmd->device->scsi_level <= SCSI_2 && cp->lun <= 7)
3141 cp->sensecmd[1] = cp->lun << 5;
3198 int sym_clear_tasks(struct sym_hcb *np, int cam_status, int target, int lun, int task) argument
3222 (lun != -1 && cp->lun != lun) ||
[all …]
Dsym_glue.c224 cp->target,cp->lun, -1); in sym_set_cam_result_error()
316 lp = sym_lp(tp, sdev->lun); in sym_queue_command()
715 static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags) in sym_tune_dev_queuing() argument
717 struct sym_lcb *lp = sym_lp(tp, lun); in sym_tune_dev_queuing()
745 if (sdev->id >= SYM_CONF_MAX_TARGET || sdev->lun >= SYM_CONF_MAX_LUN) in sym53c8xx_slave_alloc()
768 if (sdev->lun != 0) { in sym53c8xx_slave_alloc()
776 lp = sym_alloc_lcb(np, sdev->id, sdev->lun); in sym53c8xx_slave_alloc()
801 struct sym_lcb *lp = sym_lp(tp, sdev->lun); in sym53c8xx_slave_configure()
825 sym_tune_dev_queuing(tp, sdev->lun, reqtags); in sym53c8xx_slave_configure()
837 struct sym_lcb *lp = sym_lp(tp, sdev->lun); in sym53c8xx_slave_destroy()
[all …]
/linux-4.4.14/drivers/firewire/
Dsbp2.c138 u16 lun; member
769 static int sbp2_lun2int(u16 lun) in sbp2_lun2int() argument
774 eight_bytes_lun.scsi_lun[0] = (lun >> 8) & 0xff; in sbp2_lun2int()
775 eight_bytes_lun.scsi_lun[1] = lun & 0xff; in sbp2_lun2int()
833 SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) { in sbp2_login()
838 lu->lun); in sbp2_login()
856 lu->lun, lu->retries); in sbp2_login()
876 sdev = __scsi_add_device(shost, 0, 0, sbp2_lun2int(lu->lun), lu); in sbp2_login()
962 lu->lun, lu->retries); in sbp2_reconnect()
995 lu->lun = lun_entry & 0xffff; in sbp2_add_logical_unit()
[all …]
/linux-4.4.14/drivers/scsi/qla4xxx/
Dql4_iocb.c86 struct ddb_entry *ddb_entry, uint64_t lun, uint16_t mrkr_mod) in qla4xxx_send_marker_iocb() argument
107 int_to_scsilun(lun, &marker_entry->lun); in qla4xxx_send_marker_iocb()
328 int_to_scsilun(cmd->device->lun, &cmd_entry->lun); in qla4xxx_send_command_to_isp()
Dql4_isr.c32 cmd->device->lun, __func__)); in qla4xxx_copy_sense()
49 cmd->device->lun, __func__, in qla4xxx_copy_sense()
178 cmd->device->lun, __func__, in qla4xxx_status_entry()
202 cmd->device->id, cmd->device->lun, __func__)); in qla4xxx_status_entry()
210 cmd->device->id, cmd->device->lun, __func__)); in qla4xxx_status_entry()
218 cmd->device->id, cmd->device->lun)); in qla4xxx_status_entry()
238 cmd->device->lun, __func__)); in qla4xxx_status_entry()
266 cmd->device->lun, __func__, in qla4xxx_status_entry()
298 cmd->device->lun, __func__, in qla4xxx_status_entry()
319 cmd->device->lun, sts_entry->completionStatus)); in qla4xxx_status_entry()
[all …]
Dql4_glbl.h26 uint64_t lun);
79 struct ddb_entry *ddb_entry, uint64_t lun, uint16_t mrkr_mod);
/linux-4.4.14/drivers/scsi/device_handler/
Dscsi_dh_rdac.c148 u8 lun[8]; member
186 unsigned lun; member
329 lun_table[qdata->h->lun] = 0x81; in rdac_failover_get()
444 h->lun = inqp->lun[7]; /* Uses only the last byte */ in get_lun_info()
787 h->lun = UNINITIALIZED_LUN; in rdac_bus_attach()
808 RDAC_NAME, h->lun, mode[(int)h->mode], in rdac_bus_attach()
/linux-4.4.14/drivers/scsi/bfa/
Dbfa_fcpim.h207 struct scsi_lun lun; /* lun if applicable */ member
409 struct bfa_itnim_s *itnim, struct scsi_lun lun,
419 wwn_t *pwwn, wwn_t rpwwn, struct scsi_lun lun);
421 wwn_t *pwwn, wwn_t rpwwn, struct scsi_lun lun);
Dbfa_fcpim.c263 struct scsi_lun lun);
2280 wwn_t rpwwn, struct scsi_lun lun) in bfa_fcpim_lunmask_add() argument
2308 (scsilun_to_int((struct scsi_lun *)&lunm_list[i].lun) == in bfa_fcpim_lunmask_add()
2309 scsilun_to_int((struct scsi_lun *)&lun))) in bfa_fcpim_lunmask_add()
2327 lunm_list[free_index].lun = lun; in bfa_fcpim_lunmask_add()
2342 wwn_t rpwwn, struct scsi_lun lun) in bfa_fcpim_lunmask_delete() argument
2357 bfa_trc(bfa, scsilun_to_int((struct scsi_lun *)&lun)); in bfa_fcpim_lunmask_delete()
2375 (scsilun_to_int((struct scsi_lun *)&lunm_list[i].lun) == in bfa_fcpim_lunmask_delete()
2376 scsilun_to_int((struct scsi_lun *)&lun))) { in bfa_fcpim_lunmask_delete()
2379 int_to_scsilun(0, &lunm_list[i].lun); in bfa_fcpim_lunmask_delete()
[all …]
Dbfad_im.c329 int_to_scsilun(cmnd->device->lun, &scsilun); in bfad_im_reset_lun_handler()
927 scsilun_to_int(&lun_list[i].lun) == sdev->lun && in bfad_im_check_if_make_lun_visible()
958 if (sdev->lun == 0) { in bfad_im_slave_alloc()
Dbfad_bsg.h359 u32 lun; member
773 struct scsi_lun lun; member
/linux-4.4.14/drivers/target/loopback/
Dtcm_loop.c166 &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, in tcm_loop_submission_work()
194 sc->device->id, sc->device->channel, sc->device->lun, in tcm_loop_queuecommand()
217 u64 lun, int task, enum tcm_tmreq_table tmr) in tcm_loop_issue_tmr() argument
270 if (transport_lookup_tmr_lun(se_cmd, lun) < 0) { in tcm_loop_issue_tmr()
305 ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, in tcm_loop_abort_task()
326 ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, in tcm_loop_device_reset()
717 struct se_lun *lun) in tcm_loop_port_link() argument
727 scsi_add_device(tl_hba->sh, 0, tl_tpg->tl_tpgt, lun->unpacked_lun); in tcm_loop_port_link()
/linux-4.4.14/drivers/scsi/mvsas/
Dmv_sas.c1367 u8 *lun, struct mvs_tmf_task *tmf) in mvs_debug_issue_ssp_tmf() argument
1373 memcpy(ssp_task.LUN, lun, 8); in mvs_debug_issue_ssp_tmf()
1395 int mvs_lu_reset(struct domain_device *dev, u8 *lun) in mvs_lu_reset() argument
1405 rc = mvs_debug_issue_ssp_tmf(dev, lun, &tmf_task); in mvs_lu_reset()
1442 struct scsi_lun lun; in mvs_query_task() local
1452 int_to_scsilun(cmnd->device->lun, &lun); in mvs_query_task()
1462 rc = mvs_debug_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in mvs_query_task()
1479 struct scsi_lun lun; in mvs_abort_task() local
1506 int_to_scsilun(cmnd->device->lun, &lun); in mvs_abort_task()
1517 rc = mvs_debug_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in mvs_abort_task()
[all …]
Dmv_sas.h460 int mvs_abort_task_set(struct domain_device *dev, u8 *lun);
461 int mvs_clear_aca(struct domain_device *dev, u8 *lun);
462 int mvs_clear_task_set(struct domain_device *dev, u8 * lun);
467 int mvs_lu_reset(struct domain_device *dev, u8 *lun);
/linux-4.4.14/drivers/scsi/be2iscsi/
Dbe_main.h481 u8 lun[64]; member
757 u8 lun[14]; /* DWORD 0 */ member
803 u8 lun[16]; /* DWORD 1 */ member
875 u8 lun[64]; member
903 u8 lun[64]; /* lun or opcode-specific fields */ member
918 u8 lun[14]; /* DWORD 0 */ member
/linux-4.4.14/drivers/scsi/aacraid/
Dcommsup.c893 u32 channel, id, lun, container; in aac_handle_aif() local
906 container = channel = id = lun = (u32)-1; in aac_handle_aif()
933 lun = (container >> 16) & 0xFF; in aac_handle_aif()
943 channel, id, lun); in aac_handle_aif()
1069 lun = (container >> 16) & 0xFF; in aac_handle_aif()
1079 lun); in aac_handle_aif()
1111 lun = (container >> 16) & 0xFF; in aac_handle_aif()
1115 if ((0x2000 <= id) || lun || channel || in aac_handle_aif()
1119 lun = (id >> 4) & 7; in aac_handle_aif()
1212 lun = CONTAINER_TO_LUN(container); in aac_handle_aif()
[all …]
/linux-4.4.14/drivers/scsi/csiostor/
Dcsio_scsi.c95 ((uint64_t)scmnd->device->lun == sld->oslun)); in csio_scsi_match_io()
170 int_to_scsilun(scmnd->device->lun, &fcp_cmnd->fc_lun); in csio_scsi_fcp_cmnd()
187 int_to_scsilun(scmnd->device->lun, &fcp_cmnd->fc_lun); in csio_scsi_fcp_cmnd()
1638 scsi_get_resid(cmnd), cmnd->device->lun, in csio_scsi_err_handler()
1938 cmnd->device->lun, csio_q_physiqid(hw, ioreq->iq_idx)); in csio_eh_abort_handler()
1995 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
2001 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
2080 cmnd->device->lun, rn->flowid, rn->scsi_id); in csio_eh_lun_reset_handler()
2086 ln->vnp_flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
2106 rn->flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
[all …]
/linux-4.4.14/drivers/scsi/arcmsr/
Darcmsr_hba.c565 int target, lun; in arcmsr_message_isr_bh_fn() local
608 for (lun = 0; lun < ARCMSR_MAX_TARGETLUN; in arcmsr_message_isr_bh_fn()
609 lun++) { in arcmsr_message_isr_bh_fn()
613 0, target, lun); in arcmsr_message_isr_bh_fn()
617 0, target, lun); in arcmsr_message_isr_bh_fn()
1033 uint8_t id, lun; in arcmsr_report_ccb_state() local
1035 lun = ccb->pcmd->device->lun; in arcmsr_report_ccb_state()
1037 if (acb->devstate[id][lun] == ARECA_RAID_GONE) in arcmsr_report_ccb_state()
1038 acb->devstate[id][lun] = ARECA_RAID_GOOD; in arcmsr_report_ccb_state()
1044 acb->devstate[id][lun] = ARECA_RAID_GONE; in arcmsr_report_ccb_state()
[all …]
/linux-4.4.14/include/xen/interface/io/
Dvscsiif.h197 uint16_t channel, id, lun; /* (virtual) device specification */ member
/linux-4.4.14/drivers/scsi/ibmvscsi/
Dibmvscsi.c1028 return (0x2 << 14) | (dev->id << 8) | (dev->channel << 5) | dev->lun; in lun_from_dev()
1043 u16 lun = lun_from_dev(cmnd->device); in ibmvscsi_queuecommand_lck() local
1056 int_to_scsilun(lun, &srp_cmd->lun); in ibmvscsi_queuecommand_lck()
1492 u16 lun = lun_from_dev(cmd->device); in ibmvscsi_eh_abort_handler() local
1532 int_to_scsilun(lun, &tsk_mgmt->lun); in ibmvscsi_eh_abort_handler()
1559 (((u64) lun) << 48), (u64) found_evt); in ibmvscsi_eh_abort_handler()
1631 u16 lun = lun_from_dev(cmd->device); in ibmvscsi_eh_device_reset_handler() local
1655 int_to_scsilun(lun, &tsk_mgmt->lun); in ibmvscsi_eh_device_reset_handler()
1680 (((u64) lun) << 48)); in ibmvscsi_eh_device_reset_handler()
Dibmvfc.h347 struct scsi_lun lun; member
424 struct scsi_lun lun; member
510 u32 lun; member
/linux-4.4.14/drivers/scsi/libfc/
Dfc_fcp.c1022 unsigned int lun, int error) in fc_fcp_cleanup_each_cmd() argument
1036 if (lun != -1 && sc_cmd->device->lun != lun) in fc_fcp_cleanup_each_cmd()
1101 int_to_scsilun(fsp->cmd->device->lun, &fsp->cdb_cmd.fc_lun); in fc_fcp_pkt_send()
1277 unsigned int id, unsigned int lun) in fc_lun_reset() argument
1283 int_to_scsilun(lun, &fsp->cdb_cmd.fc_lun); in fc_lun_reset()
1319 FC_SCSI_DBG(lport, "lun reset to lun %u completed\n", lun); in fc_lun_reset()
1320 fc_fcp_cleanup_each_cmd(lport, id, lun, FC_CMD_ABORTED); in fc_lun_reset()
2122 rc = fc_lun_reset(lport, fsp, scmd_id(sc_cmd), sc_cmd->device->lun); in fc_eh_device_reset()
/linux-4.4.14/drivers/scsi/bnx2i/
D57xx_iscsi_hsi.h44 u32 lun[2]; member
231 u32 lun[2]; member
1126 u32 lun[2]; member
1169 u32 lun[2]; member
1285 u32 lun[2]; member
1348 u32 lun[2]; member
1491 u32 lun[2]; member
Dbnx2i_hwi.c439 memcpy(scsi_lun, &tmfabort_hdr->lun, sizeof(struct scsi_lun)); in bnx2i_send_iscsi_tmf()
440 tmfabort_wqe->lun[0] = be32_to_cpu(scsi_lun[0]); in bnx2i_send_iscsi_tmf()
441 tmfabort_wqe->lun[1] = be32_to_cpu(scsi_lun[1]); in bnx2i_send_iscsi_tmf()
556 memcpy(nopout_wqe->lun, &nopout_hdr->lun, 8); in bnx2i_send_iscsi_nopout()
559 u32 tmp = nopout_wqe->lun[0]; in bnx2i_send_iscsi_nopout()
561 nopout_wqe->lun[0] = nopout_wqe->lun[1]; in bnx2i_send_iscsi_nopout()
562 nopout_wqe->lun[1] = tmp; in bnx2i_send_iscsi_nopout()
1739 memcpy(&hdr->lun, nop_in->lun, 8); in bnx2i_process_nopin_mesg()
1782 memcpy(&resp_hdr->lun, async_cqe->lun, 8); in bnx2i_process_async_mesg()
/linux-4.4.14/drivers/scsi/dpt/
Ddpti_ioctl.h134 uLONG lun; member
/linux-4.4.14/Documentation/ABI/testing/
Dconfigfs-usb-gadget-mass-storage14 What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name
/linux-4.4.14/drivers/scsi/ufs/
Dufshcd.c1144 lrbp->lun, lrbp->task_tag); in ufshcd_prepare_utp_scsi_cmd_upiu()
1176 lrbp->lun, lrbp->task_tag); in ufshcd_prepare_utp_query_req_upiu()
1344 lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); in ufshcd_queuecommand()
1373 lrbp->lun = 0; /* device management cmd is not specific to any LUN */ in ufshcd_compose_dev_cmd()
1895 int lun, in ufshcd_read_unit_desc_param() argument
1904 if (lun != UFS_UPIU_RPMB_WLUN && (lun >= UFS_UPIU_MAX_GENERAL_LUN)) in ufshcd_read_unit_desc_param()
1907 return ufshcd_read_desc_param(hba, QUERY_DESC_IDN_UNIT, lun, in ufshcd_read_unit_desc_param()
2830 ufshcd_scsi_to_upiu_lun(sdev->lun), in ufshcd_set_queue_depth()
2861 u8 lun, in ufshcd_get_lu_wp() argument
2873 else if (lun >= UFS_UPIU_MAX_GENERAL_LUN) in ufshcd_get_lu_wp()
[all …]
/linux-4.4.14/arch/s390/kernel/
Dipl.c471 DEFINE_IPL_ATTR_RO(ipl_fcp, lun, "0x%016llx\n", (unsigned long long)
472 IPL_PARMBLOCK_START->ipl_info.fcp.lun);
750 DEFINE_IPL_ATTR_RW(reipl_fcp, lun, "0x%016llx\n", "%llx\n",
751 reipl_block_fcp->ipl_info.fcp.lun);
1335 DEFINE_IPL_ATTR_RW(dump_fcp, lun, "0x%016llx\n", "%llx\n",
1336 dump_block_fcp->ipl_info.fcp.lun);
1969 ipl_info.data.fcp.lun = IPL_PARMBLOCK_START->ipl_info.fcp.lun; in setup_ipl()
/linux-4.4.14/drivers/scsi/megaraid/
Dmega_common.h207 #define SCP2LUN(scp) (u32)(scp)->device->lun // to LUN
/linux-4.4.14/drivers/firmware/
Dedd.c198 info->params.device_path.atapi.lun); in edd_show_interface()
205 info->params.device_path.scsi.lun); in edd_show_interface()
215 info->params.device_path.fibre.lun); in edd_show_interface()
Discsi_ibft.c144 char lun[8]; member
380 str += sprintf(str, "%x", (u8)tgt->lun[i]); in ibft_attr_show_target()
/linux-4.4.14/drivers/scsi/pcmcia/
Dnsp_cs.c198 SCpnt, target, SCpnt->device->lun, scsi_sglist(SCpnt), in nsp_queuecommand_lck()
960 unsigned char target, lun; in nspintr() local
1055 lun = tmpSC->device->lun; in nspintr()
1224 data->MsgBuffer[i] = IDENTIFY(TRUE, lun); i++; in nspintr()
/linux-4.4.14/drivers/infiniband/ulp/srpt/
Dib_srpt.c1618 static uint64_t srpt_unpack_lun(const uint8_t *lun, int len) in srpt_unpack_lun() argument
1631 if ((*((__be64 *)lun) & in srpt_unpack_lun()
1636 if (*((__be16 *)&lun[2]) != 0) in srpt_unpack_lun()
1640 if (*((__be32 *)&lun[2]) != 0) in srpt_unpack_lun()
1649 addressing_method = (*lun) >> 6; /* highest two bits of byte 0 */ in srpt_unpack_lun()
1654 res = *(lun + 1) | (((*lun) & 0x3f) << 8); in srpt_unpack_lun()
1724 unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_cmd->lun, in srpt_handle_cmd()
1725 sizeof(srp_cmd->lun)); in srpt_handle_cmd()
1789 unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_tsk->lun, in srpt_handle_tsk_mgmt()
1790 sizeof(srp_tsk->lun)); in srpt_handle_tsk_mgmt()
/linux-4.4.14/Documentation/scsi/
Dlibsas.txt178 int (*lldd_abort_task_set)(struct domain_device *, u8 *lun);
179 int (*lldd_clear_aca)(struct domain_device *, u8 *lun);
180 int (*lldd_clear_task_set)(struct domain_device *, u8 *lun);
182 int (*lldd_lu_reset)(struct domain_device *, u8 *lun);
Dbnx2fc.txt66 create/destroy interfaces or to display lun/target information.
/linux-4.4.14/Documentation/filesystems/
Dbfs.txt40 (assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you
/linux-4.4.14/drivers/scsi/bnx2fc/
Dbnx2fc_io.c1393 u64 tm_lun = sc_cmd->device->lun; in bnx2fc_lun_reset_cmpl()
1394 u64 lun; in bnx2fc_lun_reset_cmpl() local
1405 lun = cmd->sc_cmd->device->lun; in bnx2fc_lun_reset_cmpl()
1406 if (lun == tm_lun) { in bnx2fc_lun_reset_cmpl()
1670 int_to_scsilun(sc_cmd->device->lun, &fcp_cmnd->fc_lun); in bnx2fc_build_fcp_cmnd()
/linux-4.4.14/drivers/usb/image/
Dmicrotek.c583 if ( srb->device->lun || srb->device->id || srb->device->channel ) { in mts_scsi_queuecommand_lck()
585 …MTS_DEBUG("Command to LUN=%d ID=%d CHANNEL=%d from SCSI layer\n",(int)srb->device->lun,(int)srb->d… in mts_scsi_queuecommand_lck()
/linux-4.4.14/drivers/target/sbp/
Dsbp_target.c1826 struct se_lun *lun; in sbp_count_se_tpg_luns() local
1830 hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) in sbp_count_se_tpg_luns()
1839 struct se_lun *lun; in sbp_update_unit_directory() local
1903 hlist_for_each_entry_rcu(lun, &tport->tpg->se_tpg.tpg_lun_hlist, link) { in sbp_update_unit_directory()
1910 dev = rcu_dereference_raw(lun->lun_se_dev); in sbp_update_unit_directory()
1916 (lun->unpacked_lun & 0xffff); in sbp_update_unit_directory()
/linux-4.4.14/arch/ia64/hp/sim/
Dsimscsi.c222 if (target_id <= 15 && sc->device->lun == 0) { in simscsi_queuecommand_lck()
/linux-4.4.14/Documentation/usb/
Dgadget-testing.txt261 and a default lun.0 directory corresponding to SCSI LUN #0.
263 A new lun can be added with mkdir:
267 Lun numbering does not have to be continuous, except for lun #0 which is
270 Probably a good convention is to name the luns "lun.<number>",
273 In each lun directory there are the following attribute files:

12