ipmi: Move BT capabilities detection to the detect call
authorCorey Minyard <cminyard@mvista.com>
Thu, 23 Aug 2018 20:22:35 +0000 (15:22 -0500)
committerCorey Minyard <cminyard@mvista.com>
Fri, 31 Aug 2018 13:42:59 +0000 (08:42 -0500)
commitc86ba91be75702c013bbf7379542920b6920e98f
tree04f0b308995e31b3b0a43ab276892fd18ec396f3
parent2512e40e48d21d8bac09f7e91d2c3ceb2d3b50b2
ipmi: Move BT capabilities detection to the detect call

The capabilities detection was being done as part of the normal
state machine, but it was possible for it to be running while
the upper layers of the IPMI driver were initializing the
device, resulting in error and failure to initialize.

Move the capabilities detection to the the detect function,
so it's done before anything else runs on the device.  This also
simplifies the state machine and removes some code, as a bonus.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reported-by: Andrew Banman <abanman@hpe.com>
Tested-by: Andrew Banman <abanman@hpe.com>
Cc: <stable@vger.kernel.org>
drivers/char/ipmi/ipmi_bt_sm.c