Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2446911pxu; Fri, 18 Dec 2020 13:35:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqqbWqwkr81Pu8H5q84AeZ/HUWtpRW/Rrh5BW8BC16RDav/uwRkDsMRaKaZJzj9GRmP6yj X-Received: by 2002:a17:906:1792:: with SMTP id t18mr5897065eje.282.1608327341240; Fri, 18 Dec 2020 13:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608327341; cv=none; d=google.com; s=arc-20160816; b=jFfGolHoSGd3+2cOjL5yOQuWKN8iLm7kx06jNiKLeZ0S5p7icaif+9/iW+A6y8YyPA RbsOMQKbyfQyDpw0flfLUO7Bg1Klm+vDZBVo8DrCQrHdt9NzI0chYltRcQwlgaavqRvE hBlgwcDUnK+t3OTOuAVNBCWYvhkko2jOlx/HBhAtq/W6zAmNmPr7k4JaNdHIJdih2F0X uej3FfzQWUt9iEC7muaf3AyQIlTw98Y3gWFbC6/8SA5+h6jMiYsloERNUzpTgf62Gj0x xSjMSFjTOs1Oi/FYddrOGCzAYtlvMyPTKKhLEDWn8CIaacgm+QfB5tk7lir44kiKyMzf Kpeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=J2CK3uFukdbjk+leVOkugRZmf+80FtcK0nGOlRVvpv0=; b=hV9Ez04cijBd19blxa3Jp6EuvQ+fJtiLl02oC2jqnC19rKdNacAG58V61v4tOBZmcU V+0G2JSV2VaCVKEtX4Mx7al41M+BUaixbr31+86zOpQr8+V3MteuhDSG008LAJEeBuNN bP6n4jNsUDJp5I99eF2Z5cseASu511+aNrpHOmzXmqfoMqJxEtbn9I8mHfo4nHuTRDcA 3058h1og4mEsttd3jHSmQU1dUJaFcC7fUf3CBRjXjdyacrSKqxkq7xR2jLmIeG5XAtHA TJzexhTv8xky8pxs8Jefn19+Kma6tHakvT0BrDPE6wXorPTyC7hG32t0PqFsytY3mY94 gtxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si4976927ejy.455.2020.12.18.13.35.18; Fri, 18 Dec 2020 13:35:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbgLRVcW (ORCPT + 99 others); Fri, 18 Dec 2020 16:32:22 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:50487 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbgLRVcW (ORCPT ); Fri, 18 Dec 2020 16:32:22 -0500 Received: from marcel-macbook.holtmann.net (p4fefcdf9.dip0.t-ipconnect.de [79.239.205.249]) by mail.holtmann.org (Postfix) with ESMTPSA id 248DECED31; Fri, 18 Dec 2020 22:38:57 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: [PATCH] Bluetooth: Pause service discovery for suspend From: Marcel Holtmann In-Reply-To: <20201217150346.1.If6feff48e17a881af9cb55526db7f53bf0db40f1@changeid> Date: Fri, 18 Dec 2020 22:31:39 +0100 Cc: linux-bluetooth , CrosBT Upstreaming , "David S. Miller" , Johan Hedberg , netdev , LKML , Jakub Kicinski , Luiz Augusto von Dentz Content-Transfer-Encoding: 7bit Message-Id: References: <20201217150346.1.If6feff48e17a881af9cb55526db7f53bf0db40f1@changeid> To: Abhishek Pandit-Subedi X-Mailer: Apple Mail (2.3654.40.0.2.32) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Abhishek, > Just like MGMT_OP_START_DISCOVERY, we should reject > MGMT_OP_START_SERVICE_DISCOVERY with MGMT_STATUS_BUSY when we are paused > for suspend. > > Signed-off-by: Abhishek Pandit-Subedi > --- > On ChromeOS, we started getting reports of scanning failing after > resuming from suspend. The root cause was that Start Service Discovery > was being called while discovery was supposed to be paused for suspend > and it was screwing up some internal state. Adding this check > immediately fixed it. > > The fix was tested by doing the following: > * Set Discovery Filter ({'transport': 'auto'}) > * Start Discovery > * Suspend > * Resume > * Check the Discovering property > > Without the fix, this test failed when checking the Discovering > property above. > > net/bluetooth/mgmt.c | 8 ++++++++ > 1 file changed, 8 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel