Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7267296pxb; Thu, 18 Feb 2021 06:02:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZ9d4ZzV8rX+SJ3kxNUy8DtZE6qAQ7yHef1hvfDCqzo0OYfA1CMU3JbZ3t5kRPbjVhYQXK X-Received: by 2002:a17:906:3f96:: with SMTP id b22mr4067752ejj.478.1613656947977; Thu, 18 Feb 2021 06:02:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613656947; cv=none; d=google.com; s=arc-20160816; b=QT3JW64HCORtgx7GBBAl0BVpryjD+uleRkfao6ab+41ifXOV+xoa6Vzfuu5Jqy1rEU vTdOtrK+Mw358XYzUjMSRZdrPWBrVAFGK/1Bi051b8ZueoJyTIS2oH5BHyp35X30XISq tzTQ2uk0u9ssTR8RrYAp4HdTx1govBl7CozhPEAnjiLH+b/jvv+aP7vk3U8JPlIx61Fr 2c4GZlhhMxC33gm4EIFxfBxd7ETaoDMRVfFhUOPV3Vd7af3vTisFQ9s/ilymDIKt2u2p VyRlnDOxBaOoxHaiFnefhTXKG3SgFjg8u5udURp0g+u7cIyDSZb/6Wq8TR21ew83sBMa d6Cw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Uj3d7AX4kCZzCan+7I9KfL3//X8k0tnB3epM9LTHA88=; b=AkqDEuZqmV7fAi7/97EEApBlcds8eSjWpnw0ILMf/FJ2O0igo5fmCWrvnHnvQREdMf mEFmMhv7DT2OkNlSXTlN7WMSWBzNlMA4qNBNkncwWoHqVQVzE3KYCTA2+YGpkczoPG5s FJV8TNEQpPI/C9+t7NfXN4noSPUesJo9EfyRdeEf+hUkMZa9ckurt/hXdssHFiyMKN1C Xp/TdstqBnjFNBioq2irHgiVnWcWLNDudXwpCGJ8KU9Pq7aXa/pzUNqjWONVVd2/Siq3 VJqIIu1q23jkqXu1TRvbhXbIMmoCraOgi9gAOp+w+GfK7h62Nx9V+5060T4K2P45Q4W9 x9mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SZrp2QII; 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 kt21si728283ejb.84.2021.02.18.06.01.34; Thu, 18 Feb 2021 06:02:27 -0800 (PST) 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=SZrp2QII; 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 S230087AbhBRN74 (ORCPT + 99 others); Thu, 18 Feb 2021 08:59:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60650 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232558AbhBRMjq (ORCPT ); Thu, 18 Feb 2021 07:39:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613651853; 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; bh=Uj3d7AX4kCZzCan+7I9KfL3//X8k0tnB3epM9LTHA88=; b=SZrp2QIIfN7Cz+AXcEVC72Q9xEdIVa2SaxPnetYzWT8Ha/LHgi35QN91FVY/OxEMTdunb8 KcSIy1xkCEIrW1WxUglFNTVEskrgmcX14/Y/oDkAI+2fRWfXg2rVyNStFF/NDlcgKDHWhF zYEhSvDrVqty+X6dLL/J2zgzW58I03k= 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-219-IQiO_pQXP1CxR5FbF86N1A-1; Thu, 18 Feb 2021 07:37:31 -0500 X-MC-Unique: IQiO_pQXP1CxR5FbF86N1A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8219E108C312; Thu, 18 Feb 2021 12:37:30 +0000 (UTC) Received: from x1.localdomain (ovpn-115-22.ams2.redhat.com [10.36.115.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6181060917; Thu, 18 Feb 2021 12:37:29 +0000 (UTC) From: Hans de Goede To: Marcel Holtmann , Johan Hedberg Cc: Hans de Goede , Hui Wang , linux-bluetooth@vger.kernel.org Subject: [PATCH 5.12 regression fix 0/1] Bluetooth: btusb: Revert "Fix the autosuspend enable and disable" Date: Thu, 18 Feb 2021 13:37:27 +0100 Message-Id: <20210218123728.17067-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi All, From the commit msg: """ 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. """ Hui, I guess that what you were seeing is caused by: /lib/udev/hwdb.d/60-autosuspend-chromiumos.hwdb Which enables autosuspend on a bunch of USB devices based on VID:PID, overruling the kernel defaults. This is done to get better power-consumption with devices where it is known that it is safe to do this. I guess that that the device you were testing this with is on that list. So the proper fix would be to edit that file and remove your VID:PID from it. Hui, also next time please try to Cc the original author of the code you are modifying. A simple "git blame drivers/bluetooth/btusb.c" would have found you commit eff2d68ca738 ("Bluetooth: btusb: Add a Kconfig option to enable USB autosuspend by default") and then you could have added me to the Cc and I could have nacked the patch before it got merged. I happen to spot this this time since I was looking into some other btusb issue. But if I had not spotted this, this would have caused a significant power-consumption regression on many laptops. Btusb might not look like a big consumer, but if it does not autosuspend it often is the only USB device not autosuspending, keeping the XHCI controller awake, which in turn is keeping a whole power-plane awake on what once used to be the southbridge. At least on Skylake era hw this could lead to an extra idle powerconsumption of 1W. So a small change can cause a big impact. Regards, Hans