Commit bd86055f authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/scm_blk: allow more cluster size values

Allow 0 and powers of 2 between 2 and 128 for write_cluster_size.
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 3ad19b8f
......@@ -223,6 +223,8 @@ void scm_cluster_request_irq(struct scm_request *scmrq)
bool scm_cluster_size_valid(void)
{
return write_cluster_size == 0 || write_cluster_size == 32 ||
write_cluster_size == 64 || write_cluster_size == 128;
if (write_cluster_size == 1 || write_cluster_size > 128)
return false;
return !(write_cluster_size & (write_cluster_size - 1));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment