Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2015113rwa; Sun, 21 Aug 2022 23:56:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7AwreHUizhrHONqxpOEOPGRrvA7H94oVSPegQQUTxd4eQSAWNst553gqnsPT1Hxrxzy9q0 X-Received: by 2002:a17:902:7247:b0:16e:ecb2:4870 with SMTP id c7-20020a170902724700b0016eecb24870mr19023014pll.110.1661151400159; Sun, 21 Aug 2022 23:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661151400; cv=none; d=google.com; s=arc-20160816; b=YDjuci8rxWEBQLjslfTMZRf5mGsAu/sTO/U0b1tx+6RQN9RV/dcYEOxXDwmuKlQb90 u/l2ekhBNfusqc74oLh21zwFlKK2/51GdvSCyraMK3P2Ni5ngnWxw05GZjk7MesYufe0 5uSa8GwgFKDr2AgkCEAG4bsEE+Gz6U5/PkkdV/xOwndO3YdTVrkcy+nR74uaPO1s0axN omsZf0ifpwHEN87+wI/WNIrYDO/edOFNh+abH2qjCEPGs4yEirhIFT//mLv4hgCtsesk SZA5GxJAsVo/8CWZOa7TRvbmv/3Kkk0FR/c5kVHeK02stVqYPgMEyAiFDbRotupfqjUJ ACcA== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=f4TsP+shQ1wpXqgKxigQatdZkRrc9sm9yW89yFAKI3c=; b=KrqDNGKfyxEmttZd6AsigNdKONpk2ce9EtXShExACnlljZMabSLL2dXjLzHYFzOX4S 3cmFn9vn/GS9Y6S0USTh1rYUpxtFttE0qSvW+PvsXwaStn4s8flej0vFOdvz2I+QkkQD N8QKsQWG71miDXAPNXjvCCzxzRYoDV+2n+oGnCsRHzr5zey6KttCvPEcA/oADIf9evWC tzsXtM5nZtl849kbhI5LiYhFum6wCsGMuGti2TViPiW7R/QX+Sc6DuFHwuHmn99O6/Mv Qk6zcLv2l2TlSwe4cKnNfeAcET7s9fLl30A//k8+xAXPqgHkpUfDuLy/Vash5DYL4nxe dgqQ== 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 l191-20020a6388c8000000b0041a4f693412si10765624pgd.134.2022.08.21.23.56.27; Sun, 21 Aug 2022 23:56:39 -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 S232681AbiHVGzO (ORCPT + 99 others); Mon, 22 Aug 2022 02:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbiHVGzN (ORCPT ); Mon, 22 Aug 2022 02:55:13 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAEF81A38B for ; Sun, 21 Aug 2022 23:55:11 -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) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 5903F61EA192C; Mon, 22 Aug 2022 08:55:10 +0200 (CEST) Message-ID: Date: Mon, 22 Aug 2022 08:55:09 +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 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> Content-Language: en-US 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:49 schrieb Archie Pusaka: > On Mon, 22 Aug 2022 at 14:40, Paul Menzel wrote: >> 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. > > No, the bug report is filed by Vendor testing unreleased devices, so > unfortunately it is not public. Understood. For others to reproduce later on, I think, it’s always good to have some hints, on what to do. Especially with Bluetooth where two devices are involved. Maybe share as much information as you can. (But, it’s also my personal opinion. It’s not required.) >> 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. > > Chromium usually holds the "upstream first" spirit, this patch is no > exception. So, currently it is not battle proven. > Whether accepted or not, we would still merge it to the Chromium tree > though. If required, by that time I can circle back to this patch and > report any future findings. Ah, then I made the wrong assumptions from the address chromeos-bluetooth-upstreaming@chromium.org. Sorry about that, and thank you for clearing that up. I am going to remember that. Kind regards, Paul