]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btusb: Revert Fix the autosuspend enable and disable
authorHans de Goede <hdegoede@redhat.com>
Fri, 9 Apr 2021 13:58:50 +0000 (15:58 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 9 Apr 2021 16:08:02 +0000 (09:08 -0700)
commit9e3985db1e1272e7909d6995a9354b01430640d8
treef6628c0cb235dc2bd17e4eec8a3b62d672903579
parent403d914df94aba1c1ebcb414ca4881c869a93137
Bluetooth: btusb: Revert Fix the autosuspend enable and disable

drivers/usb/core/hub.c: usb_new_device() contains the following:

        /* By default, forbid autosuspend for all devices.  It will be
         * allowed for hubs during binding.
         */
        usb_disable_autosuspend(udev);

So for anything which is not a hub, such as btusb devices, autosuspend is
disabled by default and we must call usb_enable_autosuspend(udev) to
enable it.

This means that the "Fix the autosuspend enable and disable" commit,
which drops the usb_enable_autosuspend() call when the enable_autosuspend
module option is true, is completely wrong, revert it.

This reverts commit 42bedd210cd945c59ee742fe0bde38c792a5db23.

Cc: Hui Wang <hui.wang@canonical.com>
Fixes: 42bedd210cd9 ("Bluetooth: btusb: Fix the autosuspend enable and disable")
Acked-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/bluetooth/btusb.c