Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2011616rwa; Sun, 21 Aug 2022 23:50:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR48NBLVwmqCGpf4+JWgD3BdaSEgAqtt5/OPf/gi9l1rFaAQsr5BA0R53TT7ldq383lA0jUj X-Received: by 2002:a05:6402:438d:b0:446:a0b4:630d with SMTP id o13-20020a056402438d00b00446a0b4630dmr4622789edc.118.1661151020320; Sun, 21 Aug 2022 23:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661151020; cv=none; d=google.com; s=arc-20160816; b=NGKBUo7wn+0jgdHQuieMqpZPfwlhA3BB+NY1fyE9P9PvALrVhF6medEdg717IOyG1F 0Hy2WX3kcuien/dkmU4+Bpbsrq7/cqHdGx7sxcjS4L+bXo1+AJZz4hW4kLGBcHOwGAqN ft/nkffEiPSzCH0IrGBypUWKwic4Fr38FIz9GC9A6G6GBLp+L5N1jnqnfd9zMbx1qe4o twSzHyqwOuQjYBY3W1HvOXbvoXfDxSPThJlPDAcClPUA4gvx9im2E+WNinBskB1ncR16 HoAfFCRPr/+zzGDuqi5khqCG2nhGW0CQn1UWamRmp0dWbRBTLsT8Z5MNNTGEU4WICOf6 ypmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=8YwP2H3hhi0c0vSlK7v8e1x22ZqI7KU0FFUBC92k72I=; b=me/Dg+COWfN4Qlxcmym0OIygDfUDNqg1RP2M54OkdUOqd07osxVWKjX5aSh2yAfFZA 7jyYMybbejMjVm6ymogu8wxo6hrbUe0diT0PsBIws9oONiMHPBCMVFyHAieHfzkZ6wMV UvUsA39yqwIvxgZyarydet1tY3ySc8DXp9FwWwmNmZwoLAqANlxdvKfc1xoNWvxILwGO iSKhldVjj38ZvkwgEPNWFvJArQvG+CqJ+YCLP9uCkDUeeCmosuhqmeq/sITX8CyuOawI RB/dEPrE6KL/N56OYeydPsZY4TxWH49ZUiZcOQgi06npeOLP5ZOv4yUo9MM48+z0thHs 3Kjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn19-20020a17090794d300b0072a6d845d96si8760996ejc.8.2022.08.21.23.49.47; Sun, 21 Aug 2022 23:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbiHVGkK (ORCPT + 99 others); Mon, 22 Aug 2022 02:40:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbiHVGkK (ORCPT ); Mon, 22 Aug 2022 02:40:10 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAECE167C7 for ; Sun, 21 Aug 2022 23:40:08 -0700 (PDT) Received: from [192.168.0.2] (ip5f5aeccb.dynamic.kabel-deutschland.de [95.90.236.203]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 6B0E861EA192C; Mon, 22 Aug 2022 08:40:07 +0200 (CEST) Message-ID: Date: Mon, 22 Aug 2022 08:40:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [Bluez PATCH] adapter: Reset pending settings when receiving MGMT error Content-Language: en-US To: Archie Pusaka Cc: linux-bluetooth@vger.kernel.org, Luiz Augusto von Dentz , Marcel Holtmann , chromeos-bluetooth-upstreaming@chromium.org, Archie Pusaka , Sonny Sasaka References: <20220822125221.Bluez.1.I541cbea9d6295f531c796bf3bda96b22db76bc19@changeid> From: Paul Menzel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Dear Archie, Am 22.08.22 um 08:33 schrieb Archie Pusaka: > On Mon, 22 Aug 2022 at 14:15, Paul Menzel wrote: >> Am 22.08.22 um 06:53 schrieb Archie Pusaka: >>> From: Archie Pusaka >> >> I think the tag in the email subject needs to be [PATCH BlueZ] to be >> detected by the build bot. > > Is the bot the one who just commented about the test result? If so > probably it can detect this format as well. Yes, I noticed after hitting *Send*. >>> We set the pending settings flag when sending MGMT_SETTING_* >>> commands to the MGMT layer and clear them when receiving success >>> reply, but we don't clear them when receiving error reply. This >>> might cause a setting to be stuck in pending state. >> >> Were you able to reproduce a problem on real hardware? > > I only received some reports, but unfortunately I cannot repro on real > hardware. The symptom is BlueZ can't be turned off, snoop logs shows > that MGMT_OP_SET_POWERED fails to be sent, and we are stuck with it > since the next commands to toggle power are ignored. >> >>> Therefore, also clear the pending flag when receiving error. >>> Furthermore, this patch also postpone setting the pending flag >> >> postpone*s* > > Thanks, will fix. >> >>> until we queue the MGMT command in order to avoid setting it too >>> soon but we return early. >> >> Maybe add a comment, that how you tested this? > > The reporter claims the problem is no longer observable after this > patch. I didn't do any other intelligent way of testing, > unfortunately. Do I also need to document that? Is the bug report public. It’s not a requirement. I just thought, that the Chromium project has a big QA setup, and runs on millions of devices, it’d be good to know, for example, if the patch was battle proven for several months in production or if it’s verified by one person. Kind regards, Paul >> >>> Reviewed-by: Sonny Sasaka >>> >>> --- >>> >>> src/adapter.c | 45 +++++++++++++++++++++++++++++++++++++-------- >>> 1 file changed, 37 insertions(+), 8 deletions(-) >> >> […]