]> git.baikalelectronics.ru Git - kernel.git/commit
bus: mhi: core: Ensure non-zero session or sequence ID values are used
authorBhaumik Bhatt <bbhatt@codeaurora.org>
Thu, 21 May 2020 17:02:43 +0000 (22:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2020 07:35:43 +0000 (09:35 +0200)
commitf11aa9376b1089e5fbd26951a3d52d25ad1cb576
tree0d980982c2a46c9a2eb12caa5949f2874f00faaf
parentb8330a1715006f00fd2b67378ffd433514e6eba5
bus: mhi: core: Ensure non-zero session or sequence ID values are used

While writing any sequence or session identifiers, it is possible that
the host could write a zero value, whereas only non-zero values should
be supported writes to those registers. Ensure that the host does not
write a non-zero value for them and also log them in debug messages. A
macro is introduced to simplify this check and the existing checks are
also converted to use this macro.

Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200521170249.21795-9-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/core/boot.c
drivers/bus/mhi/core/internal.h