lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Bluetooth: Skip the shutdown routine if the interface is not up
From
From: Marcel Holtmann <marcel@holtmann.org>
Date: Sun, 26 Apr 2015 21:49:06 -0700

> Hi Gabriele,
>
>> Most likely, the shutdown routine requires the interface to be up.
>> This is the case for BTUSB_INTEL: the routine tries to send a command
>> to the interface, but since this one is down, it fails and exits once
>> HCI_INIT_TIMEOUT has expired.
>>
>> Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
>> ---
>> net/bluetooth/hci_core.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
>> index 476709b..4663c3d 100644
>> --- a/net/bluetooth/hci_core.c
>> +++ b/net/bluetooth/hci_core.c
>> @@ -1557,7 +1557,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
>> {
>> BT_DBG("%s %p", hdev->name, hdev);
>>
>> - if (!hci_dev_test_flag(hdev, HCI_UNREGISTER)) {
>> + if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
>> + test_bit(HCI_UP, &hdev->flags)) {
>> /* Execute vendor specific shutdown routine */
>> if (hdev->shutdown)
>> hdev->shutdown(hdev);
>
> this is a good catch.
>
> Acked-by: Marcel Holtmann <marcel@holtmann.org>
> Cc: stable@vger.kernel.org # 4.0.x
>
> Dave, do you want to take this patch straight into your stable tree?

Please handle this via the bluetooth tree, thanks.


\
 
 \ /
  Last update: 2015-04-27 07:41    [W:0.038 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site