Home
last modified time | relevance | path

Searched refs:lun (Results 1 – 25 of 46) sorted by relevance

12

/qemu/hw/scsi/
H A Dscsi-bus.c41 if (dev->lun == lun) { in do_scsi_device_find()
279 if (d && d->lun == lun) { in scsi_bus_is_address_free()
304 if (dev->lun != -1 && dev->lun > bus->info->max_lun) { in scsi_bus_check_address()
341 int lun = -1; in scsi_qdev_realize() local
349 dev->lun = lun; in scsi_qdev_realize()
524 if (lun < 256) { in store_lun()
527 outbuf[1] = lun; in store_lun()
597 assert(r->req.dev->lun != r->req.lun); in scsi_target_emulate_inquiry()
781 req->lun = lun; in scsi_req_alloc()
826 } else if (lun != d->lun || in scsi_req_new()
[all …]
H A Dvirtio-scsi.c71 return ((lun[2] << 8) | lun[3]) & 0x3FFF; in virtio_scsi_get_lun()
79 if (lun[2] != 0 && !(lun[2] >= 0x40 && lun[2] < 0x80)) { in virtio_scsi_device_get()
82 return scsi_device_get(&s->bus, 0, lun[1], virtio_scsi_get_lun(lun)); in virtio_scsi_device_get()
333 if (d->lun != virtio_scsi_get_lun(req->req.tmf.lun)) { in virtio_scsi_do_one_tmf_bh()
459 if (d->lun != virtio_scsi_get_lun(req->req.tmf.lun)) { in virtio_scsi_do_tmf()
504 if (d->lun != virtio_scsi_get_lun(req->req.tmf.lun)) { in virtio_scsi_do_tmf()
1003 evt->lun[2] = (info->address.lun >> 8) | 0x40; in virtio_scsi_push_event()
1005 evt->lun[3] = info->address.lun & 0xFF; in virtio_scsi_push_event()
1045 .lun = dev->lun, in virtio_scsi_change()
1084 .lun = sd->lun, in virtio_scsi_hotplug()
[all …]
H A Dtrace-events4 scsi_req_alloc(int target, int lun, int tag) "target %d lun %d tag %d"
5 scsi_req_cancel(int target, int lun, int tag) "target %d lun %d tag %d"
6 scsi_req_data(int target, int lun, int tag, int len) "target %d lun %d tag %d len %d"
7 scsi_req_data_canceled(int target, int lun, int tag, int len) "target %d lun %d tag %d len %d"
8 scsi_req_dequeue(int target, int lun, int tag) "target %d lun %d tag %d"
11 scsi_req_continue(int target, int lun, int tag) "target %d lun %d tag %d"
12 scsi_req_continue_canceled(int target, int lun, int tag) "target %d lun %d tag %d"
18 scsi_report_luns(int target, int lun, int tag) "target %d lun %d tag %d"
20 scsi_test_unit_ready(int target, int lun, int tag) "target %d lun %d tag %d"
21 scsi_request_sense(int target, int lun, int tag) "target %d lun %d tag %d"
[all …]
H A Dspapr_vscsi.c159 *lun = (srp_lun >> 48) & 0xff; in vscsi_device_find()
168 *lun = (srp_lun >> 48) & 0x1f; in vscsi_device_find()
171 *lun = -1; in vscsi_device_find()
766 resp_data[i+1] |= dev->lun; in vscsi_report_luns()
785 int n, lun; in vscsi_queue_cmd() local
788 if ((srp->cmd.lun == 0 || be64_to_cpu(srp->cmd.lun) == SRP_REPORT_LUNS_WLUN) in vscsi_queue_cmd()
794 sdev = vscsi_device_find(&s->bus, be64_to_cpu(srp->cmd.lun), &lun); in vscsi_queue_cmd()
844 be64_to_cpu(req_iu(req)->srp.tsk_mgmt.lun), &lun); in vscsi_process_tsk_mgmt()
850 if (d->lun != lun) { in vscsi_process_tsk_mgmt()
863 if (d->lun != lun) { in vscsi_process_tsk_mgmt()
[all …]
H A Dvmw_pvscsi.h117 uint8_t lun[8]; member
213 uint8_t lun[8]; member
307 uint8_t lun[8]; member
H A Dvmw_pvscsi.c141 int lun; member
597 msg.lun[1] = dev->lun; in pvscsi_send_msg()
660 uint8_t lun; in pvscsi_queue_pending_descriptor() local
668 *d = pvscsi_device_find(s, descr->bus, descr->target, descr->lun, &lun); in pvscsi_queue_pending_descriptor()
670 pvscsi_req->lun = lun; in pvscsi_queue_pending_descriptor()
733 r->sreq = scsi_req_new(d, descr->context, r->lun, descr->cdb, descr->cdbLen, r); in pvscsi_process_request_descriptor()
877 sdev = pvscsi_device_find(s, 0, cmd->target, cmd->lun, &target_lun); in pvscsi_on_cmd_reset_device()
H A Dsrp.h187 uint64_t lun; member
208 uint64_t lun; member
H A Dmegasas.c776 pd_id = ((sdev->id & 0xFF) << 8) | (sdev->lun & 0xFF); in megasas_ctrl_get_info()
1010 pd_id = ((sdev->id & 0xFF) << 8) | (sdev->lun & 0xFF); in megasas_dcmd_pd_get_list()
1049 static int megasas_pd_get_info_submit(SCSIDevice *sdev, int lun, in megasas_pd_get_info_submit() argument
1055 uint16_t pd_id = ((sdev->id & 0xFF) << 8) | (lun & 0xFF); in megasas_pd_get_info_submit()
1243 info.targetid[num_ld_disks] = sdev->lun; in megasas_dcmd_ld_list_query()
1257 static int megasas_ld_get_info_submit(SCSIDevice *sdev, int lun, in megasas_ld_get_info_submit() argument
1265 uint16_t sdev_id = ((sdev->id & 0xFF) << 8) | (lun & 0xFF); in megasas_ld_get_info_submit()
1291 info->ld_config.properties.ld.v.target_id = lun; in megasas_ld_get_info_submit()
1647 int lun = req->lun; in megasas_finish_internal_dcmd() local
1653 retval = megasas_pd_get_info_submit(req->dev, lun, cmd); in megasas_finish_internal_dcmd()
[all …]
/qemu/contrib/vhost-user-scsi/
H A Dvhost-user-scsi.c36 VusIscsiLun lun; member
45 static int vus_iscsi_add_lun(VusIscsiLun *lun, char *iscsi_uri) in vus_iscsi_add_lun() argument
51 assert(lun); in vus_iscsi_add_lun()
53 assert(!lun->iscsi_ctx); in vus_iscsi_add_lun()
69 if (iscsi_full_connect_sync(iscsi_ctx, iscsi_url->portal, iscsi_url->lun)) { in vus_iscsi_add_lun()
75 lun->iscsi_ctx = iscsi_ctx; in vus_iscsi_add_lun()
76 lun->iscsi_lun = iscsi_url->lun; in vus_iscsi_add_lun()
140 if (!(!req->lun[1] && req->lun[2] == 0x40 && !req->lun[3])) { in handle_cmd_sync()
143 req->lun[1], req->lun[3]); in handle_cmd_sync()
279 if (handle_cmd_sync(vdev_scsi->lun.iscsi_ctx, in vus_proc_req()
[all …]
/qemu/hw/ufs/
H A Dlu.c107 for (uint8_t lun = 0; lun < UFS_MAX_LUS; ++lun) { in ufs_emulate_report_luns() local
108 if (u->lus[lun]) { in ufs_emulate_report_luns()
115 outbuf[len + 1] = lun; in ufs_emulate_report_luns()
196 uint8_t lun = lu->lun; in ufs_emulate_scsi_cmd() local
229 if (lun == UFS_UPIU_UFS_DEVICE_WLUN) { in ufs_emulate_scsi_cmd()
279 DEFINE_PROP_UINT8("lun", UfsLu, lun, 0),
295 if (u->lus[lu->lun] != NULL) { in ufs_add_lu()
300 u->lus[lu->lun] = lu; in ufs_add_lu()
309 wlu->lun = wlun; in ufs_init_wlu()
323 lu->unit_desc.unit_index = lu->lun; in ufs_init_lu()
[all …]
H A Dufs.h67 uint8_t lun; member
125 static inline bool is_wlun(uint8_t lun) in is_wlun() argument
127 return (lun == UFS_UPIU_REPORT_LUNS_WLUN || in is_wlun()
128 lun == UFS_UPIU_UFS_DEVICE_WLUN || lun == UFS_UPIU_BOOT_WLUN || in is_wlun()
129 lun == UFS_UPIU_RPMB_WLUN); in is_wlun()
H A Dtrace-events11 ufs_exec_scsi_cmd(uint32_t slot, uint8_t lun, uint8_t opcode) "slot %"PRIu32", lun 0x%"PRIx8", opco…
25 ufs_err_scsi_cmd_invalid_lun(uint8_t lun) "scsi command has invalid lun: 0x%"PRIx8""
H A Dufs.c461 uint8_t lun = req->req_upiu.header.lun; in ufs_exec_scsi_cmd() local
467 if (!is_wlun(lun) && (lun >= UFS_MAX_LUS || u->lus[lun] == NULL)) { in ufs_exec_scsi_cmd()
468 trace_ufs_err_scsi_cmd_invalid_lun(lun); in ufs_exec_scsi_cmd()
472 switch (lun) { in ufs_exec_scsi_cmd()
486 lu = u->lus[lun]; in ufs_exec_scsi_cmd()
776 uint8_t lun = req->req_upiu.qr.index; in ufs_read_unit_desc() local
778 if (lun != UFS_UPIU_RPMB_WLUN && in ufs_read_unit_desc()
779 (lun >= UFS_MAX_LUS || u->lus[lun] == NULL)) { in ufs_read_unit_desc()
784 if (lun == UFS_UPIU_RPMB_WLUN) { in ufs_read_unit_desc()
787 memcpy(&req->rsp_upiu.qr.data, &u->lus[lun]->unit_desc, in ufs_read_unit_desc()
[all …]
/qemu/pc-bios/s390-ccw/
H A Dvirtio-scsi.c68 req.lun = make_lun(sdev->channel, sdev->target, sdev->lun); in prepare_request()
223 sdev->lun = vdev->selected_scsi_device.lun; in virtio_scsi_locate_device()
227 IPL_check(sdev->lun <= vdev->config.scsi.max_lun, "LUN# high"); in virtio_scsi_locate_device()
234 sdev->lun = 0; /* LUN has to be 0 for REPORT LUNS */ in virtio_scsi_locate_device()
253 sdev->lun = r->lun[0].v16[0]; /* it's returned this way */ in virtio_scsi_locate_device()
254 debug_print_int("Have to use LUN", sdev->lun); in virtio_scsi_locate_device()
258 if (r->lun[i].v64) { in virtio_scsi_locate_device()
260 sdev->lun = r->lun[i].v16[0]; in virtio_scsi_locate_device()
261 debug_print_int("Will use LUN", sdev->lun); in virtio_scsi_locate_device()
H A Dscsi.h144 ScsiLun lun[1]; /* space for at least 1 lun must be allocated */ member
165 static inline ScsiLun make_lun(uint16_t channel, uint16_t target, uint32_t lun) in make_lun() argument
179 r.v8[2] = (lun >> 8) & 0x3fU; in make_lun()
183 r.v8[3] = lun & 0xffU; in make_lun()
H A Diplb.h38 uint64_t lun; member
49 uint32_t lun; member
H A Dmain.c206 vdev->selected_scsi_device.lun = iplb.scsi.lun; in find_boot_device()
H A Dvirtio-scsi.h37 ScsiLun lun; member
/qemu/include/standard-headers/linux/
H A Dvirtio_scsi.h45 uint8_t lun[8]; /* Logical Unit Number */ member
55 uint8_t lun[8]; /* Logical Unit Number */ member
79 uint8_t lun[8]; member
90 uint8_t lun[8]; member
101 uint8_t lun[8]; member
/qemu/block/
H A Discsi.c69 int lun; member
1708 lun_str = g_strdup_printf("%d", iscsi_url->lun); in iscsi_parse_filename()
1771 static void iscsi_save_designator(IscsiLun *lun, in iscsi_save_designator() argument
1788 *lun->dd = *copy; in iscsi_save_designator()
1789 lun->dd->next = NULL; in iscsi_save_designator()
1810 int i, ret = 0, timeout = 0, lun; in iscsi_open() local
1821 lun = qemu_opt_get_number(opts, "lun", 0); in iscsi_open()
1907 iscsilun->lun = lun; in iscsi_open()
2237 desc[29] = (lun->block_size >> 16) & 0xFF; in iscsi_populate_target_desc()
2238 desc[30] = (lun->block_size >> 8) & 0xFF; in iscsi_populate_target_desc()
[all …]
/qemu/include/hw/scsi/
H A Dscsi.h29 uint32_t lun; member
63 SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun,
86 uint32_t lun; member
208 uint32_t tag, uint32_t lun, void *hba_private);
209 SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
241 SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int target, int lun);
242 SCSIDevice *scsi_device_get(SCSIBus *bus, int channel, int target, int lun);
/qemu/hw/usb/
H A Ddev-uas.c72 uint64_t lun; member
94 uint64_t lun; member
141 uint64_t lun; member
554 req->lun = be64_to_cpu(iu->command.lun); in usb_uas_alloc_request()
555 req->dev = usb_uas_get_dev(req->uas, req->lun); in usb_uas_alloc_request()
722 usb_uas_get_lun(req->lun), in usb_uas_command()
723 req->lun >> 32, req->lun & 0xffffffff); in usb_uas_command()
732 usb_uas_get_lun(req->lun), in usb_uas_command()
764 uint64_t lun64 = be64_to_cpu(iu->task.lun); in usb_uas_task()
766 int lun = usb_uas_get_lun(lun64); in usb_uas_task() local
[all …]
H A Ddev-storage.c35 uint8_t lun; member
372 if (scsi_dev->lun != maxlun+1) { in usb_msd_handle_control()
430 scsi_dev = scsi_device_find(&s->bus, 0, 0, cbw.lun); in usb_msd_handle_data()
432 error_report("usb-msd: Bad LUN %d", cbw.lun); in usb_msd_handle_data()
444 trace_usb_msd_cmd_submit(cbw.lun, tag, cbw.flags, in usb_msd_handle_data()
448 s->req = scsi_req_new(scsi_dev, tag, cbw.lun, cbw.cmd, cbw.cmd_len, NULL); in usb_msd_handle_data()
/qemu/hw/s390x/
H A Dipl.h60 uint64_t lun; member
71 uint32_t lun; member
/qemu/include/hw/virtio/
H A Dvhost-scsi-common.h35 int lun; member

12