/drivers/target/ |
D | target_core_tpg.c | 60 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 …]
|
D | target_core_stat.c | 295 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 …]
|
D | target_core_fabric_configfs.c | 66 struct se_lun *lun = container_of(to_config_group(lun_ci), in target_fabric_mappedlun_link() local 74 if (lun->lun_link_magic != SE_LUN_LINK_MAGIC) { in target_fabric_mappedlun_link() 76 " %p to struct lun: %p\n", lun_ci, lun); in target_fabric_mappedlun_link() 82 if (!lun->lun_sep || !lun->lun_sep->sep_tpg) { in target_fabric_mappedlun_link() 87 if (lun->lun_shutdown) { in target_fabric_mappedlun_link() 92 se_tpg = lun->lun_sep->sep_tpg; in target_fabric_mappedlun_link() 136 lun->unpacked_lun, lun_access); in target_fabric_mappedlun_link() 145 struct se_lun *lun; in target_fabric_mappedlun_unlink() local 157 lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); in target_fabric_mappedlun_unlink() 158 se_tpg = lun->lun_sep->sep_tpg; in target_fabric_mappedlun_unlink() [all …]
|
D | target_core_device.c | 198 struct se_lun *lun; in core_get_se_deve_from_rtpi() local 210 lun = deve->se_lun; in core_get_se_deve_from_rtpi() 211 if (!lun) { in core_get_se_deve_from_rtpi() 217 port = lun->lun_sep; in core_get_se_deve_from_rtpi() 242 struct se_lun *lun; in core_free_device_list_for_node() local 261 lun = deve->se_lun; in core_free_device_list_for_node() 264 core_disable_device_list_for_node(lun, NULL, deve->mapped_lun, in core_free_device_list_for_node() 300 struct se_lun *lun, in core_enable_device_list_for_node() argument 307 struct se_port *port = lun->lun_sep; in core_enable_device_list_for_node() 327 if (deve->se_lun != lun) { in core_enable_device_list_for_node() [all …]
|
/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 327 void set_sense_type(struct rtsx_chip *chip, unsigned int lun, int sense_type) in set_sense_type() argument 331 set_sense_data(chip, lun, CUR_ERR, 0x06, 0, 0x28, 0, 0, 0); in set_sense_type() 335 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x3A, 0, 0, 0); in set_sense_type() 339 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x21, 0, 0, 0); in set_sense_type() 343 set_sense_data(chip, lun, CUR_ERR, 0x05, 0, 0x25, 0, 0, 0); in set_sense_type() 347 set_sense_data(chip, lun, CUR_ERR, 0x07, 0, 0x27, 0, 0, 0); in set_sense_type() 351 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x11, 0, 0, 0); in set_sense_type() 355 set_sense_data(chip, lun, CUR_ERR, 0x03, 0, 0x0C, 0x02, 0, 0); in set_sense_type() 359 set_sense_data(chip, lun, CUR_ERR, ILGAL_REQ, 0, in set_sense_type() 364 set_sense_data(chip, lun, CUR_ERR, 0x02, 0, 0x04, 0x04, 0, 0); in set_sense_type() [all …]
|
D | rtsx_card.c | 932 unsigned int lun = SCSI_LUN(srb); in card_rw() local 935 if (chip->rw_card[lun] == NULL) in card_rw() 941 retval = chip->rw_card[lun](srb, chip, sec_addr, sec_cnt); in card_rw() 1080 int check_card_exist(struct rtsx_chip *chip, unsigned int lun) in check_card_exist() argument 1082 if (chip->card_exist & chip->lun2card[lun]) in check_card_exist() 1088 int check_card_ready(struct rtsx_chip *chip, unsigned int lun) in check_card_ready() argument 1090 if (chip->card_ready & chip->lun2card[lun]) in check_card_ready() 1096 int check_card_wp(struct rtsx_chip *chip, unsigned int lun) in check_card_wp() argument 1098 if (chip->card_wp & chip->lun2card[lun]) in check_card_wp() 1104 int check_card_fail(struct rtsx_chip *chip, unsigned int lun) in check_card_fail() argument [all …]
|
/drivers/usb/gadget/function/ |
D | storage_common.h | 17 #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
|
D | f_mass_storage.c | 283 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() 2170 common->lun = cbw->Lun; in received_cbw() 2171 if (common->lun < common->nluns) in received_cbw() 2172 common->curlun = common->luns[common->lun]; in received_cbw() 2757 static inline void fsg_common_remove_sysfs(struct fsg_lun *lun) in fsg_common_remove_sysfs() argument 2759 device_remove_file(&lun->dev, &dev_attr_nofua); in fsg_common_remove_sysfs() [all …]
|
/drivers/scsi/ |
D | scsi_scan.c | 223 u64 lun, void *hostdata) in scsi_alloc_sdev() argument 242 sdev->lun = lun; in scsi_alloc_sdev() 824 if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) { in scsi_add_lun() 827 __func__, sdev->type, (unsigned int)sdev->lun); in scsi_add_lun() 1050 u64 lun, int *bflagsp, in scsi_probe_and_add_lun() argument 1063 sdev = scsi_device_lookup_by_target(starget, lun); in scsi_probe_and_add_lun() 1082 sdev = scsi_alloc_sdev(starget, lun, hostdata); in scsi_probe_and_add_lun() 1113 if (lun == 0) { in scsi_probe_and_add_lun() 1152 !scsi_is_wlun(lun)) { in scsi_probe_and_add_lun() 1204 u64 sparse_lun, lun; in scsi_sequential_lun_scan() local [all …]
|
D | atari_NCR5380.c | 334 int target, lun; in init_tags() local 341 for (lun = 0; lun < 8; ++lun) { in init_tags() 342 ta = &TagAlloc[target][lun]; in init_tags() 364 u8 lun = cmd->device->lun; in is_lun_busy() local 367 if (hostdata->busy[cmd->device->id] & (1 << lun)) in is_lun_busy() 372 if (TagAlloc[cmd->device->id][lun].nr_allocated >= in is_lun_busy() 373 TagAlloc[cmd->device->id][lun].queue_size) { in is_lun_busy() 375 H_NO(cmd), cmd->device->id, lun); in is_lun_busy() 389 u8 lun = cmd->device->lun; in cmd_get_tag() local 398 hostdata->busy[cmd->device->id] |= (1 << lun); in cmd_get_tag() [all …]
|
D | sun3_NCR5380.c | 328 int target, lun; in init_tags() local 335 for( lun = 0; lun < 8; ++lun ) { in init_tags() 336 ta = &TagAlloc[target][lun]; in init_tags() 358 u8 lun = cmd->device->lun; in is_lun_busy() local 361 if (hostdata->busy[cmd->device->id] & (1 << lun)) in is_lun_busy() 366 if (TagAlloc[cmd->device->id][lun].nr_allocated >= in is_lun_busy() 367 TagAlloc[cmd->device->id][lun].queue_size ) { in is_lun_busy() 369 H_NO(cmd), cmd->device->id, lun ); in is_lun_busy() 383 u8 lun = cmd->device->lun; in cmd_get_tag() local 392 hostdata->busy[cmd->device->id] |= (1 << lun); in cmd_get_tag() [all …]
|
D | virtio_scsi.c | 323 unsigned int target = event->lun[1]; in virtscsi_handle_transport_reset() 324 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_transport_reset() local 328 scsi_add_device(shost, 0, target, lun); in virtscsi_handle_transport_reset() 331 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_transport_reset() 337 shost->host_no, target, lun); in virtscsi_handle_transport_reset() 350 unsigned int target = event->lun[1]; in virtscsi_handle_param_change() 351 unsigned int lun = (event->lun[2] << 8) | event->lun[3]; in virtscsi_handle_param_change() local 355 sdev = scsi_device_lookup(shost, 0, target, lun); in virtscsi_handle_param_change() 358 shost->host_no, target, lun); in virtscsi_handle_param_change() 488 cmd->lun[0] = 1; in virtio_scsi_init_hdr() [all …]
|
D | scsi_proc.c | 189 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 …]
|
D | 53c700.c | 421 NCR_700_identify(int can_disconnect, __u8 lun) in NCR_700_identify() argument 425 (lun & NCR_700_LUN_MASK); in NCR_700_identify() 791 __u8 pun = 0xff, lun = 0xff; in process_extended_message() local 795 lun = SCp->device->lun; in process_extended_message() 840 host->host_no, pun, lun); in process_extended_message() 851 host->host_no, pun, lun, in process_extended_message() 874 __u8 pun = 0xff, lun = 0xff; in process_message() local 878 lun = SCp->device->lun; in process_message() 882 printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun, in process_message() 914 pun, lun, in process_message() [all …]
|
D | wd33c93.c | 506 (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 …]
|
/drivers/usb/storage/ |
D | realtek_cr.c | 75 #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 …]
|
/drivers/scsi/aic94xx/ |
D | aic94xx_tmf.c | 220 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 …]
|
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);
|
/drivers/staging/unisys/virthba/ |
D | virthba.c | 164 u32 channel, id, lun; /* Disk Path */ member 201 u32 channel, id, lun; /* Disk Path */ member 350 sdev = scsi_device_lookup(dar->shost, dar->channel, dar->id, dar->lun); in SendDiskAddRemove() 357 dar->lun); in SendDiskAddRemove() 361 dar->lun); in SendDiskAddRemove() 364 dar->channel, dar->id, dar->lun); in SendDiskAddRemove() 407 dar->lun = cmdrsp->disknotify.lun; in process_disk_notify() 412 cmdrsp->disknotify.id, cmdrsp->disknotify.lun); in process_disk_notify() 688 vdest->channel, vdest->id, vdest->lun); in forward_vdiskmgmt_command() 717 cmdrsp->vdiskmgmt.vdest.lun = vdest->lun; in forward_vdiskmgmt_command() [all …]
|
/drivers/block/paride/ |
D | pf.c | 236 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 …]
|
/drivers/scsi/isci/ |
D | task.h | 93 unsigned char lun[8]; member 142 u8 *lun); 146 u8 *lun); 150 u8 *lun); 157 u8 *lun);
|
/drivers/s390/scsi/ |
D | zfcp_unit.c | 24 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()
|
/drivers/scsi/libsas/ |
D | sas_scsi_host.c | 155 struct scsi_lun lun; in sas_create_task() local 167 int_to_scsilun(cmd->device->lun, &lun); in sas_create_task() 168 memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8); in sas_create_task() 290 cmd->device->lun == my_cmd->device->lun) in sas_scsi_clear_queue_lu() 401 struct scsi_lun lun; in sas_recover_lu() local 405 int_to_scsilun(cmd->device->lun, &lun); in sas_recover_lu() 409 cmd->device->lun); in sas_recover_lu() 412 res = i->dft->lldd_abort_task_set(dev, lun.scsi_lun); in sas_recover_lu() 416 res = i->dft->lldd_clear_task_set(dev, lun.scsi_lun); in sas_recover_lu() 421 res = i->dft->lldd_lu_reset(dev, lun.scsi_lun); in sas_recover_lu() [all …]
|
/drivers/message/i2o/ |
D | i2o_scsi.c | 81 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 …]
|
/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()
|