/linux/drivers/target/ |
H A D | target_core_tpg.c | 110 struct se_lun *lun; in core_tpg_add_node_to_devs() local 114 hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) { in core_tpg_add_node_to_devs() 115 if (lun_orig && lun != lun_orig) in core_tpg_add_node_to_devs() 118 dev = rcu_dereference_check(lun->lun_se_dev, in core_tpg_add_node_to_devs() 140 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_tpg_add_node_to_devs() 143 core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, in core_tpg_add_node_to_devs() 150 core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, in core_tpg_add_node_to_devs() 151 lun->unpacked_lun); in core_tpg_add_node_to_devs() 438 struct se_lun *lun = container_of(ref, struct se_lun, lun_ref); in core_tpg_lun_ref_release() local 440 complete(&lun->lun_shutdown_comp); in core_tpg_lun_ref_release() [all …]
|
H A D | target_core_alua.c | 35 struct se_lun *lun, int explicit, int offline); 39 static void __target_attach_tg_pt_gp(struct se_lun *lun, 140 struct se_lun *lun; in target_emulate_report_target_port_groups() local 217 list_for_each_entry(lun, &tg_pt_gp->tg_pt_gp_lun_list, in target_emulate_report_target_port_groups() 228 put_unaligned_be16(lun->lun_tpg->tpg_rtpi, &buf[off]); in target_emulate_report_target_port_groups() 387 struct se_lun *lun; in target_emulate_set_target_port_groups() local 400 list_for_each_entry(lun, &dev->dev_sep_list, in target_emulate_set_target_port_groups() 402 if (lun->lun_tpg->tpg_rtpi != rtpi) in target_emulate_set_target_port_groups() 409 lun, 1, 1)) in target_emulate_set_target_port_groups() 648 struct se_lun *lun = cmd->se_lun; in target_alua_state_check() local [all …]
|
H A D | target_core_fabric_configfs.c | 71 struct se_lun *lun; in target_fabric_mappedlun_link() local 83 lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); in target_fabric_mappedlun_link() 88 if (!lun->lun_se_dev) { in target_fabric_mappedlun_link() 92 if (lun->lun_shutdown) { in target_fabric_mappedlun_link() 97 se_tpg = lun->lun_tpg; in target_fabric_mappedlun_link() 139 return core_dev_add_initiator_node_lun_acl(se_tpg, lacl, lun, lun_access_ro); in target_fabric_mappedlun_link() 148 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_unlink() local 151 core_dev_del_initiator_node_lun_acl(lun, lacl); in target_fabric_mappedlun_unlink() 522 struct se_lun *lun = item_to_lun(item); in target_fabric_port_alua_tg_pt_gp_show() local 524 if (!lun->lun_se_dev) in target_fabric_port_alua_tg_pt_gp_show() [all …]
|
H A D | target_core_stat.c | 345 CONFIGFS_ATTR_RO(target_stat_lu_, lun); 423 struct se_lun *lun = to_stat_port(item); in target_stat_port_inst_show() local 428 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_inst_show() 437 struct se_lun *lun = to_stat_port(item); in target_stat_port_dev_show() local 442 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_dev_show() 451 struct se_lun *lun = to_stat_port(item); in target_stat_port_indx_show() local 456 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_indx_show() 458 ret = snprintf(page, PAGE_SIZE, "%u\n", lun->lun_tpg->tpg_rtpi); in target_stat_port_indx_show() 465 struct se_lun *lun = to_stat_port(item); in target_stat_port_role_show() local 470 dev = rcu_dereference(lun->lun_se_dev); in target_stat_port_role_show() [all …]
|
H A D | target_core_device.c | 208 struct se_lun *lun; in core_get_se_deve_from_rtpi() local 213 lun = deve->se_lun; in core_get_se_deve_from_rtpi() 214 if (!lun) { in core_get_se_deve_from_rtpi() 220 if (lun->lun_tpg->tpg_rtpi != rtpi) in core_get_se_deve_from_rtpi() 287 struct se_lun *lun; in target_dev_ua_allocate() local 290 list_for_each_entry(lun, &dev->dev_sep_list, lun_dev_link) { in target_dev_ua_allocate() 292 spin_lock(&lun->lun_deve_lock); in target_dev_ua_allocate() 293 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) in target_dev_ua_allocate() 295 spin_unlock(&lun->lun_deve_lock); in target_dev_ua_allocate() 317 struct se_lun *lun, in core_enable_device_list_for_node() argument [all …]
|
/linux/drivers/usb/gadget/function/ |
H A 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
|
/linux/drivers/scsi/ |
H A D | scsi_common.c | 133 u64 lun; in scsilun_to_int() local 135 lun = 0; in scsilun_to_int() 136 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int() 137 lun = lun | (((u64)scsilun->scsi_lun[i] << ((i + 1) * 8)) | in scsilun_to_int() 139 return lun; in scsilun_to_int() 158 void int_to_scsilun(u64 lun, struct scsi_lun *scsilun) in int_to_scsilun() argument 164 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun() 165 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun() 166 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun() 167 lun = lun >> 16; in int_to_scsilun()
|
H A D | sd_trace.h | 27 __field( unsigned int, lun ) 36 __entry->lun = cmnd->device->lun; 43 __entry->lun, __entry->lba, __entry->wp_offset) 57 __field( unsigned int, lun ) 67 __entry->lun = cmnd->device->lun; 76 __entry->lun, __entry->rq_sector, __entry->wp_offset,
|
H A D | scsi_scan.c | 279 u64 lun, void *hostdata) in scsi_alloc_sdev() argument 299 sdev->lun = lun; in scsi_alloc_sdev() 932 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun() 935 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun() 1176 u64 lun, blist_flags_t *bflagsp, in scsi_probe_and_add_lun() argument 1191 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun() 1210 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun() 1240 if (lun == 0) { in scsi_probe_and_add_lun() 1279 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun() 1332 u64 sparse_lun, lun; in scsi_sequential_lun_scan() local [all …]
|
H A D | virtio_scsi.c | 285 unsigned int target = event->lun[1]; in virtscsi_handle_transport_reset() 286 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_transport_reset() local 290 if (lun == 0) { in virtscsi_handle_transport_reset() 294 scsi_add_device(shost, 0, target, lun); in virtscsi_handle_transport_reset() 298 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_transport_reset() 304 shost->host_no, target, lun); in virtscsi_handle_transport_reset() 317 unsigned int target = event->lun[1]; in virtscsi_handle_param_change() 318 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_param_change() local 322 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_param_change() 325 shost->host_no, target, lun); in virtscsi_handle_param_change() [all …]
|
H A D | 53c700.c | 433 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument 437 (lun & NCR_700_LUN_MASK); in NCR_700_identify() 798 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local 802 lun = SCp->device->lun; in process_extended_message() 847 host->host_no, pun, lun); in process_extended_message() 857 host->host_no, pun, lun, in process_extended_message() 879 __u8 pun = 0xff, lun = 0xff; in process_message() local 883 lun = SCp->device->lun; in process_message() 887 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message() 921 pun, lun, in process_message() [all …]
|
H A D | scsi_proc.c | 285 sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); in proc_print_scsidevice() 338 static int scsi_add_single_device(uint host, uint channel, uint id, uint lun) in scsi_add_single_device() argument 348 error = shost->transportt->user_scan(shost, channel, id, lun); in scsi_add_single_device() 350 error = scsi_scan_host_selected(shost, channel, id, lun, in scsi_add_single_device() 366 static int scsi_remove_single_device(uint host, uint channel, uint id, uint lun) in scsi_remove_single_device() argument 375 sdev = scsi_device_lookup(shost, channel, id, lun); in scsi_remove_single_device() 408 int host, channel, id, lun; in proc_scsi_write() local 443 lun = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0; in proc_scsi_write() 445 err = scsi_add_single_device(host, channel, id, lun); in proc_scsi_write() 457 lun = (p + 1 < end) ? simple_strtoul(p + 1, &p, 0) : 0; in proc_scsi_write() [all …]
|
H A D | wd33c93.c | 435 (1 << (cmd->device->lun & 0xff)))) in DEF_SCSI_QCMD() 506 (prev->device->lun != cmd->device->lun)) { in DEF_SCSI_QCMD() 527 write_wd33c93(regs, WD_TARGET_LUN, (u8)cmd->device->lun); in DEF_SCSI_QCMD() 530 hostdata->busy[cmd->device->id] |= (1 << (cmd->device->lun & 0xFF)); in DEF_SCSI_QCMD() 741 uchar asr, sr, phs, id, lun, *ucp, msg; in wd33c93_intr() local 800 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); in wd33c93_intr() 833 hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun); in wd33c93_intr() 1114 lun = read_wd33c93(regs, WD_TARGET_LUN); in wd33c93_intr() 1115 DB(DB_INTR, printk(":%d.%d", scsi_pointer->Status, lun)) in wd33c93_intr() 1117 hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff)); in wd33c93_intr() [all …]
|
/linux/drivers/scsi/libsas/ |
H A D | sas_scsi_host.c | 134 struct scsi_lun lun; in sas_create_task() local 145 int_to_scsilun(cmd->device->lun, &lun); in sas_create_task() 146 memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); in sas_create_task() 236 cmd->device->lun == my_cmd->device->lun) in sas_scsi_clear_queue_lu() 327 struct scsi_lun lun; in sas_recover_lu() local 331 int_to_scsilun(cmd->device->lun, &lun); in sas_recover_lu() 335 cmd->device->lun); in sas_recover_lu() 338 res = i->dft->lldd_abort_task_set(dev, lun.scsi_lun); in sas_recover_lu() 342 res = i->dft->lldd_clear_task_set(dev, lun.scsi_lun); in sas_recover_lu() 347 res = i->dft->lldd_lu_reset(dev, lun.scsi_lun); in sas_recover_lu() [all …]
|
/linux/drivers/usb/storage/ |
H A D | realtek_cr.c | 67 #define SET_LUN_READY(chip, lun) ((chip)->lun_ready |= ((u8)1 << (lun))) argument 68 #define CLR_LUN_READY(chip, lun) ((chip)->lun_ready &= ~((u8)1 << (lun))) argument 69 #define TST_LUN_READY(chip, lun) ((chip)->lun_ready & ((u8)1 << (lun))) argument 117 #define SCSI_LUN(srb) ((srb)->device->lun) 201 static int rts51x_bulk_transport(struct us_data *us, u8 lun, in rts51x_bulk_transport() argument 217 bcb->Lun = lun; in rts51x_bulk_transport() 291 static int rts51x_bulk_transport_special(struct us_data *us, u8 lun, in rts51x_bulk_transport_special() argument 306 bcb->Lun = lun; in rts51x_bulk_transport_special() 420 u8 lun, u8 *status, int len, int *actlen) in rts51x_read_status() argument 430 usb_stor_dbg(us, "lun = %d\n", lun); in rts51x_read_status() [all …]
|
/linux/drivers/scsi/aic94xx/ |
H A D | aic94xx_tmf.c | 201 static int asd_clear_nexus_I_T_L(struct domain_device *dev, u8 *lun) in asd_clear_nexus_I_T_L() argument 208 memcpy(scb->clear_nexus.ssp_task.lun, lun, 8); in asd_clear_nexus_I_T_L() 221 memcpy(scb->clear_nexus.ssp_task.lun, task->ssp_task.LUN, 8); in asd_clear_nexus_tag() 443 memcpy(scb->abort_task.ssp_task.lun, task->ssp_task.LUN, 8); in asd_abort_task() 556 static int asd_initiate_ssp_tmf(struct domain_device *dev, u8 *lun, in asd_initiate_ssp_tmf() argument 592 memcpy(scb->ssp_tmf.ssp_task.lun, lun, 8); in asd_initiate_ssp_tmf() 638 int asd_abort_task_set(struct domain_device *dev, u8 *lun) in asd_abort_task_set() argument 640 int res = asd_initiate_ssp_tmf(dev, lun, TMF_ABORT_TASK_SET, 0); in asd_abort_task_set() 643 asd_clear_nexus_I_T_L(dev, lun); in asd_abort_task_set() 647 int asd_clear_task_set(struct domain_device *dev, u8 *lun) in asd_clear_task_set() argument [all …]
|
/linux/include/trace/events/ |
H A D | scsi.h | 167 __field( unsigned int, lun ) 182 __entry->lun = cmd->device->lun; 196 __entry->lun, __entry->data_sglen, __entry->prot_sglen, 213 __field( unsigned int, lun ) 229 __entry->lun = cmd->device->lun; 245 __entry->lun, __entry->data_sglen, __entry->prot_sglen, 263 __field( unsigned int, lun ) 284 __entry->lun = cmd->device->lun; 311 __entry->lun, __entry->data_sglen, __entry->prot_sglen,
|
/linux/include/uapi/linux/ |
H A 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/drivers/s390/scsi/ |
H A 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() 199 u64 lun; in zfcp_unit_sdev() local 201 lun = scsilun_to_int((struct scsi_lun *) &unit->fcp_lun); in zfcp_unit_sdev() 204 return scsi_device_lookup(shost, 0, port->starget_id, lun); in zfcp_unit_sdev()
|
/linux/drivers/scsi/arm/ |
H A D | queue.c | 172 (u8)(q->SCpnt->device->lun & 0x7), exclude)) { in queue_remove_exclude() 210 struct scsi_cmnd *queue_remove_tgtluntag(Queue_t *queue, int target, int lun, in queue_remove_tgtluntag() argument 220 if (q->SCpnt->device->id == target && q->SCpnt->device->lun == lun && in queue_remove_tgtluntag() 261 int queue_probetgtlun (Queue_t *queue, int target, int lun) in queue_probetgtlun() argument 270 if (q->SCpnt->device->id == target && q->SCpnt->device->lun == lun) { in queue_probetgtlun()
|
/linux/include/scsi/ |
H A D | scsi.h | 62 static inline int scsi_is_wlun(u64 lun) in scsi_is_wlun() argument 64 return (lun & 0xff00) == SCSI_W_LUN_BASE; in scsi_is_wlun() 143 #define IDENTIFY(can_disconnect, lun) (IDENTIFY_BASE |\ argument 145 ((lun) & 0x07))
|
H A D | iscsi_proto.h | 82 struct scsi_lun lun; member 144 struct scsi_lun lun; member 220 struct scsi_lun lun; member 248 struct scsi_lun lun; member 263 struct scsi_lun lun; member 279 struct scsi_lun lun; member 337 struct scsi_lun lun; member 355 struct scsi_lun lun; member 375 struct scsi_lun lun; member 581 uint8_t lun[8]; member
|
/linux/drivers/scsi/isci/ |
H A D | task.h | 93 unsigned char lun[8]; member 141 u8 *lun); 145 u8 *lun); 152 u8 *lun);
|
/linux/drivers/scsi/aic7xxx/ |
H A D | aic79xx.h | 84 ((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 …]
|
/linux/include/linux/mtd/ |
H A D | nand.h | 79 unsigned int lun; member 760 pos->lun = do_div(tmp, nand->memorg.luns_per_target); in nanddev_offs_to_pos() 781 if (a->lun != b->lun) in nanddev_pos_cmp() 782 return a->lun < b->lun ? -1 : 1; in nanddev_pos_cmp() 811 (pos->lun + in nanddev_pos_to_offs() 832 return (pos->lun << nand->rowconv.lun_addr_shift) | in nanddev_pos_to_row() 851 pos->lun = 0; in nanddev_pos_next_target() 866 if (pos->lun >= nand->memorg.luns_per_target - 1) in nanddev_pos_next_lun() 869 pos->lun++; in nanddev_pos_next_lun() 1120 ((pos->lun + (pos->target * nand->memorg.luns_per_target)) * in nanddev_bbt_pos_to_entry()
|