Home
last modified time | relevance | path

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

12

/linux-4.1.27/drivers/target/
Dtarget_core_tpg.c60 struct se_lun *lun; in core_clear_initiator_node_from_tpg() local
76 lun = deve->se_lun; in core_clear_initiator_node_from_tpg()
78 core_disable_device_list_for_node(lun, NULL, deve->mapped_lun, in core_clear_initiator_node_from_tpg()
132 struct se_lun *lun; in core_tpg_add_node_to_devs() local
137 lun = tpg->tpg_lun_list[i]; in core_tpg_add_node_to_devs()
138 if (lun->lun_status != TRANSPORT_LUN_STATUS_ACTIVE) in core_tpg_add_node_to_devs()
143 dev = lun->lun_se_dev; in core_tpg_add_node_to_devs()
164 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_tpg_add_node_to_devs()
168 core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, in core_tpg_add_node_to_devs()
175 core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, in core_tpg_add_node_to_devs()
[all …]
Dtarget_core_stat.c295 DEV_STAT_SCSI_LU_ATTR_RO(lun);
545 struct se_lun *lun = container_of(pgrps, struct se_lun, port_stat_grps); in target_stat_scsi_port_show_attr_inst() local
547 struct se_device *dev = lun->lun_se_dev; in target_stat_scsi_port_show_attr_inst()
551 spin_lock(&lun->lun_sep_lock); in target_stat_scsi_port_show_attr_inst()
552 sep = lun->lun_sep; in target_stat_scsi_port_show_attr_inst()
554 spin_unlock(&lun->lun_sep_lock); in target_stat_scsi_port_show_attr_inst()
559 spin_unlock(&lun->lun_sep_lock); in target_stat_scsi_port_show_attr_inst()
567 struct se_lun *lun = container_of(pgrps, struct se_lun, port_stat_grps); in target_stat_scsi_port_show_attr_dev() local
569 struct se_device *dev = lun->lun_se_dev; in target_stat_scsi_port_show_attr_dev()
572 spin_lock(&lun->lun_sep_lock); in target_stat_scsi_port_show_attr_dev()
[all …]
Dtarget_core_fabric_configfs.c80 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_link() local
88 if (lun->lun_link_magic != SE_LUN_LINK_MAGIC) { in target_fabric_mappedlun_link()
90 " %p to struct lun: %p\n", lun_ci, lun); in target_fabric_mappedlun_link()
96 if (!lun->lun_sep || !lun->lun_sep->sep_tpg) { in target_fabric_mappedlun_link()
101 se_tpg = lun->lun_sep->sep_tpg; in target_fabric_mappedlun_link()
145 lun->unpacked_lun, lun_access); in target_fabric_mappedlun_link()
154 struct se_lun *lun; in target_fabric_mappedlun_unlink() local
166 lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); in target_fabric_mappedlun_unlink()
167 se_tpg = lun->lun_sep->sep_tpg; in target_fabric_mappedlun_unlink()
169 core_dev_del_initiator_node_lun_acl(se_tpg, lun, lacl); in target_fabric_mappedlun_unlink()
[all …]
Dtarget_core_device.c199 struct se_lun *lun; in core_get_se_deve_from_rtpi() local
211 lun = deve->se_lun; in core_get_se_deve_from_rtpi()
212 if (!lun) { in core_get_se_deve_from_rtpi()
218 port = lun->lun_sep; in core_get_se_deve_from_rtpi()
243 struct se_lun *lun; in core_free_device_list_for_node() local
262 lun = deve->se_lun; in core_free_device_list_for_node()
265 core_disable_device_list_for_node(lun, NULL, deve->mapped_lun, in core_free_device_list_for_node()
301 struct se_lun *lun, in core_enable_device_list_for_node() argument
308 struct se_port *port = lun->lun_sep; in core_enable_device_list_for_node()
328 if (deve->se_lun != lun) { in core_enable_device_list_for_node()
[all …]
Dtarget_core_alua.c699 struct se_lun *lun = cmd->se_lun; in target_alua_state_check() local
700 struct se_port *port = lun->lun_sep; in target_alua_state_check()
2017 struct se_lun *lun; in core_alua_store_tg_pt_gp_info() local
2025 lun = port->sep_lun; in core_alua_store_tg_pt_gp_info()
2067 config_item_name(&lun->lun_group.cg_item), in core_alua_store_tg_pt_gp_info()
2094 config_item_name(&lun->lun_group.cg_item), in core_alua_store_tg_pt_gp_info()
2270 ssize_t core_alua_show_offline_bit(struct se_lun *lun, char *page) in core_alua_show_offline_bit() argument
2272 if (!lun->lun_sep) in core_alua_show_offline_bit()
2276 atomic_read(&lun->lun_sep->sep_tg_pt_secondary_offline)); in core_alua_show_offline_bit()
2280 struct se_lun *lun, in core_alua_store_offline_bit() argument
[all …]
Dtarget_core_pscsi.c318 sd->lun, sd->queue_depth); in pscsi_add_device_to_list()
380 sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_disk()
406 phv->phv_host_id, sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_disk()
422 sh->host_no, sd->channel, sd->id, sd->lun); in pscsi_create_type_rom()
435 sd->channel, sd->id, sd->lun); in pscsi_create_type_rom()
458 sd->channel, sd->id, sd->lun); in pscsi_create_type_other()
538 (pdv->pdv_lun_id != sd->lun)) in pscsi_configure_device()
Dtarget_core_transport.c638 struct se_lun *lun = cmd->se_lun; in transport_lun_remove_cmd() local
640 if (!lun) in transport_lun_remove_cmd()
644 percpu_ref_put(&lun->lun_ref); in transport_lun_remove_cmd()
2650 struct se_lun *lun = p; in transport_clear_lun_ref_thread() local
2652 percpu_ref_kill(&lun->lun_ref); in transport_clear_lun_ref_thread()
2654 wait_for_completion(&lun->lun_ref_comp); in transport_clear_lun_ref_thread()
2655 complete(&lun->lun_shutdown_comp); in transport_clear_lun_ref_thread()
2660 int transport_clear_lun_ref(struct se_lun *lun) in transport_clear_lun_ref() argument
2664 kt = kthread_run(transport_clear_lun_ref_thread, lun, in transport_clear_lun_ref()
2665 "tcm_cl_%u", lun->unpacked_lun); in transport_clear_lun_ref()
[all …]
Dtarget_core_spc.c72 struct se_lun *lun = cmd->se_lun; in spc_emulate_inquiry_std() local
97 spc_fill_alua_data(lun->lun_sep, buf); in spc_emulate_inquiry_std()
183 struct se_lun *lun = cmd->se_lun; in spc_emulate_evpd_83() local
273 port = lun->lun_sep; in spc_emulate_evpd_83()
Dtarget_core_pr.c900 struct se_lun *lun, in __core_scsi3_check_aptpl_registration() argument
938 pr_reg->pr_reg_tg_pt_lun = lun; in __core_scsi3_check_aptpl_registration()
971 struct se_lun *lun, in core_scsi3_check_aptpl_registration() argument
980 return __core_scsi3_check_aptpl_registration(dev, tpg, lun, in core_scsi3_check_aptpl_registration()
981 lun->unpacked_lun, nacl, deve); in core_scsi3_check_aptpl_registration()
1824 struct se_lun *lun; in core_scsi3_update_aptpl_buf() local
1843 lun = pr_reg->pr_reg_tg_pt_lun; in core_scsi3_update_aptpl_buf()
1895 lun->lun_sep->sep_rtpi, lun->unpacked_lun, reg_count); in core_scsi3_update_aptpl_buf()
Dtarget_core_configfs.c865 struct se_lun *lun; in target_core_dev_pr_show_attr_res_pr_holder_tg_port() local
880 lun = pr_reg->pr_reg_tg_pt_lun; in target_core_dev_pr_show_attr_res_pr_holder_tg_port()
888 " %s Logical Unit: %u\n", lun->lun_sep->sep_rtpi, in target_core_dev_pr_show_attr_res_pr_holder_tg_port()
890 tfo->get_fabric_name(), lun->unpacked_lun); in target_core_dev_pr_show_attr_res_pr_holder_tg_port()
2344 struct se_lun *lun; in target_core_alua_tg_pt_gp_show_attr_members() local
2356 lun = port->sep_lun; in target_core_alua_tg_pt_gp_show_attr_members()
2362 config_item_name(&lun->lun_group.cg_item)); in target_core_alua_tg_pt_gp_show_attr_members()
/linux-4.1.27/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.c3819 unsigned int lun = SCSI_LUN(srb); in ms_rw_multi_sector() local
3854 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT); in ms_rw_multi_sector()
3871 set_sense_type(chip, lun, in ms_rw_multi_sector()
3887 set_sense_type(chip, lun, in ms_rw_multi_sector()
3897 set_sense_type(chip, lun, in ms_rw_multi_sector()
3907 set_sense_type(chip, lun, in ms_rw_multi_sector()
3912 set_sense_type(chip, lun, in ms_rw_multi_sector()
3925 set_sense_type(chip, lun, in ms_rw_multi_sector()
3930 set_sense_type(chip, lun, in ms_rw_multi_sector()
3939 set_sense_type(chip, lun, in ms_rw_multi_sector()
[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.c1986 unsigned int lun = SCSI_LUN(srb); in xd_rw() local
2015 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT); in xd_rw()
2029 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_NOT_PRESENT); in xd_rw()
2047 set_sense_type(chip, lun, in xd_rw()
2064 set_sense_type(chip, lun, in xd_rw()
2074 set_sense_type(chip, lun, in xd_rw()
2085 set_sense_type(chip, lun, in xd_rw()
2090 set_sense_type(chip, lun, in xd_rw()
2103 set_sense_type(chip, lun, in xd_rw()
2108 set_sense_type(chip, lun, in xd_rw()
[all …]
Dsd.c4234 unsigned int lun = SCSI_LUN(srb); in sd_pass_thru_mode() local
4259 if (!(CHK_BIT(chip->lun_mc, lun))) { in sd_pass_thru_mode()
4260 SET_BIT(chip->lun_mc, lun); in sd_pass_thru_mode()
4261 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_CHANGE); in sd_pass_thru_mode()
4270 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD); in sd_pass_thru_mode()
4285 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD); in sd_pass_thru_mode()
4347 unsigned int lun = SCSI_LUN(srb); in sd_execute_no_data() local
4354 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD); in sd_execute_no_data()
4367 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_CHANGE); in sd_execute_no_data()
4384 set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD); in sd_execute_no_data()
[all …]
Drtsx.h93 #define SCSI_LUN(srb) ((srb)->device->lun)
Drtsx.c458 (u8)chip->srb->device->lun); in rtsx_control_thread()
462 else if (chip->srb->device->lun > chip->max_lun) { in rtsx_control_thread()
465 (u8)chip->srb->device->lun); in rtsx_control_thread()
/linux-4.1.27/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()
2755 void fsg_common_remove_lun(struct fsg_lun *lun) in fsg_common_remove_lun() argument
2757 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.1.27/drivers/scsi/
Dscsi_scan.c210 u64 lun, void *hostdata) in scsi_alloc_sdev() argument
229 sdev->lun = lun; in scsi_alloc_sdev()
818 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun()
821 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun()
1046 u64 lun, int *bflagsp, in scsi_probe_and_add_lun() argument
1059 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun()
1078 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun()
1109 if (lun == 0) { in scsi_probe_and_add_lun()
1148 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun()
1200 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.c420 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument
424 (lun & NCR_700_LUN_MASK); in NCR_700_identify()
785 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local
789 lun = SCp->device->lun; in process_extended_message()
834 host->host_no, pun, lun); in process_extended_message()
845 host->host_no, pun, lun, in process_extended_message()
868 __u8 pun = 0xff, lun = 0xff; in process_message() local
872 lun = SCp->device->lun; in process_message()
876 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message()
910 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.c1104 u64 lun) in __scsi_device_lookup_by_target() argument
1111 if (sdev->lun ==lun) in __scsi_device_lookup_by_target()
1129 u64 lun) in scsi_device_lookup_by_target() argument
1136 sdev = __scsi_device_lookup_by_target(starget, lun); in scsi_device_lookup_by_target()
1162 uint channel, uint id, u64 lun) in __scsi_device_lookup() argument
1168 sdev->lun ==lun) in __scsi_device_lookup()
1188 uint channel, uint id, u64 lun) in scsi_device_lookup() argument
1194 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 …]
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 …]
Dstorvsc_drv.c187 u8 lun; member
402 uint lun; member
408 uint lun; in storvsc_device_scan() local
412 lun = wrk->lun; in storvsc_device_scan()
414 sdev = scsi_device_lookup(wrk->host, 0, 0, lun); in storvsc_device_scan()
472 sdev = scsi_device_lookup(wrk->host, 0, 0, wrk->lun); in storvsc_remove_lun()
1094 wrk->lun = vm_srb->lun; in storvsc_handle_error()
1611 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
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 …]
Dhpsa.c859 unsigned char scsi3addr[], int bus, int *target, int *lun) in hpsa_find_target_lun() argument
878 *lun = 0; in hpsa_find_target_lun()
902 if (device->lun != -1) in hpsa_scsi_add_entry()
913 device->bus, &device->target, &device->lun) != 0) in hpsa_scsi_add_entry()
934 device->lun = device->scsi3addr[4]; in hpsa_scsi_add_entry()
938 if (device->lun == -1) { in hpsa_scsi_add_entry()
959 device->bus, device->target, device->lun); in hpsa_scsi_add_entry()
994 new_entry->target, new_entry->lun); in hpsa_scsi_update_entry()
1014 new_entry->lun = h->dev[entry]->lun; in hpsa_scsi_replace_entry()
1022 new_entry->target, new_entry->lun); in hpsa_scsi_replace_entry()
[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.h334 u8 lun; member
336 (((res_addr).bus << 16) | ((res_addr).target << 8) | (res_addr).lun)
429 __be64 lun; member
1283 u32 lun; member
1289 (((res)->bus << 24) | ((res)->target << 8) | (res)->lun)
1764 #define ipr_res_printk(level, ioa_cfg, bus, target, lun, fmt, ...) \ argument
1766 bus, target, lun, ##__VA_ARGS__)
1769 ipr_res_printk(KERN_ERR, ioa_cfg, (res)->bus, (res)->target, (res)->lun, fmt, ##__VA_ARGS__)
1773 (ra).bus, (ra).target, (ra).lun, ##__VA_ARGS__)
1785 (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()
995 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()
2116 hdr->lun = task->lun; in iscsi_prep_abort_task_pdu()
2257 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()
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
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()
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 …]
Dstex.c217 u8 lun; member
229 u8 lun; member
561 unsigned int id, lun; in stex_queuecommand_lck() local
567 lun = cmd->device->lun; in stex_queuecommand_lck()
609 if (lun >= host->max_lun) { in stex_queuecommand_lck()
616 if (!lun && !cmd->device->channel && in stex_queuecommand_lck()
657 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()
1234 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in scsi_sysfs_device_initialize()
1240 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in scsi_sysfs_device_initialize()
Daha1740.h114 u16 lun:3, /* Logical Unit */ member
Dwd719x.h35 u8 lun; /* 06 SCSI LUN */ member
Dscsi_debug.c588 u64 lun; member
1291 have_wlun = (scp->device->lun == SAM2_WLUN_REPORT_LUNS); in resp_inquiry()
1294 else if (scsi_debug_no_lun_0 && (0 == devip->lun)) in resp_inquiry()
1313 (devip->target * 1000) + devip->lun); in resp_inquiry()
3329 u64 lun; in resp_report_luns() local
3362 for (i = 0, lun = (scsi_debug_no_lun_0 ? 1 : 0); in resp_report_luns()
3364 i++, lun++) { in resp_report_luns()
3365 upper = (lun >> 8) & 0x3f; in resp_report_luns()
3369 one_lun[i].scsi_lun[1] = lun & 0xff; in resp_report_luns()
3593 (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()
Dscsi_transport_sas.c1589 int lun; in sas_rphy_add() local
1592 lun = SCAN_WILD_CARD; in sas_rphy_add()
1594 lun = 0; in sas_rphy_add()
1596 scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id, lun, 0); in sas_rphy_add()
1708 uint id, u64 lun) in sas_user_scan() argument
1722 rphy->scsi_target_id, lun, 1); in sas_user_scan()
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()
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()
Ddpt_i2o.c460 …pt_find_device(pHba, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->lun)) == NULL) { in adpt_queue_lck()
1163 static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u64 lun) in adpt_find_device() argument
1181 if(d->scsi_lun == lun){ in adpt_find_device()
1187 if(d->scsi_lun == lun){ in adpt_find_device()
2410 …pHba->name, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->lun, hba_status, dev_sta… in adpt_i2o_to_scsi()
2450 …iled_status & I2O_SCSI_DSC_MASK, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->lun, in adpt_i2o_to_scsi()
2467 pHba->name, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->lun, in adpt_i2o_to_scsi()
2479 pHba->name, (u32)cmd->device->channel, (u32)cmd->device->id, cmd->device->lun, in adpt_i2o_to_scsi()
Dips.c1085 SC->device->channel, SC->device->id, SC->device->lun); in ips_queue_lck()
1506 (SC->device->lun == 0) && scsi_sglist(SC)) { in ips_is_passthru()
1862 scb->lun = scb->scsi_cmd->device->lun; in ips_flash_firmware()
1931 scb->lun = scb->scsi_cmd->device->lun; in ips_usrcmd()
2668 scb->lun = SC->device->lun; in ips_next()
3279 scb->scsi_cmd->device->id, scb->scsi_cmd->device->lun, in ips_map_status()
3881 scb->bus, scb->target_id, scb->lun); in ips_chkstatus()
5304 scb->bus, scb->target_id, scb->lun); in ips_issue_copperhead()
5358 scb->bus, scb->target_id, scb->lun); in ips_issue_copperhead_memio()
5409 scb->bus, scb->target_id, scb->lun); in ips_issue_i2o()
[all …]
Daha152x.c290 (cmd) ? ((u8)(cmd)->device->lun & 0x07) : -1
671 static inline Scsi_Cmnd *remove_lun_SC(Scsi_Cmnd ** SC, int target, int lun) in remove_lun_SC() argument
676 ptr && ((ptr->device->id != target) || (ptr->device->lun != lun)); in remove_lun_SC()
1539 ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); in seldo_run()
1844 ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); in msgo_init()
2498 ptr, ptr->device->id, (u8)ptr->device->lun); in get_command()
/linux-4.1.27/drivers/usb/storage/
Drealtek_cr.c75 #define SET_LUN_READY(chip, lun) ((chip)->lun_ready |= ((u8)1 << (lun))) argument
76 #define CLR_LUN_READY(chip, lun) ((chip)->lun_ready &= ~((u8)1 << (lun))) argument
77 #define TST_LUN_READY(chip, lun) ((chip)->lun_ready & ((u8)1 << (lun))) argument
125 #define SCSI_LUN(srb) ((srb)->device->lun)
209 static int rts51x_bulk_transport(struct us_data *us, u8 lun, in rts51x_bulk_transport() argument
225 bcb->Lun = lun; in rts51x_bulk_transport()
296 static int rts51x_bulk_transport_special(struct us_data *us, u8 lun, in rts51x_bulk_transport_special() argument
311 bcb->Lun = lun; in rts51x_bulk_transport_special()
425 u8 lun, u8 *status, int len, int *actlen) in rts51x_read_status() argument
435 usb_stor_dbg(us, "lun = %d\n", lun); in rts51x_read_status()
[all …]
Ddatafab.c70 signed char lun; /* used for dual-slot readers */ member
164 if (info->lun == -1) { in datafab_read_data()
194 command[5] = 0xE0 + (info->lun << 4); in datafab_read_data()
248 if (info->lun == -1) { in datafab_write_data()
282 command[5] = 0xE0 + (info->lun << 4); in datafab_write_data()
359 info->lun = 0; in datafab_determine_lun()
374 info->lun = 1; in datafab_determine_lun()
404 if (info->lun == -1) { in datafab_id_device()
415 command[5] += (info->lun << 4); in datafab_id_device()
572 ((struct datafab_info *)us->extra)->lun = -1; in datafab_transport()
Dsddr09.c1500 usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); in dpcm_transport()
1502 switch (srb->device->lun) { in dpcm_transport()
1520 srb->device->lun = 0; in dpcm_transport()
1522 srb->device->lun = 1; in dpcm_transport()
1526 usb_stor_dbg(us, "Invalid LUN %d\n", (u8)srb->device->lun); in dpcm_transport()
Dusb.c352 us->srb->device->lun); in usb_stor_control_thread()
356 else if (us->srb->device->lun > us->max_lun) { in usb_stor_control_thread()
359 us->srb->device->lun); in usb_stor_control_thread()
/linux-4.1.27/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.1.27/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.1.27/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.1.27/drivers/block/paride/
Dpf.c236 int lun; member
293 pf->lun = (*drives[unit])[D_LUN]; in pf_init_units()
480 { ATAPI_REQ_SENSE, pf->lun << 5, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 }; in pf_req_sense()
510 char lo_cmd[12] = { ATAPI_LOCK, pf->lun << 5, 0, 0, func, 0, 0, 0, 0, 0, 0, 0 }; in pf_lock()
517 char ej_cmd[12] = { ATAPI_DOOR, pf->lun << 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 }; in pf_eject()
570 { ATAPI_MODE_SENSE, pf->lun << 5, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0 }; in pf_mode_sense()
605 char rc_cmd[12] = { ATAPI_CAPACITY, pf->lun << 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; in pf_get_capacity()
620 pf->name, pf->drive, pf->lun, bs); in pf_get_capacity()
630 { ATAPI_IDENTIFY, pf->lun << 5, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0 }; in pf_identify()
641 pf->name, pf->drive, pf->lun, dt); in pf_identify()
[all …]
/linux-4.1.27/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.1.27/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.1.27/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.1.27/drivers/staging/unisys/virthba/
Dvirthba.c162 u32 channel, id, lun; /* Disk Path */ member
200 u32 channel, id, lun; /* Disk Path */ member
338 sdev = scsi_device_lookup(dar->shost, dar->channel, dar->id, dar->lun); in send_disk_add_remove()
345 dar->lun); in send_disk_add_remove()
389 dar->lun = cmdrsp->disknotify.lun; in process_disk_notify()
629 cmdrsp->vdiskmgmt.vdest.lun = vdest->lun; in forward_vdiskmgmt_command()
680 cmdrsp->scsitaskmgmt.vdest.lun = scsidev->lun; in forward_taskmgmt_command()
712 (scsidev->lun == vdisk->lun)) { in virthba_abort_handler()
738 (scsidev->lun == vdisk->lun)) { in virthba_bus_reset_handler()
764 (scsidev->lun == vdisk->lun)) { in virthba_device_reset_handler()
[all …]
/linux-4.1.27/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.1.27/drivers/staging/i2o/
Di2o_scsi.c81 u64 lun; /* lun's used for block devices */ member
141 i2o_shost->lun = 1; in i2o_scsi_host_alloc()
220 u64 lun = -1; in i2o_scsi_probe() local
244 lun = in i2o_scsi_probe()
246 lun++); in i2o_scsi_probe()
248 lun = 0; in i2o_scsi_probe()
258 if (i2o_parm_field_get(i2o_dev, 0x0000, 4, &lun, 8)) in i2o_scsi_probe()
289 if (le64_to_cpu(lun) >= scsi_host->max_lun) { in i2o_scsi_probe()
291 le64_to_cpu(lun), scsi_host->max_lun); in i2o_scsi_probe()
297 le64_to_cpu(lun), i2o_dev); in i2o_scsi_probe()
[all …]
/linux-4.1.27/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.h397 static inline int scsi_is_wlun(u64 lun) in scsi_is_wlun() argument
399 return (lun & 0xff00) == SCSI_W_LUN_BASE; in scsi_is_wlun()
541 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ argument
543 ((lun) & 0x07))
Dsrp.h182 __be64 lun __attribute__((packed)); member
203 __be64 lun __attribute__((packed)); member
268 __be64 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.h102 u64 lun; member
323 uint target, u64 lun);
411 unsigned int id, u64 lun, int rescan);
Dsg.h108 int lun; member
/linux-4.1.27/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.c1355 int lun, u_int tag, role_t role, uint32_t status) in ahc_platform_abort_scbs() argument
1404 sdev->sdev_target->id, sdev->lun, in ahc_linux_device_queue_depth()
1412 devinfo.lun, AC_TRANSFER_NEG); in ahc_linux_device_queue_depth()
1418 devinfo.lun, AC_TRANSFER_NEG); in ahc_linux_device_queue_depth()
1482 hscb->lun = cmd->device->lun; in ahc_linux_run_command()
1609 u_int target, u_int lun, ac_code code) in ahc_send_async() argument
1674 WARN_ON(lun != CAM_LUN_WILDCARD); in ahc_send_async()
1822 sdev->sdev_target->id, sdev->lun, in ahc_linux_handle_scsi_status()
2102 (u8)cmd->device->lun); in ahc_linux_queue_recovery_cmd()
2110 (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()
1489 int lun, u_int tag, role_t role, uint32_t status) in ahd_platform_abort_scbs() argument
1537 sdev->sdev_target->id, sdev->lun, in ahd_linux_device_queue_depth()
1545 devinfo.lun, AC_TRANSFER_NEG); in ahd_linux_device_queue_depth()
1551 devinfo.lun, AC_TRANSFER_NEG); in ahd_linux_device_queue_depth()
1584 cmd->device->lun); in ahd_linux_run_command()
1603 hscb->lun = cmd->device->lun; in ahd_linux_run_command()
1689 u_int target, u_int lun, ac_code code) in ahd_send_async() argument
1756 WARN_ON(lun != CAM_LUN_WILDCARD); in ahd_send_async()
1891 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.1.27/drivers/block/
Dcciss_scsi.c350 find_bus_target_lun(ctlr_info_t *h, int *bus, int *target, int *lun) in find_bus_target_lun() argument
365 *bus = 0; *target=i; *lun = 0; found=1; in find_bus_target_lun()
373 int bus, target, lun; member
384 int i, bus, target, lun; in cciss_scsi_add_entry() local
394 lun = 0; in cciss_scsi_add_entry()
412 lun = device->scsi3addr[4]; in cciss_scsi_add_entry()
419 if (lun == 0) { in cciss_scsi_add_entry()
421 &sd->bus, &sd->target, &sd->lun) != 0) in cciss_scsi_add_entry()
426 sd->lun = lun; in cciss_scsi_add_entry()
430 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.1.27/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.c356 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_queue_wq_copy_desc()
1558 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_rport_exch_reset()
1707 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_terminate_rport_io()
1778 rport->port_id, sc->device->lun, tag, CMD_FLAGS(sc)); in fnic_abort_cmd()
1838 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_abort_cmd()
1979 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_queue_dr_io_req()
2088 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_clean_pending_aborts()
2247 rport->port_id, sc->device->lun, sc); in fnic_device_reset()
2353 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_device_reset()
/linux-4.1.27/drivers/vhost/
Dscsi.c742 unsigned char *cdb, u64 scsi_tag, u16 lun, u8 task_attr, in vhost_scsi_get_tag() argument
776 cmd->tvc_lun = lun; in vhost_scsi_get_tag()
1018 u16 lun; in vhost_scsi_handle_vq() local
1067 lunp = &v_req_pi.lun[0]; in vhost_scsi_handle_vq()
1068 target = &v_req_pi.lun[1]; in vhost_scsi_handle_vq()
1072 lunp = &v_req.lun[0]; in vhost_scsi_handle_vq()
1073 target = &v_req.lun[1]; in vhost_scsi_handle_vq()
1183 lun = ((v_req_pi.lun[2] << 8) | v_req_pi.lun[3]) & 0x3FFF; in vhost_scsi_handle_vq()
1188 lun = ((v_req.lun[2] << 8) | v_req.lun[3]) & 0x3FFF; in vhost_scsi_handle_vq()
1204 cmd = vhost_scsi_get_tag(vq, tpg, cdb, tag, lun, task_attr, in vhost_scsi_handle_vq()
[all …]
/linux-4.1.27/drivers/scsi/pm8001/
Dpm8001_sas.c877 u8 *lun, struct pm8001_tmf_task *tmf) in pm8001_issue_ssp_tmf() argument
883 strncpy((u8 *)&ssp_task.LUN, lun, 8); in pm8001_issue_ssp_tmf()
1069 int pm8001_lu_reset(struct domain_device *dev, u8 *lun) in pm8001_lu_reset() argument
1088 rc = pm8001_issue_ssp_tmf(dev, lun, &tmf_task); in pm8001_lu_reset()
1101 struct scsi_lun lun; in pm8001_query_task() local
1113 int_to_scsilun(cmnd->device->lun, &lun); in pm8001_query_task()
1126 rc = pm8001_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in pm8001_query_task()
1155 struct scsi_lun lun; in pm8001_abort_task() local
1174 int_to_scsilun(cmnd->device->lun, &lun); in pm8001_abort_task()
1186 rc = pm8001_issue_ssp_tmf(dev, lun.scsi_lun, &tmf_task); in pm8001_abort_task()
[all …]
Dpm8001_sas.h628 int pm8001_abort_task_set(struct domain_device *dev, u8 *lun);
629 int pm8001_clear_aca(struct domain_device *dev, u8 *lun);
630 int pm8001_clear_task_set(struct domain_device *dev, u8 *lun);
633 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.1.27/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.c914 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_queuecommand()
942 (int)cmd->device->lun); in esas2r_queuecommand()
1192 cmd->device->lun); in esas2r_dev_targ_reset()
1200 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_dev_targ_reset()
1212 cmd->device->id, cmd->device->lun); in esas2r_dev_targ_reset()
1417 d->lun = le16_to_cpu(d->lun); in esas2r_nuxi_mgt_data()
/linux-4.1.27/drivers/xen/
Dxen-scsiback.c81 unsigned int lun; /* LUN */ member
87 unsigned int lun; member
273 tpg->tport->tport_name, pending_req->v2p->lun, in scsiback_print_status()
404 pending_req->sense_buffer, pending_req->v2p->lun, in scsiback_cmd_exec()
616 if (transport_lookup_tmr_lun(se_cmd, pending_req->v2p->lun) < 0) in scsiback_device_action()
650 (entry->v.lun == v->lun)) { in scsiback_do_translation()
674 vir.lun = ring_req->lun; in prepare_pending_reqs()
680 vir.chn, vir.tgt, vir.lun); in prepare_pending_reqs()
869 unsigned int lun; in scsiback_add_translation_entry() local
880 if (kstrtouint(lunp, 10, &lun) || lun >= TRANSPORT_MAX_LUNS_PER_TPG) { in scsiback_add_translation_entry()
[all …]
/linux-4.1.27/drivers/scsi/qla2xxx/
Dqla_iocb.c405 cmd_pkt->lun = cpu_to_le16(cmd->device->lun); in qla2x00_start_scsi()
503 uint64_t lun, uint8_t type) in __qla2x00_marker() argument
526 int_to_scsilun(lun, (struct scsi_lun *)&mrk24->lun); in __qla2x00_marker()
527 host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun)); in __qla2x00_marker()
532 mrk->lun = cpu_to_le16((uint16_t)lun); in __qla2x00_marker()
544 struct rsp_que *rsp, uint16_t loop_id, uint64_t lun, in qla2x00_marker() argument
551 ret = __qla2x00_marker(vha, req, rsp, loop_id, lun, type); in qla2x00_marker()
1330 int_to_scsilun(cmd->device->lun, &fcp_cmnd->lun); in qla24xx_build_scsi_crc_2_iocbs()
1538 int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); in qla24xx_start_scsi()
1539 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()
1329 uint32_t lun, uint8_t *s_id) in abort_cmds_for_lun() argument
1343 (struct scsi_lun *)&op->atio.u.isp24.fcp_cmnd.lun); in abort_cmds_for_lun()
1344 if (op_key == key && op_lun == lun) in abort_cmds_for_lun()
1353 (struct scsi_lun *)&cmd->atio.u.isp24.fcp_cmnd.lun); in abort_cmds_for_lun()
1354 if (cmd_key == key && cmd_lun == lun) in abort_cmds_for_lun()
1368 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.c943 uint64_t lun; in qla2xxx_eh_abort() local
957 lun = cmd->device->lun; in qla2xxx_eh_abort()
968 vha->host_no, id, lun, sp, cmd); in qla2xxx_eh_abort()
1019 vha->host_no, id, lun, wait, ret); in qla2xxx_eh_abort()
1059 cmd->device->lun == l); in qla2x00_eh_wait_for_pending_commands()
1099 cmd->device->id, cmd->device->lun, cmd); in __qla2xxx_eh_generic_reset()
1108 if (do_reset(fcport, cmd->device->lun, cmd->request->cpu + 1) in __qla2xxx_eh_generic_reset()
1116 cmd->device->lun, type) != QLA_SUCCESS) { in __qla2xxx_eh_generic_reset()
1124 vha->host_no, cmd->device->id, cmd->device->lun, cmd); in __qla2xxx_eh_generic_reset()
1131 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.1.27/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()
1151 user->intf->channels[channel].lun = LUN & 0x3; in ipmi_set_my_LUN()
1162 *address = user->intf->channels[channel].lun; in ipmi_get_my_LUN()
1421 smi_msg->data[i+4] = (msg->netfn << 2) | (ipmb_addr->lun & 0x3); in format_ipmb_msg()
1460 smi_msg->data[5] = (msg->netfn << 2) | (lan_addr->lun & 0x3); in format_lan_msg()
1594 if (smi_addr->lun > 3) { in i_ipmi_request()
1637 smi_msg->data[0] = (msg->netfn << 2) | (smi_addr->lun & 0x3); in i_ipmi_request()
[all …]
Dipmi_watchdog.c416 addr.lun = 0; in i_ipmi_set_timeout()
506 addr.lun = 0; in panic_halt_ipmi_heartbeat()
628 addr.lun = 0; in ipmi_heartbeat()
/linux-4.1.27/include/linux/usb/
Duas.h53 struct scsi_lun lun; member
64 struct scsi_lun lun; member
/linux-4.1.27/drivers/scsi/lpfc/
Dlpfc_nl.h109 uint32_t lun; member
119 uint32_t lun; member
Dlpfc_scsi.c3588 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3602 fast_path_evt->un.check_cond_evt.scsi_event.lun = in lpfc_send_scsi_error_event()
3603 cmnd->device->lun; in lpfc_send_scsi_error_event()
3632 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3715 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3726 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3941 cmd->device ? cmd->device->lun : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
4049 cmd->device->id, cmd->device->lun, cmd, in lpfc_scsi_cmd_iocb_cmpl()
4177 int_to_scsilun(lpfc_cmd->pCmd->device->lun, in lpfc_scsi_prep_cmnd()
4266 uint64_t lun, in lpfc_scsi_prep_task_mgmt_cmd() argument
[all …]
Dlpfc_scsi.h47 uint64_t lun; member
/linux-4.1.27/drivers/ide/
Dide-disk_proc.c160 ide_devset_rw_field(lun, lun);
170 IDE_PROC_DEVSET(lun, 0, 7),
/linux-4.1.27/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.1.27/drivers/staging/unisys/common-spar/include/channels/
Diochannel.h244 u32 lun; /* lun == logical unit number */ member
359 #define SET_NO_DISK_INQUIRY_RESULT(buf, len, lun, lun0notpresent, notpresent) \ argument
365 if (lun == 0) { \
599 u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ member
/linux-4.1.27/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.1.27/arch/s390/include/asm/
Dipl.h52 u64 lun; member
131 u64 lun; member
/linux-4.1.27/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.1.27/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.1.27/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.1.27/drivers/scsi/device_handler/
Dscsi_dh_rdac.c148 u8 lun[8]; member
187 unsigned lun; member
335 lun_table[qdata->h->lun] = 0x81; in rdac_failover_get()
450 h->lun = inqp->lun[7]; /* Uses only the last byte */ in get_lun_info()
842 h->lun = UNINITIALIZED_LUN; in rdac_bus_attach()
863 RDAC_NAME, h->lun, mode[(int)h->mode], in rdac_bus_attach()
/linux-4.1.27/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.1.27/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.1.27/drivers/scsi/be2iscsi/
Dbe_main.h477 u8 lun[64]; member
752 u8 lun[14]; /* DWORD 0 */ member
798 u8 lun[16]; /* DWORD 1 */ member
869 u8 lun[64]; member
897 u8 lun[64]; /* lun or opcode-specific fields */ member
912 u8 lun[14]; /* DWORD 0 */ member
/linux-4.1.27/drivers/target/loopback/
Dtcm_loop.c169 &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, in tcm_loop_submission_work()
197 sc->device->id, sc->device->channel, sc->device->lun, in tcm_loop_queuecommand()
220 int lun, int task, enum tcm_tmreq_table tmr) in tcm_loop_issue_tmr() argument
273 if (transport_lookup_tmr_lun(se_cmd, lun) < 0) { in tcm_loop_issue_tmr()
308 ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, in tcm_loop_abort_task()
329 ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, in tcm_loop_device_reset()
874 struct se_lun *lun) in tcm_loop_port_link() argument
884 scsi_add_device(tl_hba->sh, 0, tl_tpg->tl_tpgt, lun->unpacked_lun); in tcm_loop_port_link()
/linux-4.1.27/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.1.27/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.1.27/drivers/scsi/arcmsr/
Darcmsr_hba.c568 int target, lun; in arcmsr_message_isr_bh_fn() local
611 for (lun = 0; lun < ARCMSR_MAX_TARGETLUN; in arcmsr_message_isr_bh_fn()
612 lun++) { in arcmsr_message_isr_bh_fn()
616 0, target, lun); in arcmsr_message_isr_bh_fn()
620 0, target, lun); in arcmsr_message_isr_bh_fn()
1036 uint8_t id, lun; in arcmsr_report_ccb_state() local
1038 lun = ccb->pcmd->device->lun; in arcmsr_report_ccb_state()
1040 if (acb->devstate[id][lun] == ARECA_RAID_GONE) in arcmsr_report_ccb_state()
1041 acb->devstate[id][lun] = ARECA_RAID_GOOD; in arcmsr_report_ccb_state()
1047 acb->devstate[id][lun] = ARECA_RAID_GONE; in arcmsr_report_ccb_state()
[all …]
/linux-4.1.27/include/xen/interface/io/
Dvscsiif.h197 uint16_t channel, id, lun; /* (virtual) device specification */ member
/linux-4.1.27/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 srp_cmd->lun = cpu_to_be64(((u64)lun) << 48); in ibmvscsi_queuecommand_lck()
1492 u16 lun = lun_from_dev(cmd->device); in ibmvscsi_eh_abort_handler() local
1532 tsk_mgmt->lun = cpu_to_be64(((u64) lun) << 48); 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 tsk_mgmt->lun = cpu_to_be64(((u64) lun) << 48); 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
Dibmvfc.c170 entry->lun = scsilun_to_int(&vfc_cmd->iu.lun); in ibmvfc_trc_start()
203 entry->lun = scsilun_to_int(&vfc_cmd->iu.lun); in ibmvfc_trc_end()
1642 int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun); in ibmvfc_queuecommand_lck()
1987 int_to_scsilun(sdev->lun, &tmf->iu.lun); in ibmvfc_reset_device()
2183 int_to_scsilun(sdev->lun, &tmf->lun); in ibmvfc_cancel_all()
2317 int_to_scsilun(sdev->lun, &tmf->iu.lun); in ibmvfc_abort_task_set()
/linux-4.1.27/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.1.27/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.1.27/drivers/target/sbp/
Dsbp_target.c112 struct sbp_session *session, struct se_lun *lun) in sbp_login_find_by_lun() argument
118 if (login->lun == lun) in sbp_login_find_by_lun()
128 struct se_lun *lun, in sbp_login_count_all_by_lun() argument
142 if (login->lun != lun) in sbp_login_count_all_by_lun()
178 static struct se_lun *sbp_get_lun_from_tpg(struct sbp_tpg *tpg, int lun) in sbp_get_lun_from_tpg() argument
183 if (lun >= TRANSPORT_MAX_LUNS_PER_TPG) in sbp_get_lun_from_tpg()
187 se_lun = se_tpg->tpg_lun_list[lun]; in sbp_get_lun_from_tpg()
443 login->lun = se_lun; in sbp_management_request_login()
605 login->lun->unpacked_lun, login->login_id); in sbp_management_request_logout()
1231 unpacked_lun = req->login->lun->unpacked_lun; in sbp_handle_command()
Dsbp_target.h128 struct se_lun *lun; member
/linux-4.1.27/drivers/scsi/ufs/
Dufshcd.c1128 lrbp->lun, lrbp->task_tag); in ufshcd_prepare_utp_scsi_cmd_upiu()
1160 lrbp->lun, lrbp->task_tag); in ufshcd_prepare_utp_query_req_upiu()
1328 lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); in ufshcd_queuecommand()
1357 lrbp->lun = 0; /* device management cmd is not specific to any LUN */ in ufshcd_compose_dev_cmd()
1879 int lun, in ufshcd_read_unit_desc_param() argument
1888 if (lun != UFS_UPIU_RPMB_WLUN && (lun >= UFS_UPIU_MAX_GENERAL_LUN)) in ufshcd_read_unit_desc_param()
1891 return ufshcd_read_desc_param(hba, QUERY_DESC_IDN_UNIT, lun, in ufshcd_read_unit_desc_param()
2735 ufshcd_scsi_to_upiu_lun(sdev->lun), in ufshcd_set_queue_depth()
2766 u8 lun, in ufshcd_get_lu_wp() argument
2778 else if (lun >= UFS_UPIU_MAX_GENERAL_LUN) in ufshcd_get_lu_wp()
[all …]
/linux-4.1.27/drivers/scsi/dpt/
Ddpti_ioctl.h134 uLONG lun; member
/linux-4.1.27/Documentation/ABI/testing/
Dconfigfs-usb-gadget-mass-storage14 What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name
/linux-4.1.27/arch/s390/kernel/
Dipl.c436 DEFINE_IPL_ATTR_RO(ipl_fcp, lun, "0x%016llx\n", (unsigned long long)
437 IPL_PARMBLOCK_START->ipl_info.fcp.lun);
722 DEFINE_IPL_ATTR_RW(reipl_fcp, lun, "0x%016llx\n", "%llx\n",
723 reipl_block_fcp->ipl_info.fcp.lun);
1308 DEFINE_IPL_ATTR_RW(dump_fcp, lun, "0x%016llx\n", "%llx\n",
1309 dump_block_fcp->ipl_info.fcp.lun);
1944 ipl_info.data.fcp.lun = IPL_PARMBLOCK_START->ipl_info.fcp.lun; in setup_ipl()
/linux-4.1.27/drivers/scsi/megaraid/
Dmega_common.h207 #define SCP2LUN(scp) (u32)(scp)->device->lun // to LUN
/linux-4.1.27/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.1.27/drivers/scsi/pcmcia/
Dnsp_cs.c199 SCpnt, target, SCpnt->device->lun, scsi_sglist(SCpnt), in nsp_queuecommand_lck()
961 unsigned char target, lun; in nspintr() local
1056 lun = tmpSC->device->lun; in nspintr()
1225 data->MsgBuffer[i] = IDENTIFY(TRUE, lun); i++; in nspintr()
/linux-4.1.27/drivers/infiniband/ulp/srpt/
Dib_srpt.c1623 static uint64_t srpt_unpack_lun(const uint8_t *lun, int len) in srpt_unpack_lun() argument
1636 if ((*((__be64 *)lun) & in srpt_unpack_lun()
1641 if (*((__be16 *)&lun[2]) != 0) in srpt_unpack_lun()
1645 if (*((__be32 *)&lun[2]) != 0) in srpt_unpack_lun()
1654 addressing_method = (*lun) >> 6; /* highest two bits of byte 0 */ in srpt_unpack_lun()
1659 res = *(lun + 1) | (((*lun) & 0x3f) << 8); in srpt_unpack_lun()
1729 unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_cmd->lun, in srpt_handle_cmd()
1730 sizeof(srp_cmd->lun)); in srpt_handle_cmd()
1794 unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_tsk->lun, in srpt_handle_tsk_mgmt()
1795 sizeof(srp_tsk->lun)); in srpt_handle_tsk_mgmt()
/linux-4.1.27/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.1.27/Documentation/filesystems/
Dbfs.txt40 (assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you
/linux-4.1.27/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.1.27/drivers/scsi/bnx2fc/
Dbnx2fc_io.c1454 u64 tm_lun = sc_cmd->device->lun; in bnx2fc_lun_reset_cmpl()
1455 u64 lun; in bnx2fc_lun_reset_cmpl() local
1466 lun = cmd->sc_cmd->device->lun; in bnx2fc_lun_reset_cmpl()
1467 if (lun == tm_lun) { in bnx2fc_lun_reset_cmpl()
1731 int_to_scsilun(sc_cmd->device->lun, &fcp_cmnd->fc_lun); in bnx2fc_build_fcp_cmnd()
/linux-4.1.27/arch/ia64/hp/sim/
Dsimscsi.c222 if (target_id <= 15 && sc->device->lun == 0) { in simscsi_queuecommand_lck()
/linux-4.1.27/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:
/linux-4.1.27/drivers/scsi/mpt2sas/
Dmpt2sas_scsih.c217 u32 lun; member
989 unsigned int lun, int channel) in _scsih_scsi_lookup_find_by_lun() argument
1001 ioc->scsi_lookup[i].scmd->device->lun == lun)) { in _scsih_scsi_lookup_find_by_lun()
1365 sas_device_priv_data->lun = sdev->lun; in _scsih_slave_alloc()
2334 uint id, uint lun, u8 type, u16 smid_task, ulong timeout, in mpt2sas_scsih_issue_tm() argument
2404 int_to_scsilun(lun, (struct scsi_lun *)mpi_request->LUN); in mpt2sas_scsih_issue_tm()
2456 if (_scsih_scsi_lookup_find_by_lun(ioc, id, lun, channel)) in mpt2sas_scsih_issue_tm()
2587 scmd->device->id, scmd->device->lun, in _scsih_abort()
2648 scmd->device->id, scmd->device->lun, in _scsih_dev_reset()
3991 int_to_scsilun(sas_device_priv_data->lun, (struct scsi_lun *) in _scsih_qcmd()
[all …]
/linux-4.1.27/drivers/scsi/mpt3sas/
Dmpt3sas_scsih.c232 u32 lun; member
1035 unsigned int lun, int channel) in _scsih_scsi_lookup_find_by_lun() argument
1047 ioc->scsi_lookup[i].scmd->device->lun == lun)) { in _scsih_scsi_lookup_find_by_lun()
1241 sas_device_priv_data->lun = sdev->lun; in _scsih_slave_alloc()
2000 uint id, uint lun, u8 type, u16 smid_task, ulong timeout, in mpt3sas_scsih_issue_tm() argument
2070 int_to_scsilun(lun, (struct scsi_lun *)mpi_request->LUN); in mpt3sas_scsih_issue_tm()
2122 if (_scsih_scsi_lookup_find_by_lun(ioc, id, lun, channel)) in mpt3sas_scsih_issue_tm()
2251 scmd->device->id, scmd->device->lun, in _scsih_abort()
2310 scmd->device->id, scmd->device->lun, in _scsih_dev_reset()
3610 int_to_scsilun(sas_device_priv_data->lun, (struct scsi_lun *) in _scsih_qcmd()
[all …]
/linux-4.1.27/drivers/ata/
Dlibata.h146 unsigned int id, u64 lun);

12