Skip to content

Commit

Permalink
s390/scm_blk: allow more cluster size values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Apr 26, 2013
1 parent 3ad19b8 commit bd86055
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/s390/block/scm_blk_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

0 comments on commit bd86055

Please sign in to comment.