]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: ratelimit warnings at start of IOCTLs
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 5 Mar 2019 11:53:22 +0000 (13:53 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 5 Mar 2019 11:53:22 +0000 (13:53 +0200)
commitbb8d89c4d4d5ed6efa7dc8311035ee51ba4f10ac
tree3c2cd9f66735aa23245d975d18627ae23088dd52
parentee006df62c7f93c1a8487fd444edc751537a5121
habanalabs: ratelimit warnings at start of IOCTLs

At the start of some IOCTLs we check if the device is disabled or in reset.
If it is, we return -EBUSY and print a message to kernel log.

Because these IOCTLs can be called at very high frequency, use ratelimit
to avoid spamming the kernel log. Also use the same type of message -
dev_warn - in all the relevant IOCTLs.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/habanalabs_ioctl.c