Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6700863ybe; Wed, 18 Sep 2019 07:42:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6wdbgdUix9UgOmR1NhnsU0cubW/dUeJ/IfW0zaMTkz2vIMofHFjzJ6l/tYh/fnSpchb3x X-Received: by 2002:a17:906:af8c:: with SMTP id mj12mr10144758ejb.58.1568817774742; Wed, 18 Sep 2019 07:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568817774; cv=none; d=google.com; s=arc-20160816; b=npmtfP3f9N8cjKsQACASiHIgeWFBtjunio0zS28NHZexTpsYqUlzLIqhUFx4HpSq59 mUUPFO7hQxFUlI7J27q/b2EFM5yuOtoRe1vVFsuGFaUn6EE/UKuXFe0B8gehJPEfdIhx m0fnu36SNTNXQHLI0re31MafJ6TlQ8V4UJsdR/nweoQJ+GgQFo7KPoh0leLtj1E2P9y4 FMYGOvkTSYL6W4LTMFGhH9irQEuzFj8Ut4Bbr5d5MAYxailaM6jthF4EhcYBu9Nq4sVG WajIqsQrH9UXbkfwgewNhQgonwxQqjkkuuXSIixaQgsrHBuprZ0jiXZOQEIHD6LF6MY3 75cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Yl0ybpGmpf31MH2pwpKlUoh1RrXXljAh4K6SdrIk48E=; b=HD0qv6B63ZksLPl3lEJJGBkFQTvAZoZW5AAv80MhSQ40FB/vusZ7hc6Iaub7tgJkoZ dq1VOOn0rOlaBxHqW4N8DdtKJofYIv/y4uXJL/OgIrS7CuVlBB94PHxIznszDt1wgU5A FYefkMBJU3v0XfacZC2eVpjelIHpYOXSOLxjsmUl1E7zxjJcHtEJh5bPbw/Nxm6tEVIA /JwZ6+IBS2Fe+euIMMgrGBMY2obAOCqOr/U1jw6aHz19+7OUPunDHefePK2teSEiU2nY vD4UmqStPmHCvfS7CDnBVdxnbYXInSKHUa+e99vlkBXiT5K9Cjl3iCQFXT9JxHzIygH6 cQNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si3593570edk.115.2019.09.18.07.42.19; Wed, 18 Sep 2019 07:42:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731111AbfIROle (ORCPT + 99 others); Wed, 18 Sep 2019 10:41:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:46290 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730029AbfIROle (ORCPT ); Wed, 18 Sep 2019 10:41:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 98543B76A; Wed, 18 Sep 2019 14:41:30 +0000 (UTC) Message-ID: <1568817684.23075.10.camel@suse.com> Subject: Re: [PATCH 0/2] Reset realtek bluetooth devices during user suspend From: Oliver Neukum To: Abhishek Pandit-Subedi , linux-bluetooth@vger.kernel.org, linux-usb@vger.kernel.org Cc: dianders@chromium.org, Kai-Heng Feng , Alan Stern , Hui Peng , linux-pm@vger.kernel.org, Johan Hedberg , Suzuki K Poulose , Mark Brown , "Rafael J. Wysocki" , Wolfram Sang , linux-kernel@vger.kernel.org, Marcel Holtmann , Len Brown , Mathias Payer , Dmitry Torokhov , Greg Kroah-Hartman , Mans Rullgard , Pavel Machek , YueHaibing Date: Wed, 18 Sep 2019 16:41:24 +0200 In-Reply-To: <20190917212702.35747-1-abhishekpandit@chromium.org> References: <20190917212702.35747-1-abhishekpandit@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Am Dienstag, den 17.09.2019, 14:27 -0700 schrieb Abhishek Pandit- Subedi: > On a Realtek USB bluetooth device, I wanted a simple and consistent way > to put the device in reset during suspend (2 reasons: to save power and The device really uses less power if you reset it before suspendening it? > disable BT as a wakeup source). Resetting it in the suspend callback Then do not enable it. Something is strange. > causes a detach and the resume callback is not called. Hence the changes > in this series to do the reset in suspend_noirq. > > I looked into using PERSIST and reset on resume but those seem mainly > for misbehaving devices that reset themselves. No, not really. It is also for device that need to be reset if you use the RESET_RESUME quirk. But that is on resume(). You could introduce a new flag. But the _noirq method is kind of a hack, as USB really cannot operate without interrupts. Regards Oliver