/Linux-v4.19/drivers/target/ |
D | target_core_tpg.c | 125 struct se_lun *lun; in core_tpg_add_node_to_devs() local 129 hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) { in core_tpg_add_node_to_devs() 130 if (lun_orig && lun != lun_orig) in core_tpg_add_node_to_devs() 133 dev = rcu_dereference_check(lun->lun_se_dev, in core_tpg_add_node_to_devs() 155 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_tpg_add_node_to_devs() 158 core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, in core_tpg_add_node_to_devs() 165 core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, in core_tpg_add_node_to_devs() 166 lun->unpacked_lun); in core_tpg_add_node_to_devs() 453 struct se_lun *lun = container_of(ref, struct se_lun, lun_ref); in core_tpg_lun_ref_release() local 455 complete(&lun->lun_shutdown_comp); in core_tpg_lun_ref_release() [all …]
|
D | target_core_fabric_configfs.c | 78 struct se_lun *lun; in target_fabric_mappedlun_link() local 90 lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); in target_fabric_mappedlun_link() 95 if (!lun->lun_se_dev) { in target_fabric_mappedlun_link() 99 if (lun->lun_shutdown) { in target_fabric_mappedlun_link() 104 se_tpg = lun->lun_tpg; in target_fabric_mappedlun_link() 146 return core_dev_add_initiator_node_lun_acl(se_tpg, lacl, lun, lun_access_ro); in target_fabric_mappedlun_link() 155 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_unlink() local 158 core_dev_del_initiator_node_lun_acl(lun, lacl); in target_fabric_mappedlun_unlink() 529 struct se_lun *lun = item_to_lun(item); in target_fabric_port_alua_tg_pt_gp_show() local 531 if (!lun || !lun->lun_se_dev) in target_fabric_port_alua_tg_pt_gp_show() [all …]
|
D | target_core_alua.c | 48 struct se_lun *lun, int explicit, int offline); 52 static void __target_attach_tg_pt_gp(struct se_lun *lun, 153 struct se_lun *lun; in target_emulate_report_target_port_groups() local 227 list_for_each_entry(lun, &tg_pt_gp->tg_pt_gp_lun_list, in target_emulate_report_target_port_groups() 238 put_unaligned_be16(lun->lun_rtpi, &buf[off]); in target_emulate_report_target_port_groups() 397 struct se_lun *lun; in target_emulate_set_target_port_groups() local 410 list_for_each_entry(lun, &dev->dev_sep_list, in target_emulate_set_target_port_groups() 412 if (lun->lun_rtpi != rtpi) in target_emulate_set_target_port_groups() 419 lun, 1, 1)) in target_emulate_set_target_port_groups() 687 struct se_lun *lun = cmd->se_lun; in target_alua_state_check() local [all …]
|
D | target_core_stat.c | 379 CONFIGFS_ATTR_RO(target_stat_lu_, lun); 457 struct se_lun *lun = to_stat_port(item); in target_stat_port_inst_show() local 462 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_inst_show() 471 struct se_lun *lun = to_stat_port(item); in target_stat_port_dev_show() local 476 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_dev_show() 485 struct se_lun *lun = to_stat_port(item); in target_stat_port_indx_show() local 490 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_indx_show() 492 ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_rtpi); in target_stat_port_indx_show() 499 struct se_lun *lun = to_stat_port(item); in target_stat_port_role_show() local 504 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_role_show() [all …]
|
D | target_core_device.c | 231 struct se_lun *lun; in core_get_se_deve_from_rtpi() local 236 lun = rcu_dereference(deve->se_lun); in core_get_se_deve_from_rtpi() 237 if (!lun) { in core_get_se_deve_from_rtpi() 243 if (lun->lun_rtpi != rtpi) in core_get_se_deve_from_rtpi() 264 struct se_lun *lun = rcu_dereference_check(deve->se_lun, in core_free_device_list_for_node() local 266 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_free_device_list_for_node() 324 struct se_lun *lun, in core_enable_device_list_for_node() argument 357 if (orig_lun != lun) { in core_enable_device_list_for_node() 375 rcu_assign_pointer(new->se_lun, lun); in core_enable_device_list_for_node() 381 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node() [all …]
|
/Linux-v4.19/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 324 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 …]
|
/Linux-v4.19/drivers/usb/gadget/function/ |
D | storage_common.h | 18 #define VLDBG(lun, fmt, args...) do { } while (0) argument 21 #define _LMSG(func, lun, fmt, args...) \ argument 23 if ((lun)->name_pfx && *(lun)->name_pfx) \ 24 func("%s/%s: " fmt, *(lun)->name_pfx, \ 25 (lun)->name, ## args); \ 27 func("%s: " fmt, (lun)->name, ## args); \ 30 #define LDBG(lun, fmt, args...) _LMSG(pr_debug, lun, fmt, ## args) argument 31 #define LERROR(lun, fmt, args...) _LMSG(pr_err, lun, fmt, ## args) argument 32 #define LWARN(lun, fmt, args...) _LMSG(pr_warn, lun, fmt, ## args) argument 33 #define LINFO(lun, fmt, args...) _LMSG(pr_info, lun, fmt, ## args) argument
|
D | f_mass_storage.c | 286 unsigned int lun; member 1655 unsigned int lun = common->cmnd[1] >> 5; in check_command() local 1720 if (common->lun != lun) in check_command() 1722 common->lun, lun); in check_command() 1741 DBG(common, "unsupported LUN %u\n", common->lun); in check_command() 2132 common->lun = cbw->Lun; in received_cbw() 2133 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw() 2134 common->curlun = common->luns[common->lun]; in received_cbw() 2637 void fsg_common_remove_lun(struct fsg_lun *lun) in fsg_common_remove_lun() argument 2639 if (device_is_registered(&lun->dev)) in fsg_common_remove_lun() [all …]
|
/Linux-v4.19/drivers/scsi/ |
D | scsi_common.c | 80 u64 lun; in scsilun_to_int() local 82 lun = 0; in scsilun_to_int() 83 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int() 84 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) | in scsilun_to_int() 86 return lun; in scsilun_to_int() 105 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun) in int_to_scsilun() argument 111 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun() 112 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun() 113 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun() 114 lun = lun >> 16; in int_to_scsilun()
|
D | virtio_scsi.c | 321 unsigned int target = event->lun[1]; in virtscsi_handle_transport_reset() 322 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_transport_reset() local 326 scsi_add_device(shost, 0, target, lun); in virtscsi_handle_transport_reset() 329 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_transport_reset() 335 shost->host_no, target, lun); in virtscsi_handle_transport_reset() 348 unsigned int target = event->lun[1]; in virtscsi_handle_param_change() 349 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_param_change() local 353 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_param_change() 356 shost->host_no, target, lun); in virtscsi_handle_param_change() 489 cmd->lun[0] = 1; in virtio_scsi_init_hdr() [all …]
|
D | scsi_scan.c | 216 u64 lun, void *hostdata) in scsi_alloc_sdev() argument 233 sdev->lun = lun; in scsi_alloc_sdev() 829 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun() 832 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun() 1052 u64 lun, blist_flags_t *bflagsp, in scsi_probe_and_add_lun() argument 1067 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun() 1086 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun() 1117 if (lun == 0) { in scsi_probe_and_add_lun() 1156 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun() 1209 u64 sparse_lun, lun; in scsi_sequential_lun_scan() local [all …]
|
D | scsi_proc.c | 190 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in proc_print_scsidevice() 243 static int scsi_add_single_device(uint host, uint channel, uint id, uint lun) in scsi_add_single_device() argument 253 error = shost->transportt->user_scan(shost, channel, id, lun); in scsi_add_single_device() 255 error = scsi_scan_host_selected(shost, channel, id, lun, in scsi_add_single_device() 271 static int scsi_remove_single_device(uint host, uint channel, uint id, uint lun) in scsi_remove_single_device() argument 280 sdev = scsi_device_lookup(shost, channel, id, lun); in scsi_remove_single_device() 313 int host, channel, id, lun; in proc_scsi_write() local 344 lun = simple_strtoul(p + 1, &p, 0); in proc_scsi_write() 346 err = scsi_add_single_device(host, channel, id, lun); in proc_scsi_write() 358 lun = simple_strtoul(p + 1, &p, 0); in proc_scsi_write() [all …]
|
D | 53c700.c | 417 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument 421 (lun & NCR_700_LUN_MASK); in NCR_700_identify() 782 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local 786 lun = SCp->device->lun; in process_extended_message() 831 host->host_no, pun, lun); in process_extended_message() 842 host->host_no, pun, lun, in process_extended_message() 865 __u8 pun = 0xff, lun = 0xff; in process_message() local 869 lun = SCp->device->lun; in process_message() 873 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message() 907 pun, lun, in process_message() [all …]
|
/Linux-v4.19/drivers/usb/storage/ |
D | realtek_cr.c | 66 #define SET_LUN_READY(chip, lun) ((chip)->lun_ready |= ((u8)1 << (lun))) argument 67 #define CLR_LUN_READY(chip, lun) ((chip)->lun_ready &= ~((u8)1 << (lun))) argument 68 #define TST_LUN_READY(chip, lun) ((chip)->lun_ready & ((u8)1 << (lun))) argument 116 #define SCSI_LUN(srb) ((srb)->device->lun) 200 static int rts51x_bulk_transport(struct us_data *us, u8 lun, in rts51x_bulk_transport() argument 216 bcb->Lun = lun; in rts51x_bulk_transport() 290 static int rts51x_bulk_transport_special(struct us_data *us, u8 lun, in rts51x_bulk_transport_special() argument 305 bcb->Lun = lun; in rts51x_bulk_transport_special() 419 u8 lun, u8 *status, int len, int *actlen) in rts51x_read_status() argument 429 usb_stor_dbg(us, "lun = %d\n", lun); in rts51x_read_status() [all …]
|
/Linux-v4.19/drivers/scsi/aic94xx/ |
D | aic94xx_tmf.c | 219 static int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun) in asd_clear_nexus_I_T_L() argument 226 memcpy(scb->clear_nexus.ssp_task.lun, lun, 8); in asd_clear_nexus_I_T_L() 239 memcpy(scb->clear_nexus.ssp_task.lun, task->ssp_task.LUN, 8); in asd_clear_nexus_tag() 461 memcpy(scb->abort_task.ssp_task.lun, task->ssp_task.LUN, 8); in asd_abort_task() 574 static int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun, in asd_initiate_ssp_tmf() argument 610 memcpy(scb->ssp_tmf.ssp_task.lun, lun, 8); in asd_initiate_ssp_tmf() 656 int asd_abort_task_set(struct domain_device *dev, u8 *lun) in asd_abort_task_set() argument 658 int res = asd_initiate_ssp_tmf(dev, lun, TMF_ABORT_TASK_SET, 0); in asd_abort_task_set() 661 asd_clear_nexus_I_T_L(dev, lun); in asd_abort_task_set() 665 int asd_clear_aca(struct domain_device *dev, u8 *lun) in asd_clear_aca() argument [all …]
|
D | aic94xx.h | 87 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);
|
/Linux-v4.19/drivers/scsi/isci/ |
D | task.h | 93 unsigned char lun[8]; member 141 u8 *lun); 145 u8 *lun); 149 u8 *lun); 156 u8 *lun);
|
/Linux-v4.19/include/uapi/linux/ |
D | virtio_scsi.h | 45 __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
|
/Linux-v4.19/include/linux/mtd/ |
D | nand.h | 74 unsigned int lun; member 437 pos->lun = do_div(tmp, nand->memorg.luns_per_target); in nanddev_offs_to_pos() 458 if (a->lun != b->lun) in nanddev_pos_cmp() 459 return a->lun < b->lun ? -1 : 1; in nanddev_pos_cmp() 488 (pos->lun + in nanddev_pos_to_offs() 509 return (pos->lun << nand->rowconv.lun_addr_shift) | in nanddev_pos_to_row() 528 pos->lun = 0; in nanddev_pos_next_target() 543 if (pos->lun >= nand->memorg.luns_per_target - 1) in nanddev_pos_next_lun() 546 pos->lun++; in nanddev_pos_next_lun() 716 ((pos->lun + (pos->target * nand->memorg.luns_per_target)) * in nanddev_bbt_pos_to_entry()
|
/Linux-v4.19/drivers/block/paride/ |
D | pf.c | 236 int lun; member 301 pf->lun = (*drives[unit])[D_LUN]; in pf_init_units() 488 { ATAPI_REQ_SENSE, pf->lun << 5, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0 }; in pf_req_sense() 518 char lo_cmd[12] = { ATAPI_LOCK, pf->lun << 5, 0, 0, func, 0, 0, 0, 0, 0, 0, 0 }; in pf_lock() 525 char ej_cmd[12] = { ATAPI_DOOR, pf->lun << 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 }; in pf_eject() 578 { ATAPI_MODE_SENSE, pf->lun << 5, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0 }; in pf_mode_sense() 613 char rc_cmd[12] = { ATAPI_CAPACITY, pf->lun << 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; in pf_get_capacity() 628 pf->name, pf->drive, pf->lun, bs); in pf_get_capacity() 638 { ATAPI_IDENTIFY, pf->lun << 5, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0 }; in pf_identify() 649 pf->name, pf->drive, pf->lun, dt); in pf_identify() [all …]
|
/Linux-v4.19/drivers/scsi/libsas/ |
D | sas_scsi_host.c | 154 struct scsi_lun lun; in sas_create_task() local 166 int_to_scsilun(cmd->device->lun, &lun); in sas_create_task() 167 memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); in sas_create_task() 256 cmd->device->lun == my_cmd->device->lun) in sas_scsi_clear_queue_lu() 347 struct scsi_lun lun; in sas_recover_lu() local 351 int_to_scsilun(cmd->device->lun, &lun); in sas_recover_lu() 355 cmd->device->lun); in sas_recover_lu() 358 res = i->dft->lldd_abort_task_set(dev, lun.scsi_lun); in sas_recover_lu() 362 res = i->dft->lldd_clear_task_set(dev, lun.scsi_lun); in sas_recover_lu() 367 res = i->dft->lldd_lu_reset(dev, lun.scsi_lun); in sas_recover_lu() [all …]
|
/Linux-v4.19/include/trace/events/ |
D | scsi.h | 210 __field( unsigned int, lun ) 223 __entry->lun = cmd->device->lun; 235 __entry->lun, __entry->data_sglen, __entry->prot_sglen, 252 __field( unsigned int, lun ) 266 __entry->lun = cmd->device->lun; 279 __entry->lun, __entry->data_sglen, __entry->prot_sglen, 297 __field( unsigned int, lun ) 311 __entry->lun = cmd->device->lun; 325 __entry->lun, __entry->data_sglen, __entry->prot_sglen,
|
/Linux-v4.19/drivers/s390/scsi/ |
D | zfcp_unit.c | 25 u64 lun; in zfcp_unit_scsi_scan() local 27 lun = scsilun_to_int((struct scsi_lun *) &unit->fcp_lun); in zfcp_unit_scsi_scan() 30 scsi_scan_target(&rport->dev, 0, rport->scsi_target_id, lun, in zfcp_unit_scsi_scan() 193 u64 lun; in zfcp_unit_sdev() local 195 lun = scsilun_to_int((struct scsi_lun *) &unit->fcp_lun); in zfcp_unit_sdev() 198 return scsi_device_lookup(shost, 0, port->starget_id, lun); in zfcp_unit_sdev()
|
/Linux-v4.19/drivers/scsi/arm/ |
D | queue.c | 171 (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()
|
/Linux-v4.19/include/scsi/ |
D | scsi.h | 86 static inline int scsi_is_wlun(u64 lun) in scsi_is_wlun() argument 88 return (lun & 0xff00) == SCSI_W_LUN_BASE; in scsi_is_wlun() 230 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ argument 232 ((lun) & 0x07))
|