Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1167785pxb; Thu, 28 Jan 2021 09:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp3twZ9jCqFbAor/y4v26wtlgzl0ERLmMnSREf7+RaDs6Y7JJQ/se8oK5f3uLFybhNDd4o X-Received: by 2002:a50:8121:: with SMTP id 30mr619625edc.311.1611855007259; Thu, 28 Jan 2021 09:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611855007; cv=none; d=google.com; s=arc-20160816; b=OjObFasu/CZhEXXezgY29Gcq6DLK6Qb1Kq5Cn5U0G6ahcCLD6LIRCelr855qde7u8E n6upsJq7A9pg2JB604TX0ZEIZQdTzXh/+ZrZbyti+KNNGIjVobS5pnW6LTcsbt8juANw b4dVaPEQcmjYmyiUkx6D4QrwSEQBwOrFPBhEat/QPueITnB32kJ0QdYPHZB2D7N/wHbt 4EOC4jtAke7/s/fnjqeQ9QibmGQa4BjAa70465KN3CPF28W3BRXVLGRaaP8bz11xFmu3 RmQY8OGyoGmaDILjNZkcvbeBnUKKdiIVm0UrCiYdKjpZTgb1/F6oqenJw2roNVARy+cL caag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SnPR19/gzlBLotwjYHs/jRrafI6MIgdRvVkQpJz5Kh0=; b=BfHnIB5S96BaN/Uy55amfA0hLX45xWXmebTGHQHP5EzzNCjWejd0KtZWFMx7W/yMUY mXJNAzYIsZkQcWGJPGFUJHBZk8dYOYaO/AsCwrAGWOVMr4lEYkoqNzcGwdM13GITfkdT U/Bu59zntjvDOWjXxJ5jqKUpCkgANg/JXiQ4Sj2hzOsk0MkTH8ZprJHY3lxJQiWAzWS/ SLS4GhUXd9Dh71tgrhZEpf3raAIDensgEhiKupYZjbhrCGT5Vjurhr5JH0KybOwyd2JD RlIiPOW7pcdVqaMTn6Ifa+tvtLJpelrQbtM3gJz7zRQ/NExw4+o/77l8vIXmkFF+CWg9 aSaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Wievzu6b; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a89si3578942ede.326.2021.01.28.09.29.30; Thu, 28 Jan 2021 09:30:07 -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=@chromium.org header.s=google header.b=Wievzu6b; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbhA1R0P (ORCPT + 99 others); Thu, 28 Jan 2021 12:26:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232812AbhA1RY1 (ORCPT ); Thu, 28 Jan 2021 12:24:27 -0500 Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED38FC061573 for ; Thu, 28 Jan 2021 09:23:29 -0800 (PST) Received: by mail-ua1-x932.google.com with SMTP id k22so2233555ual.0 for ; Thu, 28 Jan 2021 09:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SnPR19/gzlBLotwjYHs/jRrafI6MIgdRvVkQpJz5Kh0=; b=Wievzu6ba6wPFgathcUA8CGkMv5S8ztm2WnJlJnUDmKKiuayw/If75tUw+vEayUG7F 2xz0Jz6EI8E/1DGLPGRIPHNq03snTSbFCwimjHUKS0Cc9J8jmjx9aybso5vjI6/e/N6J I0jMF7y6r106+7ese3b4SiICYXoVW+Z1R2sTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SnPR19/gzlBLotwjYHs/jRrafI6MIgdRvVkQpJz5Kh0=; b=n5WqTgdXLpBdzdfILrnBRSH/lRETxQK2JkpNULHhuNg6ctjCMyOvKcXHLMT8aBP6g8 KX9Zesb9yHIPpWjGQmVSxkKr9ByQud3JpAJAllqnvVCI50Ayq1VojsyVIVkq7rH6lG5V +TzhDV8E12pz2dtkDbE1iVrimeHoHJwIvY9V53Lk11r4bvZIG99ZlxsHChwcdZrS/RKa AAr06Lj99dH767+3B8wYjJYlu0xrmhmeT2J7cvUHW2D9vz2elcDMK42zfDYGNZFArgOj WKLbXAADiDKszpdrWgeDqNl1y/6nRFSOIupKsWhsZji3vBVWCXTQY9mhMC6Y/YMs0ma7 lKmg== X-Gm-Message-State: AOAM532ppTUszXW/LB8sGP1LIoLHA60d4uwGharDokVZa5Ve3EoXYRbo KbxDT1fL2I2uowPv+5OVW4bsf1zk+ez+3oDCvXDOhX3b6Bw= X-Received: by 2002:ab0:2052:: with SMTP id g18mr241720ual.60.1611854609091; Thu, 28 Jan 2021 09:23:29 -0800 (PST) MIME-Version: 1.0 References: <20210128163313.426404-1-hdegoede@redhat.com> In-Reply-To: <20210128163313.426404-1-hdegoede@redhat.com> From: Abhishek Pandit-Subedi Date: Thu, 28 Jan 2021 09:23:16 -0800 Message-ID: Subject: Re: [PATCH v2 1/2] Bluetooth: Add new HCI_QUIRK_NO_SUSPEND_NOTIFIER quirk To: Hans de Goede Cc: Marcel Holtmann , Johan Hedberg , Bluez mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi, On Thu, Jan 28, 2021 at 8:34 AM Hans de Goede wrote: > > Some devices, e.g. the RTL8723BS bluetooth part, some USB attached devices, > completely drop from the bus on a system-suspend. These devices will > have their driver unbound and rebound on resume (when the dropping of > the bus gets detected) and will show up as a new HCI after resume. > > These devices do not benefit from the suspend / resume handling work done > by the hci_suspend_notifier. At best this unnecessarily adds some time to > the suspend/resume time. But this may also actually cause problems, if the > code doing the driver unbinding runs after the pm-notifier then the > hci_suspend_notifier code will try to talk to a device which is now in > an uninitialized state. > > This commit adds a new HCI_QUIRK_NO_SUSPEND_NOTIFIER quirk which allows > drivers to opt-out of the hci_suspend_notifier when they know beforehand > that their device will be fully re-initialized / reprobed on resume. > > Cc: Abhishek Pandit-Subedi > Signed-off-by: Hans de Goede > --- This looks good to me. Reviewed-by: Abhishek Pandit-Subedi