Received: by 10.223.185.111 with SMTP id b44csp995105wrg; Fri, 9 Mar 2018 18:44:24 -0800 (PST) X-Google-Smtp-Source: AG47ELvtfAQaSp8i4kedEEGaGf8J1puKpwMsWWFS4OokbWRl7J6nPI/46yIRFq2I9lhkh5bsHL3N X-Received: by 2002:a17:902:28e3:: with SMTP id f90-v6mr641209plb.355.1520649864103; Fri, 09 Mar 2018 18:44:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520649864; cv=none; d=google.com; s=arc-20160816; b=D7Xh2nKX32nrNG6j6PhNI1pcRXZ8VDc7SLoqx4/0Pgmbb40zyzvwb4m2V2l7ZmJsCG aMqiFrxkjU6xdVOnwauE0+Xq3X/ZZcWkDBuUOdgoWYLhV8rctAUgg9Ujd7YLZ4tqjFHT hfN56RmcQ/2bOLQZD7+6Ar31PtAYbDQCVnM7cBFF86kIP4bWFYTC3a7tCoGGLuW+FF3F k17mw8I2cPJLfm5g+S01IpRs/jcixoPnoBbTGc0dC7+W8XVQnDtrw7nYQYlEmM/pYUOH YnUdFPHeggTYpllzxSYB/QhauqY9WouXqfEmcQGsqhuryqcUevv2ebvH/I8/wv5F+nhO pS6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dkdR2uLogTK8GqEJPW5fYnpHO4i4z0UxHiefOgkqbAE=; b=TYLn0vaizVqN/f5ukValbktRitV/xcjAM7BC11TXE5M9uquMJgXQ886j5AWSbdEF1W MtWsKrwS04JU5gjfrgEp2JQPmQxeDBV5ynmAwjIsxqkA/QvV7jKrUTFejh/OVEHj4aOO zUaf45ijLH2z0xRHWC7y9O3jScc0KbIvNi/1zRTDLNcWch0nLYSYutjCuo+AaRdZUGXi aGkL+0RmranQ9mHIAa7T3QXYhgnt2EG5B0vxwSUvTVoIxv3elROfmCX9Cd7Y1aov1H6r PtcE+h4ncSxu6ob/GTEbBPTrVQna1s+HzPALMSbYvhajmNj0nwQ+Gs5WrxQEuTuuUIu0 6WYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AEkgSEt4; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si1914442pfr.363.2018.03.09.18.44.09; Fri, 09 Mar 2018 18:44:24 -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=@gmail.com header.s=20161025 header.b=AEkgSEt4; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932696AbeCJCmJ (ORCPT + 99 others); Fri, 9 Mar 2018 21:42:09 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:40098 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeCJCmF (ORCPT ); Fri, 9 Mar 2018 21:42:05 -0500 Received: by mail-io0-f194.google.com with SMTP id v6so5607861iog.7; Fri, 09 Mar 2018 18:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dkdR2uLogTK8GqEJPW5fYnpHO4i4z0UxHiefOgkqbAE=; b=AEkgSEt45rjcr+Np3CjO6EsyThUhXXFdd8gxxyA7hOCiQ2N/Sv4WeH70cfLZvD0BbF ocs42li+eRqoV/JvmTJCWTC3tSynEqwN2BilPlLUytY1ekvBfUf8rVJy+X4GAoXNlFSf 9JEVevSGPdDMKwA249DcmvIbtdZM8b9/TzErognkxNk0Z7ubn0HUsQ3cp3fJ3gbm8Dc6 sRvu1+Y7y0zCY9Dtz0HbKy/2qI8Wia0YwmLTh2Q3ALZZUsJn9/5rMsRHtodCRFFDQaxy 3IG39ebgKL/PT8aJ4BorkqCzdYHNsaulbBb3EYdCOo8V+6dBeIStXH8QwH5O7kLYADUV r/ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dkdR2uLogTK8GqEJPW5fYnpHO4i4z0UxHiefOgkqbAE=; b=RLcoQ7x7ED63eHso9TzJtQFnQqDLK+AhdJykTYECeBBhK+TCADgO2NQNaOBQaFrc5m uXrkPtk02AluoXfomd2KNpowyPu+zgKQJHZTnT8iKTpoVO9eNMXj21gbBT/6DkPHPpMS 346TYr+G7N19uJAT7ZsKYAGKI1lzPbt0bHprQjAUIBnquliIYJguWorZoRd9UbmcWEsa Xppzid7ZGXDyLgiC99cSn9p0xJaHAyhzdgg+3rhPIbH7gxNFYVzLFM4RAdBqzFWbeq// 8QnuXN6MFyAEJNoLNsivMzNgejSXDRxrjQdP1dTr0E44Wf1EBgecOONBsy+qtl7xzYax 1Bww== X-Gm-Message-State: AElRT7GAWLHuaChcMcsj4w5rx8egLI6BB7CWlnlt2JQ/iPAbLyU+hCkd 0aXS/S/mhwrBmBJvJI/r9jkDEwsY9zBDXdtDs+8= X-Received: by 10.107.135.207 with SMTP id r76mr684702ioi.248.1520649724495; Fri, 09 Mar 2018 18:42:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.226.12 with HTTP; Fri, 9 Mar 2018 18:42:04 -0800 (PST) In-Reply-To: References: <20180108094416.4789-1-hdegoede@redhat.com> <20180213022455.GA151190@rodete-desktop-imager.corp.google.com> <8cd918fd-bf6f-70ac-e561-e7deffa695f0@redhat.com> <20180216022721.GA69988@rodete-desktop-imager.corp.google.com> <345b0de8-1a23-d2f8-bc56-507eadf7faa7@redhat.com> <6B37F6AC-1103-4FCF-A5DC-4BA236A7B11B@holtmann.org> <1a08612e-2531-3711-ec0f-a867e86d0009@redhat.com> <20180216175955.GA80944@rodete-desktop-imager.corp.google.com> <20180223031216.GA230265@rodete-desktop-imager.corp.google.com> <1711ebe8-8d1a-7d96-bcbe-17238988557a@redhat.com> From: Leif Liddy Date: Sat, 10 Mar 2018 03:42:04 +0100 Message-ID: Subject: Re: [PATCH] Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version To: Hans de Goede Cc: Brian Norris , Marcel Holtmann , "Gustavo F. Padovan" , Johan Hedberg , Bluez mailing list , linux-serial@vger.kernel.org, ACPI Devel Maling List , stable , Matthias Kaehlcke , Daniel Drake , Kai-Heng Feng , Matadeen Mishra , Linux Kernel Mailing List , Greg Kroah-Hartman , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hans, Everything is now working perfectly fine without commit 61f5acea8737. I suspended the laptop for hours at a time, the bluetooth controller comes up fine every time. Whatever the underlying issue was, it's been resolved elsewhere in the kernel. There's no longer any need to implement any sort of RESET_RESUME logic for this device (0cf3:e300). I appreciate all of the work that you and other developers do. Thanks for staying on top of this issue! -Leif On Fri, Mar 9, 2018 at 1:56 AM, Leif Liddy wrote: > Sorry for being a bit slow to respond to this. > > I'm the original author of commit: > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=fd865802c66bc451dc515ed89360f84376ce1a56 > >> Says: "There's been numerous reported instances where BTUSB_QCA_ROME >> bluetooth controllers stop functioning upon resume from suspend." > >> So it may be platform specific but it is not just limited to 1 or >>2 platforms I think. > > This issue might very well be limited to just a few platforms. > Here's a link to the original bug report I submitted. > > https://bugzilla.kernel.org/show_bug.cgi?id=193571 > > There was a number of people who reported they were having similar > issues with various QCA Rome bluetooth devices. > The userspace fix that seemed to work for everyone was resetting the usb device. > > ie > > #!/bin/bash > echo 0 > /sys/bus/usb/devices/1-4/authorized > echo 1 > /sys/bus/usb/devices/1-4/authorized > > or > > #!/usr/bin/python > from usb.core import find as finddev > dev = finddev(idVendor=0x0cf3, idProduct=0xe300) > dev.reset() > > It's difficult to ascertain what the underlying issue was for each > person (and associated device) who commented. I can only speak > authoritatively for my own device. > It's a Samsung ATIV Book 9 12.2 (2015) laptop that contains an > integrated bluetooth controller that's attached to the internal usb > bus. > > # lsusb > Bus 001 Device 005: ID 0cf3:e300 Atheros Communications, Inc. > > After suspending the laptop for an extended length of time (sometimes > it would take an hour or two before issue occurred), and resuming > --the bluetooth controller would not come back on-line. After reading > through various forums, I suspected the issue I was experiencing was > due to the bluetooth device losing it's firmware during suspend. > The original patch I created did fix the issue. (I do realize that > targeting all QCA Rome chipset's was the wrong decision). Hans de > Goede's rewritten version (commit: 61f5acea8737) also worked for my > device. Since, some people think that the underlying issue may been > fixed elsewhere in the kernel. I'm going to remove Hans' commit and > see if the issue persists (with kernel 4.15.6). I'll report back > tomorrow with the results. > > > -Leif > > On Wed, Feb 28, 2018 at 11:54 AM, Hans de Goede wrote: >> Hi, >> >> >> On 27-02-18 15:07, Hans de Goede wrote: >>> >>> Hi, >>> >>> On 27-02-18 03:29, Brian Norris wrote: >>>> >>>> On Thu, Feb 22, 2018 at 11:14 PM, Hans de Goede >>>> wrote: >>>>> >>>>> On 23-02-18 04:12, Brian Norris wrote: >>>>>> >>>>>> Hmm? I'm not sure I completely follow here when you say "he was not >>>>>> hitting the firmware loading race". If things were functioning fine >>>>>> with >>>>>> system suspend (but not with autosuspend), then he's not seeing the >>>>>> controller (quoting commit fd865802c66b) "losing power during suspend". >>>>> >>>>> >>>>> >>>>> He was running a kernel with the original "fd865802c66b Bluetooth: >>>>> btusb: >>>>> fix QCA Rome suspend/resume" commit, which fixes regular suspend for >>>>> devices which are "losing power during suspend", but does nothing for >>>>> runtime-suspend. >>>>> >>>>> He ran tests both with and without runtime-pm enabled with that same >>>>> kernel >>>>> and he needed to disable runtime-pm to get working bluetooth. >>>> >>>> >>>> Did he ever test with commit fd865802c66b reverted? >>>> >>>> My symptoms were exactly the same as you described. BT was broken as >>>> of v4.14 if I had runtime suspend enabled. Things were fine if I >>>> either (a) reverted the patch or (b) disabled runtime suspend. I >>>> obviously preferred (a), which is why I continued to complain :) >>>> >>>> Did your tester ever try (a)? If not, then I don't think you've really >>>> ensured that he really needed a "fixed" version; he may not have >>>> needed the patch at all. >>>> >>>> Or an alternative question: did that system work on an older Fedora >>>> release (and presumably an older kernel)? If so, then he probably also >>>> did not need that patch. >>>> >>>>>> So, that would suggest he could only be seeing the race (as I was), and >>>>>> that his machine does not deserve a RESET_RESUME quirk? >>>>> >>>>> >>>>> >>>>> I hope my above answer helps to clarify why I believe the quirk is >>>>> necessary on his machine. >>>> >>>> >>>> I'm sorry, but no it doesn't. If anything, it suggests to me even more >>>> that it may not have been necessary. >>> >>> >>> Ok, I've started another test-kernel build for the reporter this time >>> without any quirks at all and I've asked him to test. >> >> >> You were right, the Yoga 920 works fine without any quirks, thank you >> for being persistent on getting this tested properly. >> >> I will submit a patch dropping the Yoga 920 from the >> btusb_needs_reset_resume_table. >> >> Regards, >> >> Hans