Received: by 10.223.185.116 with SMTP id b49csp1004994wrg; Fri, 16 Feb 2018 10:39:31 -0800 (PST) X-Google-Smtp-Source: AH8x224r8OWBnKFLjdVYGs7o1NmJqoEPehyD+zHlmQL5ZiizIVoiGEI55s3XRXJ5YsLsXrDqi1fi X-Received: by 10.99.96.66 with SMTP id u63mr5988656pgb.49.1518806370888; Fri, 16 Feb 2018 10:39:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518806370; cv=none; d=google.com; s=arc-20160816; b=OO2uLJBjXG+MkBS3rkWPUf41bbM6PjT7vQeBd3tor+LVl/bC69TQQDuoCbzXi3xcb1 f37uhQoVBR9qSzZVPcf0IkcKcmWIltoiDPlNNC8wUvQvNRKWHXno+hsbghfopQhBnF86 PdyHu3XiGXvp4+r3/rNMI9puTRGQoKkmVLbyPoh1vPfH3Cvd1ZNc7oBuvTapo9RBYZdX DHj4U9KhvYJ4MjnOOjRAI4S8dHQzTL+/kL/7FXFnQD9xT4POhNG/lWyUGyjVJW4MyWx2 V8Ig86SVqlq9bWLgADt48WqJcrwhxtxiVeLQuaHUBJJ51eh9QXkN+fveTs1OaK4Ce7eH yI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=MIFEBg2vagwouimcD++4GfjmaNYKELgdeoRNRWROh0c=; b=sivNsldw6Vx4Xn38DPzeIAV6uBo+NsSKE3Snn4sMX5iKtYKDstKIbDxwQS1YgvjeD7 NAfeaYjtCeqNzKEtGGhZBjoWC3TuyhncXHpYYxmyCgMBwJXaq2DPZ9UswCHzQA3J9XNP PMDR8cP03hgrwlE2j+GFEcXG/iMZZjEyjbgWXtSb2D8EHFyyjX3ZEull62wZlYZYil5S 7YwiMSPkfD+lGg9mYekW2xF7VS/9q3nrrapb2ZwMX8rbLoaV7zSRsejNLMENHrF6GN3F lb3+c1TXVQJN9BYPBOzCMgzEszgOaVqNRF/hk0epGmiPNWt5/l47O/0fDbZyVntZahHS G20A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JbzxFCCp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id v1si7998889pfg.288.2018.02.16.10.39.16; Fri, 16 Feb 2018 10:39:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JbzxFCCp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1757245AbeBPC1c (ORCPT + 99 others); Thu, 15 Feb 2018 21:27:32 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44684 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757233AbeBPC11 (ORCPT ); Thu, 15 Feb 2018 21:27:27 -0500 Received: by mail-pg0-f67.google.com with SMTP id j9so1318422pgp.11 for ; Thu, 15 Feb 2018 18:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MIFEBg2vagwouimcD++4GfjmaNYKELgdeoRNRWROh0c=; b=JbzxFCCpJEqdKxJmP1mi/JKqr3qFd7UXegJoeuxw0GhH1f17kWUl2YD/QJO8xoMqru /ZebgOSOfADUngy6yPUk25oRBcPfsxiT0n8FjRuZtAhwgdxFwguzd0m/tf2XoTGw9HiI a7MNi6X1gNSehKysgTTJO1TOBuz0k6XKgTFUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MIFEBg2vagwouimcD++4GfjmaNYKELgdeoRNRWROh0c=; b=rKik9i2d680SxdN3MaQEm7EXlOAQwIZIr6VA68h4mk8fJporTPraXh8auU/q3k38g2 B8DZriJcWqdSgk+RIuQj396BDg9y/hg6TrzkTao9OcOlxHMBEwe3acYkatUreTdp+cLB EZg2OmNiOIS4muE4+gkEVwFEgoxcy8J2yTLjqDRpz2GHjD+rjIK5jLf3Sk2ksxMCcwZD aO2d1zWqIGTATK6PztMkJtow7ZRHorDmZP2tyKcVKEP+VswivSdz1Eu2gmKVRvEc162W rkFNHwkb7kO4IDqgA4NXJmMnIjJKWMxjGPkIqXhSW/eH3NbWLt/J4orfonz9GHmuKFVN ASFg== X-Gm-Message-State: APf1xPB+FGnRxzkWZvcMhiW/QHnUzXKPQjYs033Sf1KNroN16l1NGgUn 0Mc4zvZBEP1+S1dLuuZgPWdkAQ== X-Received: by 10.98.64.9 with SMTP id n9mr4584004pfa.194.1518748046511; Thu, 15 Feb 2018 18:27:26 -0800 (PST) Received: from rodete-desktop-imager.corp.google.com ([2620:0:1000:1501:da1a:a5c1:68e:d948]) by smtp.gmail.com with ESMTPSA id l19sm27589999pgc.47.2018.02.15.18.27.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 18:27:25 -0800 (PST) Date: Thu, 15 Feb 2018 18:27:23 -0800 From: Brian Norris To: Hans de Goede Cc: Marcel Holtmann , Gustavo Padovan , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org, stable@vger.kernel.org, Leif Liddy , Matthias Kaehlcke , Daniel Drake , Kai-Heng Feng , matadeen@qti.qualcomm.com, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Guenter Roeck Subject: Re: [PATCH] Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version Message-ID: <20180216022721.GA69988@rodete-desktop-imager.corp.google.com> References: <20180108094416.4789-1-hdegoede@redhat.com> <20180213022455.GA151190@rodete-desktop-imager.corp.google.com> <8cd918fd-bf6f-70ac-e561-e7deffa695f0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cd918fd-bf6f-70ac-e561-e7deffa695f0@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, On Tue, Feb 13, 2018 at 12:25:55PM +0100, Hans de Goede wrote: > On 13-02-18 03:24, Brian Norris wrote: > > On Mon, Jan 08, 2018 at 10:44:16AM +0100, Hans de Goede wrote: > > > Commit 7d06d5895c15 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"") > > > removed the setting of the BTUSB_RESET_RESUME quirk for QCA Rome devices, > > > instead favoring adding USB_QUIRK_RESET_RESUME quirks in usb/core/quirks.c. > > > > > > This was done because the DIY BTUSB_RESET_RESUME reset-resume handling > > > has several issues (see the original commit message). An added advantage > > > of moving over to the USB-core reset-resume handling is that it also > > > disables autosuspend for these devices, which is similarly broken on these. > > > > Wait, is autosuspend actually broken for all QCA Rome chipsets? I don't > > think so -- I'm using one now. > > And have you manually enabled USB autosuspend for it, or are you > running something which might have done so, e.g. powertop --auto-tune ? > > Because if you did not do that then you're already not using autosuspend > for your QCA devices and this patch will change nothing. I use a set of udev rules that manually whitelist devices for autosuspend. You can see it here: https://chromium.googlesource.com/chromiumos/platform2/+/43728a93f6de137006c6b92fbb2a7cc4f353c9bf/power_manager/udev/gen_autosuspend_rules.py#83 You'll find at least one Rome chip in there. > > Thus, this is a poor solution, which > > negatively affects my systems. However, I see that this patch was > > applied regardless... > > Note that there already is a quirk to handle broken suspend/resume > behavior on ALL QCA devices in older kernels. Also note that the Yes, and the quirk was broken, and I made sure it got reverted when it broke my devices ;) > patches series which this commit builds on top of was already > setting USB_QUIRK_RESET_RESUME for some devices in > usb/core/quirks.c. > > All my commit does is instead of duplicating all the QCA USB-ids in > usb/core/quirks.c, move the setting of USB_QUIRK_RESET_RESUME > to btusb.c so that we don't need to duplicate the USB-id tables. I was slightly more OK with marking specific IDs as broken, because those IDs didn't happen to be ones that I knew were currently working. Now you're breaking my systems again. But this time, it's more subtle because bluetooth will still work, but we just suck more power leaving our USB port active all the time. > The result of the combination of these patches is that the custom > DIY reset on resume handling btusb.c was doing is now replaced > by setting the standard USB-core USB_QUIRK_RESET_RESUME quirk. > > As a (desirable) side effect this also disables USB autosuspend > for QCA devices since the USB-core does not allow USB autosuspend > on devices with the USB_QUIRK_RESET_RESUME quirk. Testing has shown > this to be necessary on at least some QCA devices and given that > these devices tend to loose there firmware on a suspend, it seems > sensible to not allow autosuspend on them. But you're not accurately targeting the "some". AFAICT, you're wasting power on my system. > > What justifications was found for this anyway? AIUI, this is a platform > > bug, and not entirely a chipset bug. > > No this is believed to be a chipset issue, hence also the quirk in > older kernels to always reset these devices after a normal suspend/resume. I have Qualcomm telling me this is a platform issue. I haven't noticed problems with autosuspend nor system suspend/resume on my platform. Do you have any more detail on this issue? Have you consulsted QCA folks? Unfortunately, Greg is already queueing this patch up to all the -stable trees, so I'm going to have to revert it yet again in Chromium kernels... Brian