habanalabs: remove unnecessary device status check
authorOded Gabbay <ogabbay@kernel.org>
Fri, 20 Aug 2021 11:10:40 +0000 (14:10 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 1 Sep 2021 15:38:24 +0000 (18:38 +0300)
commit053caa267fd1a46f6cea37bb6ee39b4a8779840f
treec5d14c1b88430172a69e6a8c1b83d5f155d69dbe
parent176d23a77edb7f10611bf61f1196abde119c7694
habanalabs: remove unnecessary device status check

Checking if the device is operational when entering the function to
wait for user interrupt is not something that is useful or necessary.

It is not done in any other wait_for_cs ioctl path.

If the device becomes non-operational during the wait, the reset
function will make sure the process wait is interrupted.

Instead, move the check to the beginning of hl_wait_ioctl(). It will
block any attempt to wait on CS or user interrupt once the device
is already marked as non-operational.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c