Received: by 10.223.185.116 with SMTP id b49csp255789wrg; Thu, 8 Mar 2018 16:57:41 -0800 (PST) X-Google-Smtp-Source: AG47ELuyZoLs3KKLBBPifdRhgXNobBa/h9n8lWx9ipnxoy5QVPe1eMkwA9ReTya9wSt2snlsGZoF X-Received: by 10.98.194.219 with SMTP id w88mr28246063pfk.26.1520557061214; Thu, 08 Mar 2018 16:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520557061; cv=none; d=google.com; s=arc-20160816; b=KC6tfiq3sCuBE2DkVTBnS8cKXtbssIV/ipoIFb8Iozfguim8n5o3E0+oj4hoikzS0K UbgALhdqDi5yZRQ8yJ7IUPOx98vSzypJtRaPBUv+MxEfBnhgLEgefwnD4eizMpaOYJpm zwQCIcFDrdPdTZZhO/F+DVwSx+zNuDPEJ/axuqJ+g9rU5gRHQCQ4sEQkd64fzmr3DPtr ZjjhQJUUsctGenUJSzO2Xx9mdESK52oTlLbA/xV5MvuCRVd10AumEGTcnbB74PbqKOqP KfmXFg+g4VqplzWTHEtwHHBvk6BAYmFr7olCKO3aXfQTRMZqzgQFcC5tzH04p5MeuYmc PNvQ== 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=GEX6S1TN2iv1j0eo4hDLFzDsaYxp4KQ2uTgIDR/Aa0c=; b=NThUCfLfLLD+oal6LyzIQIt6RxXpgap9K2059r8XsEvU7jtxz9EVcnhplTxNGb6CxH PLKFCzfQ0RmCaw2X3oPNma3y+a3Wdb0bA10Sx2n8TcKwrR0jr4KM/LEDmppDYJ1uBDum oH5xOwUCftJSknZvWCCg1cfYSlCEjClDw9GHqcNfdMWJ7X1AlXyzG3suBnk0BSaxb25J 0W4djHITaECJQu1Z+axhvr7uwukS3BYPvFIIIcaLGA/gvbNo3UnZn928jPWJZbgy9XIk BQbbwHnXYR5dXDp5Eb7mjoNOxOtsUBK8r/hdpZW7MzzqHkyDMj+MNVlbUywce6k37aEk zA+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jrc5n39q; 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 z62si13840583pgd.688.2018.03.08.16.57.25; Thu, 08 Mar 2018 16:57:41 -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=Jrc5n39q; 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 S932110AbeCIA4b (ORCPT + 99 others); Thu, 8 Mar 2018 19:56:31 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:40407 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932069AbeCIA42 (ORCPT ); Thu, 8 Mar 2018 19:56:28 -0500 Received: by mail-io0-f194.google.com with SMTP id v6so1762820iog.7; Thu, 08 Mar 2018 16:56:27 -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=GEX6S1TN2iv1j0eo4hDLFzDsaYxp4KQ2uTgIDR/Aa0c=; b=Jrc5n39q/yDxGuv3G3lep0g5XjED01a8USU7fESKCJAAJjHXEDntIc7E89Fy5VBINu ai/hTW+10fKBj+wdEHMB6oMZm1JGJWDM6mRPd/K+jtGcJmHuhPXlcsrpuU9/77bEShkx nAU6DCnaBOJxFlY8r1mI5b8sCMQt8P9bYZbg9c5E4hvn5nSRdCIObZ/FnPWodw7GT1FP VGtNjWPggL2tc/qKiLmJAXd7KowoY8JSRVDim6H+bM8TDrxFjdM9BgiWmzV4XpX40mTs ki1Wj7Te4aHfHEUNc4DUw5TJbWPoemBn+a+K0UZfpktd6gnL2Ko5wDGdCuXFzeP8eibh fYcA== 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=GEX6S1TN2iv1j0eo4hDLFzDsaYxp4KQ2uTgIDR/Aa0c=; b=hwx3WACRdmQNygXuqA8tTJ8q+8/k2rSHrlL22qTtpfsnklHgBk+Nsvr/l2WBtqB845 moyyr4zHm6acGvYF/+AVD4BAbN+BL3Q+vzQ3N79bxh1wGG8ABjoQyl8/l14Yy3UrD+/s C2Fj7xhlYxKNpznQnwQuPrsJRiB1UIE1kekqB8u7vehqNwpXF+ZQe5MEH3sPJqy7k5OT ju7eGr1ZWhLPT700lsO7YzZVUJ3cYU+N2Rg3VZ8evNVPsTMpXcrrYK3TcVuHfqZ7nsXn ylv4VKqCYPXUF6nIFF24wTSMIPEJv7cpvHh6x7t4hsxZlyABuvACNivD25k9v+Zy2law MkVA== X-Gm-Message-State: APf1xPC7JDH7N54moGCgOA5G+SAcTo/M84iS2BA6hI/kYCVSsuMVEy8k Ik9lktaZ0WhhLL1E0IdFWRXVfZ1Z2UsOk7aBXCo= X-Received: by 10.107.161.79 with SMTP id k76mr33667716ioe.19.1520556987409; Thu, 08 Mar 2018 16:56:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.226.12 with HTTP; Thu, 8 Mar 2018 16:56:26 -0800 (PST) In-Reply-To: <1711ebe8-8d1a-7d96-bcbe-17238988557a@redhat.com> 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: Fri, 9 Mar 2018 01:56:26 +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 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