OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:30 +0000 (08:39 +0200)
commit31364b2e1fb1cabdc647d7c8ccc958674b39879a
treedeaf9cc74616c8a32e961063ff65944ce7101e41
parent288bd736c8a027040fc261c86a87b65e7bc3f6fa
ipmi: Move BT capabilities detection to the detect call

commit c86ba91be75702c013bbf7379542920b6920e98f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ipmi/ipmi_bt_sm.c