Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2019-02-22 17:52:00 +0100
committerJean Delvare <jdelvare@suse.de>2019-02-22 17:52:00 +0100
commitde9c575426713903199960c85ceeba1a1937032a (patch)
tree2494a7928e893bb02b0c0044f5827554f223482e
parenta67a66e4fd7205124185764c8a97eb58d3bb9904 (diff)
Revert "sd: disable logical block provisioning if 'lbpme' is not set"
This reverts commit 63e716455c756ccbf5722cf3a7764cfe902a4a14. Patch not accepted upstream. suse-commit: 99b4d6511a56daf1f2707589e7e59002c9581d82
-rw-r--r--drivers/scsi/sd.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 7549d53df485..d9c03f894f55 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -411,13 +411,6 @@ provisioning_mode_store(struct device *dev, struct device_attribute *attr,
if (mode < 0)
return -EINVAL;
- /*
- * If logical block provisioning isn't enabled we can only
- * select 'disable' here.
- */
- if (!sdkp->lbpme && mode != SD_LBP_DISABLE)
- return -EINVAL;
-
sd_config_discard(sdkp, mode);
return count;
@@ -2949,10 +2942,8 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
sdkp->max_ws_blocks = (u32)get_unaligned_be64(&buffer[36]);
- if (!sdkp->lbpme) {
- sd_config_discard(sdkp, SD_LBP_DISABLE);
+ if (!sdkp->lbpme)
goto out;
- }
lba_count = get_unaligned_be32(&buffer[20]);
desc_count = get_unaligned_be32(&buffer[24]);