aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-04-25 07:02:39 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-04-26 03:07:15 -0400
commitbd86055fc938493259a15dc00ee77435b4d2e83f (patch)
tree6b27c3a5b29acf645beccca7f6231a2b03db9f86 /drivers/s390/block
parent3ad19b8fb07497f975aa6aba187198ce11191dd2 (diff)
s390/scm_blk: allow more cluster size values
Allow 0 and powers of 2 between 2 and 128 for write_cluster_size. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/scm_blk_cluster.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/block/scm_blk_cluster.c b/drivers/s390/block/scm_blk_cluster.c
index f4bb61b0cea1..c0d102e3a48b 100644
--- a/drivers/s390/block/scm_blk_cluster.c
+++ b/drivers/s390/block/scm_blk_cluster.c
@@ -223,6 +223,8 @@ void scm_cluster_request_irq(struct scm_request *scmrq)
223 223
224bool scm_cluster_size_valid(void) 224bool scm_cluster_size_valid(void)
225{ 225{
226 return write_cluster_size == 0 || write_cluster_size == 32 || 226 if (write_cluster_size == 1 || write_cluster_size > 128)
227 write_cluster_size == 64 || write_cluster_size == 128; 227 return false;
228
229 return !(write_cluster_size & (write_cluster_size - 1));
228} 230}