s390/cio: allow to reset channel measurement block
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 12 Jul 2016 17:57:57 +0000 (19:57 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 14 Jul 2016 11:01:49 +0000 (13:01 +0200)
commit0f5d050ceaa31b2229102211d60c149f920df3aa
tree37526935ceba9b643ff083e79621b533a389228b
parent8f50af49f564d4e57c03903ca374109bdc270ea9
s390/cio: allow to reset channel measurement block

Prior to commit 1bc6664bdfb949bc69a08113801e7d6acbf6bc3f a call to
enable_cmf for a device for which channel measurement was already
enabled resulted in a reset of the measurement data.

What looked like bugs at the time (a 2nd allocation was triggered
but failed, reset was called regardless of previous failures, and
errors have not been reported to userspace) was actually something
at least one userspace tool depended on. Restore that behavior in
a sane way.

Fixes: 1bc6664bdfb ("s390/cio: use device_lock during cmb activation")
Cc: stable@vger.kernel.org #v4.4+
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cmf.c