/kernel/linux/linux-5.10/drivers/target/ |
H A D | target_core_file.c | 152 if (target_configure_unmap_from_queue(&dev->dev_attrib, q)) in fd_configure_device() 159 dev->dev_attrib.max_write_same_len = 0xFFFF; in fd_configure_device() 162 dev->dev_attrib.is_nonrot = 1; in fd_configure_device() 175 dev->dev_attrib.max_unmap_lba_count = 0x2000; in fd_configure_device() 179 dev->dev_attrib.max_unmap_block_desc_count = 1; in fd_configure_device() 180 dev->dev_attrib.unmap_granularity = 1; in fd_configure_device() 181 dev->dev_attrib.unmap_granularity_alignment = 0; in fd_configure_device() 187 dev->dev_attrib.max_write_same_len = 0x1000; in fd_configure_device() 190 dev->dev_attrib.hw_block_size = fd_dev->fd_block_size; in fd_configure_device() 191 dev->dev_attrib in fd_configure_device() [all...] |
H A D | target_core_device.c | 778 dev->dev_attrib.da_dev = dev; in target_alloc_device() 779 dev->dev_attrib.emulate_model_alias = DA_EMULATE_MODEL_ALIAS; in target_alloc_device() 780 dev->dev_attrib.emulate_dpo = 1; in target_alloc_device() 781 dev->dev_attrib.emulate_fua_write = 1; in target_alloc_device() 782 dev->dev_attrib.emulate_fua_read = 1; in target_alloc_device() 783 dev->dev_attrib.emulate_write_cache = DA_EMULATE_WRITE_CACHE; in target_alloc_device() 784 dev->dev_attrib.emulate_ua_intlck_ctrl = TARGET_UA_INTLCK_CTRL_CLEAR; in target_alloc_device() 785 dev->dev_attrib.emulate_tas = DA_EMULATE_TAS; in target_alloc_device() 786 dev->dev_attrib.emulate_tpu = DA_EMULATE_TPU; in target_alloc_device() 787 dev->dev_attrib in target_alloc_device() [all...] |
H A D | target_core_spc.c | 83 if (dev->dev_attrib.emulate_3pc) in spc_emulate_inquiry_std() 92 if (dev->dev_attrib.pi_prot_type || cmd->se_sess->sess_prot_type) in spc_emulate_inquiry_std() 449 if (dev->dev_attrib.pi_prot_type == TARGET_DIF_TYPE1_PROT || in spc_emulate_evpd_86() 452 else if (dev->dev_attrib.pi_prot_type == TARGET_DIF_TYPE3_PROT || in spc_emulate_evpd_86() 460 (dev->dev_attrib.pi_prot_type || cmd->se_sess->sess_prot_type)) { in spc_emulate_evpd_86() 491 if (dev->dev_attrib.emulate_tpu || dev->dev_attrib.emulate_tpws) in spc_emulate_evpd_b0() 502 if (dev->dev_attrib.emulate_caw) in spc_emulate_evpd_b0() 509 put_unaligned_be16(min / dev->dev_attrib.block_size, &buf[6]); in spc_emulate_evpd_b0() 521 dev->dev_attrib in spc_emulate_evpd_b0() [all...] |
H A D | target_core_iblock.c | 108 dev->dev_attrib.hw_block_size = bdev_logical_block_size(bd); in iblock_configure_device() 109 dev->dev_attrib.hw_max_sectors = queue_max_hw_sectors(q); in iblock_configure_device() 110 dev->dev_attrib.hw_queue_depth = q->nr_requests; in iblock_configure_device() 112 if (target_configure_unmap_from_queue(&dev->dev_attrib, q)) in iblock_configure_device() 122 dev->dev_attrib.max_write_same_len = max_write_zeroes_sectors; in iblock_configure_device() 124 dev->dev_attrib.max_write_same_len = 0xFFFF; in iblock_configure_device() 127 dev->dev_attrib.is_nonrot = 1; in iblock_configure_device() 142 dev->dev_attrib.pi_prot_type = TARGET_DIF_TYPE3_PROT; in iblock_configure_device() 144 dev->dev_attrib.pi_prot_type = TARGET_DIF_TYPE1_PROT; in iblock_configure_device() 147 if (dev->dev_attrib in iblock_configure_device() [all...] |
H A D | target_core_sbc.c | 62 put_unaligned_be32(dev->dev_attrib.block_size, &buf[4]); in sbc_emulate_readcapacity() 79 int pi_prot_type = dev->dev_attrib.pi_prot_type; in sbc_emulate_readcapacity_16() 87 put_unaligned_be32(dev->dev_attrib.block_size, &buf[8]); in sbc_emulate_readcapacity_16() 116 if (dev->dev_attrib.emulate_tpu || dev->dev_attrib.emulate_tpws) { in sbc_emulate_readcapacity_16() 123 if (dev->dev_attrib.unmap_zeroes_data) in sbc_emulate_readcapacity_16() 218 return cmd->se_dev->dev_attrib.block_size * sectors; in sbc_get_size() 295 if (sectors > cmd->se_dev->dev_attrib.max_write_same_len) { in sbc_setup_write_same() 297 sectors, cmd->se_dev->dev_attrib.max_write_same_len); in sbc_setup_write_same() 323 if (!dev->dev_attrib in sbc_setup_write_same() [all...] |
H A D | target_core_rd.c | 299 dev->dev_attrib.hw_block_size = RD_BLOCKSIZE; in rd_configure_device() 300 dev->dev_attrib.hw_max_sectors = UINT_MAX; in rd_configure_device() 301 dev->dev_attrib.hw_queue_depth = RD_MAX_DEVICE_QUEUE_DEPTH; in rd_configure_device() 302 dev->dev_attrib.is_nonrot = 1; in rd_configure_device() 385 u32 sectors = cmd->data_length / se_dev->dev_attrib.block_size; in rd_do_prot_rw() 402 if (se_dev->dev_attrib.pi_prot_verify) { in rd_do_prot_rw() 437 tmp = cmd->t_task_lba * se_dev->dev_attrib.block_size; in rd_execute_rw() 453 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw() 521 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw() 604 dev->dev_attrib in rd_get_blocks() [all...] |
H A D | target_core_xcopy.c | 62 if (!se_dev->dev_attrib.emulate_3pc) { in target_xcopy_locate_se_dev_e4_iter() 603 u32 length = (src_sectors * src_dev->dev_attrib.block_size); in target_xcopy_read_source() 648 u32 length = (dst_sectors * dst_dev->dev_attrib.block_size); in target_xcopy_write_destination() 707 max_sectors = min(src_dev->dev_attrib.hw_max_sectors, in target_xcopy_do_work() 708 dst_dev->dev_attrib.hw_max_sectors); in target_xcopy_do_work() 720 u32 cur_bytes = cur_nolb * src_dev->dev_attrib.block_size; in target_xcopy_do_work() 771 copied_nolb, copied_nolb * dst_dev->dev_attrib.block_size); in target_xcopy_do_work() 864 if (xop->src_dev->dev_attrib.block_size != in target_parse_xcopy_cmd() 865 xop->dst_dev->dev_attrib.block_size) { in target_parse_xcopy_cmd() 868 xop->src_dev->dev_attrib in target_parse_xcopy_cmd() [all...] |
H A D | target_core_ua.c | 202 bool dev_ua_intlck_clear = (dev->dev_attrib.emulate_ua_intlck_ctrl in core_scsi3_ua_for_check_condition() 260 dev->dev_attrib.emulate_ua_intlck_ctrl, in core_scsi3_ua_for_check_condition()
|
H A D | target_core_user.c | 2120 if (dev->dev_attrib.hw_block_size == 0) in tcmu_configure_device() 2121 dev->dev_attrib.hw_block_size = 512; in tcmu_configure_device() 2123 if (!dev->dev_attrib.hw_max_sectors) in tcmu_configure_device() 2124 dev->dev_attrib.hw_max_sectors = 128; in tcmu_configure_device() 2125 if (!dev->dev_attrib.emulate_write_cache) in tcmu_configure_device() 2126 dev->dev_attrib.emulate_write_cache = 0; in tcmu_configure_device() 2127 dev->dev_attrib.hw_queue_depth = 128; in tcmu_configure_device() 2293 static int tcmu_set_dev_attrib(substring_t *arg, u32 *dev_attrib) in tcmu_set_dev_attrib() argument 2309 *dev_attrib = val; in tcmu_set_dev_attrib() 2384 &(dev->dev_attrib in tcmu_set_configfs_dev_params() [all...] |
H A D | target_core_transport.c | 366 * initiators for device backends with !dev->dev_attrib.pi_prot_type. in __transport_register_session() 979 dev->dev_attrib.block_size, in transport_dump_dev_state() 980 dev->dev_attrib.hw_max_sectors); in transport_dump_dev_state() 1282 u32 sectors = (mtl / dev->dev_attrib.block_size); in target_check_max_data_sg_nents() 1337 if (dev->dev_attrib.block_size != 512) { in target_cmd_size_check() 1942 cmd->se_dev->dev_attrib.emulate_ua_intlck_ctrl in transport_generic_request_failure() 2034 sectors = cmd->data_length >> ilog2(cmd->se_dev->dev_attrib.block_size); in target_write_prot_action() 2329 ilog2(cmd->se_dev->dev_attrib.block_size); in target_read_prot_action() 2647 cmd->se_dev->dev_attrib.block_size; in transport_generic_new_cmd() 2669 cmd->se_dev->dev_attrib in transport_generic_new_cmd() [all...] |
H A D | target_core_configfs.c | 1021 if (val > dev->dev_attrib.queue_depth) { in queue_depth_store() 1022 if (val > dev->dev_attrib.hw_queue_depth) { in queue_depth_store() 1026 dev->dev_attrib.hw_queue_depth); in queue_depth_store() 1213 * dev_attrib attributes for devices using the target core SBC/SPC 1257 * Minimal dev_attrib attributes for devices passing through CDBs. 1274 * pr related dev_attrib attributes for devices passing through CDBs, 1284 TB_CIT_SETUP_DRV(dev_attrib, NULL, NULL); 1714 if (!dev->dev_attrib.emulate_pr) in target_pr_res_holder_show() 1857 if (!dev->dev_attrib.emulate_pr) in target_pr_res_type_show() 1872 if (!dev->dev_attrib in target_pr_res_aptpl_active_show() [all...] |
H A D | target_core_pscsi.c | 303 dev->dev_attrib.hw_block_size = in pscsi_add_device_to_list() 305 dev->dev_attrib.hw_max_sectors = in pscsi_add_device_to_list() 307 dev->dev_attrib.hw_queue_depth = sd->queue_depth; in pscsi_add_device_to_list() 331 dev->dev_attrib.hw_block_size = sd->sector_size; in pscsi_add_device_to_list()
|
/kernel/linux/linux-6.6/drivers/target/ |
H A D | target_core_file.c | 95 return target_configure_unmap_from_queue(&dev->dev_attrib, in fd_configure_unmap() 99 dev->dev_attrib.max_unmap_lba_count = 0x2000; in fd_configure_unmap() 101 dev->dev_attrib.max_unmap_block_desc_count = 1; in fd_configure_unmap() 102 dev->dev_attrib.unmap_granularity = 1; in fd_configure_unmap() 103 dev->dev_attrib.unmap_granularity_alignment = 0; in fd_configure_unmap() 174 dev->dev_attrib.max_write_same_len = 0xFFFF; in fd_configure_device() 177 dev->dev_attrib.is_nonrot = 1; in fd_configure_device() 192 dev->dev_attrib.max_write_same_len = 0x1000; in fd_configure_device() 195 dev->dev_attrib.hw_block_size = fd_dev->fd_block_size; in fd_configure_device() 196 dev->dev_attrib in fd_configure_device() [all...] |
H A D | target_core_device.c | 749 dev->dev_attrib.da_dev = dev; in target_alloc_device() 750 dev->dev_attrib.emulate_model_alias = DA_EMULATE_MODEL_ALIAS; in target_alloc_device() 751 dev->dev_attrib.emulate_dpo = 1; in target_alloc_device() 752 dev->dev_attrib.emulate_fua_write = 1; in target_alloc_device() 753 dev->dev_attrib.emulate_fua_read = 1; in target_alloc_device() 754 dev->dev_attrib.emulate_write_cache = DA_EMULATE_WRITE_CACHE; in target_alloc_device() 755 dev->dev_attrib.emulate_ua_intlck_ctrl = TARGET_UA_INTLCK_CTRL_CLEAR; in target_alloc_device() 756 dev->dev_attrib.emulate_tas = DA_EMULATE_TAS; in target_alloc_device() 757 dev->dev_attrib.emulate_tpu = DA_EMULATE_TPU; in target_alloc_device() 758 dev->dev_attrib in target_alloc_device() [all...] |
H A D | target_core_iblock.c | 86 return target_configure_unmap_from_queue(&dev->dev_attrib, in iblock_configure_unmap() 128 dev->dev_attrib.hw_block_size = bdev_logical_block_size(bd); in iblock_configure_device() 129 dev->dev_attrib.hw_max_sectors = mult_frac(queue_max_hw_sectors(q), in iblock_configure_device() 131 dev->dev_attrib.hw_block_size); in iblock_configure_device() 132 dev->dev_attrib.hw_queue_depth = q->nr_requests; in iblock_configure_device() 140 dev->dev_attrib.max_write_same_len = max_write_zeroes_sectors; in iblock_configure_device() 142 dev->dev_attrib.max_write_same_len = 0xFFFF; in iblock_configure_device() 145 dev->dev_attrib.is_nonrot = 1; in iblock_configure_device() 160 dev->dev_attrib.pi_prot_type = TARGET_DIF_TYPE3_PROT; in iblock_configure_device() 162 dev->dev_attrib in iblock_configure_device() [all...] |
H A D | target_core_xcopy.c | 49 if (!se_dev->dev_attrib.emulate_3pc) { in target_xcopy_locate_se_dev_e4_iter() 578 u32 transfer_length_block = src_bytes / src_dev->dev_attrib.block_size; in target_xcopy_read_source() 623 u32 transfer_length_block = dst_bytes / dst_dev->dev_attrib.block_size; in target_xcopy_write_destination() 687 max_bytes_src = (unsigned long long) src_dev->dev_attrib.hw_max_sectors * in target_xcopy_do_work() 688 src_dev->dev_attrib.hw_block_size; in target_xcopy_do_work() 689 max_bytes_dst = (unsigned long long) dst_dev->dev_attrib.hw_max_sectors * in target_xcopy_do_work() 690 dst_dev->dev_attrib.hw_block_size; in target_xcopy_do_work() 699 max_blocks = max_bytes >> ilog2(src_dev->dev_attrib.block_size); in target_xcopy_do_work() 707 u32 cur_bytes = min_t(u64, max_bytes, nolb * src_dev->dev_attrib.block_size); in target_xcopy_do_work() 708 unsigned short cur_nolb = cur_bytes / src_dev->dev_attrib in target_xcopy_do_work() [all...] |
H A D | target_core_spc.c | 105 if (dev->dev_attrib.emulate_3pc) in spc_emulate_inquiry_std() 114 if (dev->dev_attrib.pi_prot_type || cmd->se_sess->sess_prot_type) in spc_emulate_inquiry_std() 477 if (dev->dev_attrib.pi_prot_type == TARGET_DIF_TYPE1_PROT || in spc_emulate_evpd_86() 480 else if (dev->dev_attrib.pi_prot_type == TARGET_DIF_TYPE3_PROT || in spc_emulate_evpd_86() 488 (dev->dev_attrib.pi_prot_type || cmd->se_sess->sess_prot_type)) { in spc_emulate_evpd_86() 520 if (dev->dev_attrib.emulate_tpu || dev->dev_attrib.emulate_tpws) in spc_emulate_evpd_b0() 531 if (dev->dev_attrib.emulate_caw) in spc_emulate_evpd_b0() 538 put_unaligned_be16(min / dev->dev_attrib.block_size, &buf[6]); in spc_emulate_evpd_b0() 550 dev->dev_attrib in spc_emulate_evpd_b0() [all...] |
H A D | target_core_sbc.c | 62 put_unaligned_be32(dev->dev_attrib.block_size, &buf[4]); in sbc_emulate_readcapacity() 79 int pi_prot_type = dev->dev_attrib.pi_prot_type; in sbc_emulate_readcapacity_16() 87 put_unaligned_be32(dev->dev_attrib.block_size, &buf[8]); in sbc_emulate_readcapacity_16() 116 if (dev->dev_attrib.emulate_tpu || dev->dev_attrib.emulate_tpws) { in sbc_emulate_readcapacity_16() 123 if (dev->dev_attrib.unmap_zeroes_data) in sbc_emulate_readcapacity_16() 218 return cmd->se_dev->dev_attrib.block_size * sectors; in sbc_get_size() 288 if (sectors > cmd->se_dev->dev_attrib.max_write_same_len) { in sbc_setup_write_same() 290 sectors, cmd->se_dev->dev_attrib.max_write_same_len); in sbc_setup_write_same() 322 if (!dev->dev_attrib in sbc_setup_write_same() [all...] |
H A D | target_core_rd.c | 299 dev->dev_attrib.hw_block_size = RD_BLOCKSIZE; in rd_configure_device() 300 dev->dev_attrib.hw_max_sectors = UINT_MAX; in rd_configure_device() 301 dev->dev_attrib.hw_queue_depth = RD_MAX_DEVICE_QUEUE_DEPTH; in rd_configure_device() 302 dev->dev_attrib.is_nonrot = 1; in rd_configure_device() 385 u32 sectors = cmd->data_length / se_dev->dev_attrib.block_size; in rd_do_prot_rw() 402 if (se_dev->dev_attrib.pi_prot_verify) { in rd_do_prot_rw() 437 tmp = cmd->t_task_lba * se_dev->dev_attrib.block_size; in rd_execute_rw() 453 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw() 521 if (cmd->prot_type && se_dev->dev_attrib.pi_prot_type && in rd_execute_rw() 623 dev->dev_attrib in rd_get_blocks() [all...] |
H A D | target_core_ua.c | 202 bool dev_ua_intlck_clear = (dev->dev_attrib.emulate_ua_intlck_ctrl in core_scsi3_ua_for_check_condition() 260 dev->dev_attrib.emulate_ua_intlck_ctrl, in core_scsi3_ua_for_check_condition()
|
H A D | target_core_pscsi.c | 298 dev->dev_attrib.hw_block_size = in pscsi_add_device_to_list() 300 dev->dev_attrib.hw_max_sectors = in pscsi_add_device_to_list() 302 dev->dev_attrib.hw_queue_depth = sd->queue_depth; in pscsi_add_device_to_list() 326 dev->dev_attrib.hw_block_size = sd->sector_size; in pscsi_add_device_to_list()
|
H A D | target_core_transport.c | 402 * initiators for device backends with !dev->dev_attrib.pi_prot_type. in __transport_register_session() 1062 dev->dev_attrib.block_size, in transport_dump_dev_state() 1063 dev->dev_attrib.hw_max_sectors); in transport_dump_dev_state() 1365 u32 sectors = (mtl / dev->dev_attrib.block_size); in target_check_max_data_sg_nents() 2101 cmd->se_dev->dev_attrib.emulate_ua_intlck_ctrl in transport_generic_request_failure() 2193 sectors = cmd->data_length >> ilog2(cmd->se_dev->dev_attrib.block_size); in target_write_prot_action() 2488 ilog2(cmd->se_dev->dev_attrib.block_size); in target_read_prot_action() 2806 cmd->se_dev->dev_attrib.block_size; in transport_generic_new_cmd() 2828 cmd->se_dev->dev_attrib.block_size; in transport_generic_new_cmd() 3664 else if (dev->dev_attrib in target_check_wce() [all...] |
H A D | target_core_user.c | 2265 if (dev->dev_attrib.hw_block_size == 0) in tcmu_configure_device() 2266 dev->dev_attrib.hw_block_size = 512; in tcmu_configure_device() 2268 if (!dev->dev_attrib.hw_max_sectors) in tcmu_configure_device() 2269 dev->dev_attrib.hw_max_sectors = 128; in tcmu_configure_device() 2270 if (!dev->dev_attrib.emulate_write_cache) in tcmu_configure_device() 2271 dev->dev_attrib.emulate_write_cache = 0; in tcmu_configure_device() 2272 dev->dev_attrib.hw_queue_depth = 128; in tcmu_configure_device() 2445 static int tcmu_set_dev_attrib(substring_t *arg, u32 *dev_attrib) in tcmu_set_dev_attrib() argument 2461 *dev_attrib = val; in tcmu_set_dev_attrib() 2610 &(dev->dev_attrib in tcmu_set_configfs_dev_params() [all...] |
/kernel/linux/linux-5.10/drivers/edac/ |
H A D | edac_device.c | 64 struct edac_dev_sysfs_block_attribute *dev_attrib, *attrib_p, *attrib; in edac_device_alloc_ctl_info() local 100 dev_attrib = edac_align_ptr(&p, sizeof(*dev_attrib), count); in edac_device_alloc_ctl_info() 106 * At this point 'pvt' (like dev_inst,dev_blk and dev_attrib) in edac_device_alloc_ctl_info() 127 dev_attrib = (struct edac_dev_sysfs_block_attribute *) in edac_device_alloc_ctl_info() 128 (((char *)dev_ctl) + ((unsigned long)dev_attrib)); in edac_device_alloc_ctl_info() 177 attrib_p = &dev_attrib[block*nr_instances*nr_attrib]; in edac_device_alloc_ctl_info()
|
/kernel/linux/linux-6.6/drivers/edac/ |
H A D | edac_device.c | 62 struct edac_dev_sysfs_block_attribute *dev_attrib, *attrib_p, *attrib; in edac_device_alloc_ctl_info() local 89 dev_attrib = kcalloc(nr_attrib, sizeof(struct edac_dev_sysfs_block_attribute), in edac_device_alloc_ctl_info() 91 if (!dev_attrib) in edac_device_alloc_ctl_info() 94 dev_ctl->attribs = dev_attrib; in edac_device_alloc_ctl_info() 144 attrib_p = &dev_attrib[block*nr_instances*nr_attrib]; in edac_device_alloc_ctl_info()
|