Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1373694pxf; Fri, 9 Apr 2021 06:59:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlMTRCZKWkWApgI9D7a4KcQ62i42O56lM0kMS+bD4fyde/CWyp8GXhi53l1EmW4Q3X1AIX X-Received: by 2002:a17:90a:8813:: with SMTP id s19mr13756035pjn.94.1617976795528; Fri, 09 Apr 2021 06:59:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617976795; cv=none; d=google.com; s=arc-20160816; b=Ogux22VsaXBDG1nU5krdQAAafOuwjM8Lb9xyySXBEwAXu+pRCNg+4W3icCENXbooO6 BfHwDPxAt0bDRcB4B/irvZ/VyUgeSeW6BCEwVxx1PU6uVFkeDc3iXmfeNr0t8J6213bi prw+EKAQxaOGZIiBEUUylrausAJ8m5kDYq/AAiKYpIgP4XJY1QmzO980R5sImhRYrY9+ 2HQ3EQ0yMh1FA2fjvDGy1xPtXIw6v9hrYv0Kk98hsTJtgA0W4vTpTUZE5gbJmH/EiCft RcsVZ1gJxbEjlv+2xGsFQ7x4gtp9qNR45J+k38mWacLnq6Puo8e2UbX2EUIF0Df87U0G lIJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NDcS8GoQ3L3C1hzomfAqrhX5CNIDi8TF3tk5rXeoaG4=; b=jfPKvW1cdWVfIPCTdrUSkL698RM5VFJi/OZN4YB4h6QQEPmy1IvBcj8MrTmiojJpBS 4wPEv9cH0dN56wGrbJRbNnBSPvRHa+9UI8xLJl1dgrB27Xh6p5SLmG3PA9+cAbIouFMZ j5POcX5f1F9YDPVxYN5PMsrSeD1Bkmmy05GFCxQWLG2eI6JsT44rhajL3pcpOL2ni5No nyY6fwvPE+SBNFNQTvoDfunUlNDRAt9Ujn71XGakmbOmgP3TZi+/CPssJoGW8ZXK2Nqo rbTGk3fdeSPVeSdmjPZlWVNJH5P/csPJ3UHetF/NPxbHDRQXyjHgXaRsnhC/KC1lrGKO mIhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YGJLtrRQ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si3005196plx.227.2021.04.09.06.59.40; Fri, 09 Apr 2021 06:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YGJLtrRQ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231402AbhDIN7N (ORCPT + 99 others); Fri, 9 Apr 2021 09:59:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40841 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233577AbhDIN7M (ORCPT ); Fri, 9 Apr 2021 09:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617976738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NDcS8GoQ3L3C1hzomfAqrhX5CNIDi8TF3tk5rXeoaG4=; b=YGJLtrRQQuPF/IjFVlGFPesQL8uwyAPP1ZsW6Y1U8TYSgW5JQ/Lg4Zm+wE35dOGfxKmMbE 4Bt++gn/euyJIF+hlIeN9waXoVUACJp8UqgZTPvCk9AZSC1w1CgPxmlMok+rsoo9dFJ7Qi KdlJ5iANR2pL1MM300G0yRcb/Zz9Y7k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-531-HZxhJxPAMOCh0A5d5gz7jQ-1; Fri, 09 Apr 2021 09:58:55 -0400 X-MC-Unique: HZxhJxPAMOCh0A5d5gz7jQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED06C18B9EC3; Fri, 9 Apr 2021 13:58:53 +0000 (UTC) Received: from x1.localdomain.com (ovpn-113-60.ams2.redhat.com [10.36.113.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6BE85D9E3; Fri, 9 Apr 2021 13:58:52 +0000 (UTC) From: Hans de Goede To: Linus Torvalds Cc: Hans de Goede , Marcel Holtmann , Hui Wang , linux-bluetooth@vger.kernel.org Subject: [PATCH 5.12 regression fix 1/1] Bluetooth: btusb: Revert Fix the autosuspend enable and disable Date: Fri, 9 Apr 2021 15:58:50 +0200 Message-Id: <20210409135850.106730-2-hdegoede@redhat.com> In-Reply-To: <20210409135850.106730-1-hdegoede@redhat.com> References: <20210409135850.106730-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 7bd9fb058d77213130e4b3e594115c028b708e7e. Cc: Hui Wang Fixes: 7bd9fb058d77 ("Bluetooth: btusb: Fix the autosuspend enable and disable") Acked-by: Hui Wang Acked-by: Marcel Holtmann Signed-off-by: Hans de Goede --- drivers/bluetooth/btusb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 52683fd22e05..5cbfbd948f67 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4849,8 +4849,8 @@ static int btusb_probe(struct usb_interface *intf, data->diag = NULL; } - if (!enable_autosuspend) - usb_disable_autosuspend(data->udev); + if (enable_autosuspend) + usb_enable_autosuspend(data->udev); err = hci_register_dev(hdev); if (err < 0) @@ -4910,9 +4910,6 @@ static void btusb_disconnect(struct usb_interface *intf) gpiod_put(data->reset_gpio); hci_free_dev(hdev); - - if (!enable_autosuspend) - usb_enable_autosuspend(data->udev); } #ifdef CONFIG_PM -- 2.30.2