diff options
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r-- | drivers/target/target_core_device.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 599374e6d245..54439bc42dab 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
@@ -706,6 +706,16 @@ int se_dev_set_unmap_granularity_alignment( | |||
706 | return 0; | 706 | return 0; |
707 | } | 707 | } |
708 | 708 | ||
709 | int se_dev_set_max_write_same_len( | ||
710 | struct se_device *dev, | ||
711 | u32 max_write_same_len) | ||
712 | { | ||
713 | dev->dev_attrib.max_write_same_len = max_write_same_len; | ||
714 | pr_debug("dev[%p]: Set max_write_same_len: %u\n", | ||
715 | dev, dev->dev_attrib.max_write_same_len); | ||
716 | return 0; | ||
717 | } | ||
718 | |||
709 | int se_dev_set_emulate_dpo(struct se_device *dev, int flag) | 719 | int se_dev_set_emulate_dpo(struct se_device *dev, int flag) |
710 | { | 720 | { |
711 | if (flag != 0 && flag != 1) { | 721 | if (flag != 0 && flag != 1) { |
@@ -1393,6 +1403,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name) | |||
1393 | dev->dev_attrib.unmap_granularity = DA_UNMAP_GRANULARITY_DEFAULT; | 1403 | dev->dev_attrib.unmap_granularity = DA_UNMAP_GRANULARITY_DEFAULT; |
1394 | dev->dev_attrib.unmap_granularity_alignment = | 1404 | dev->dev_attrib.unmap_granularity_alignment = |
1395 | DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT; | 1405 | DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT; |
1406 | dev->dev_attrib.max_write_same_len = DA_MAX_WRITE_SAME_LEN; | ||
1396 | dev->dev_attrib.fabric_max_sectors = DA_FABRIC_MAX_SECTORS; | 1407 | dev->dev_attrib.fabric_max_sectors = DA_FABRIC_MAX_SECTORS; |
1397 | dev->dev_attrib.optimal_sectors = DA_FABRIC_MAX_SECTORS; | 1408 | dev->dev_attrib.optimal_sectors = DA_FABRIC_MAX_SECTORS; |
1398 | 1409 | ||