Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5893027rdb; Thu, 14 Dec 2023 02:44:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNDVw9qIUoK/lVWFQaFtZW9+7SXHgAqd8aWv93kGqLIVTKOrDHYVHXC18oBzHYm+LMt7aj X-Received: by 2002:ad4:5c88:0:b0:67f:1138:65e1 with SMTP id o8-20020ad45c88000000b0067f113865e1mr60406qvh.72.1702550663093; Thu, 14 Dec 2023 02:44:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702550663; cv=none; d=google.com; s=arc-20160816; b=SsdQ6qD4i7QMHV5kBkloZk7vyTApks3A0fdKfChnmcJR64BofAuzMVyyttNWKCWPvc NE0oGTLINjhrVBQms0tUz1SBa0x1ox3G4FwTLoq7TDLXIluRB2JjZ3YVmn0aDaM3tH6Z T7VHYocKtH5P62h/i3nc9kT4iQAY5pRnRZk0L+VlkvyUe+MUGJL3RjQPPZvh9oq5LeA7 N7opdVxg+OzxirLBJrns5jTcaERivLhrBOXuBNC3fY1d7Z5CpoNiuoZKdCoLLRDa/0kq UqecwxlGp5nUzkNq0ZyLT9asyfBLg3SL7Ci32Swj4v0PNkVg6qmfaGbZL1NGDsFljsBj 2VSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=XGGVxyhfo0phA+kVqek2JVB9kp1AJjHPFOd58k8qsZ4=; fh=v4Z3N2Htbr8NtGqMLkQjkIE/EbeUcf6lhEWEAm07n3g=; b=yxhDBNDrYZcCYFT4WHmhoojcD2u58Pjay8T4h/TpEzLjgWuFC6RUFMI4PFK2vkI1R/ OShLAFPPTPNoRmyCpGZXcgG7cK5A6jdeHaUU03ao5SN/ubf4yLHfUr/SKLDHdr7dD6qJ C5LUv1mUfNpiciV2J5PJamM39z8f5yAqelFMtyZpZtmpxN/gw8OIr0ckM+No8I/a1vsc /LplI3TDFYWttewY2/uOz7wAgeFbZrQ1sL7ccdxc6+rBs06Qgs2zemwguWcPn5X6Tl06 wewqHuSkx4gI8AKwQi05yrBT1gT54B5FNKuczvoa7hYWnk146A+q9wCC988QOMwgHcTr sISw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=g0c3TMZc; spf=pass (google.com: domain of linux-bluetooth+bounces-586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d19-20020a0ce453000000b0067f0d76a0ccsi507685qvm.357.2023.12.14.02.44.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 02:44:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=g0c3TMZc; spf=pass (google.com: domain of linux-bluetooth+bounces-586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 32C7D1C21555 for ; Thu, 14 Dec 2023 10:44:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 156A43C471; Thu, 14 Dec 2023 10:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="g0c3TMZc" X-Original-To: linux-bluetooth@vger.kernel.org X-Greylist: delayed 93235 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 14 Dec 2023 02:44:13 PST Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22730BD for ; Thu, 14 Dec 2023 02:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702550651; bh=197OT/NR6dODFsg/RL2+h0idtrOmFpUUcyfHIWUZauI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=g0c3TMZcAShLGfnjcWym/1kMp8SEOshcT06X9HhOwm/y9WRsRhBH/zn/5aUnRhgK2 XpyJdHsSVoa/VXLdMWTH4Hngdit26ePx43eHYAWfYByc+nRle+t1FvECQxv6XnB6a9 05oEBSlm4qAoDDjMYBmQDAuFKhh459gSkSyjzEmiN21u7/Nt/AyYjRXhug+tzYJaT/ FmW7ApaFrTVPgEkeVKouc1O5WvP6kbzLpvEmFytqW32eBFVL0IfV+L1bEkqX4G2H/V QRIDo3QsXzn89Z/VdLrZa9BjQS9S8/jMsEIV83H5kerFc1qSNEfJbfSWApV4l4tLV0 YcArdPAa8xNkw== Received: from [100.72.96.248] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: fdanis) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8FA12378000B; Thu, 14 Dec 2023 10:44:11 +0000 (UTC) Message-ID: <08015729-1917-4d0f-be93-a26b5bd966ed@collabora.com> Date: Thu, 14 Dec 2023 11:44:10 +0100 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH BlueZ] hog-lib: Fix HoG discovering characteristics order Content-Language: en-US To: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org References: <20231213085011.1152912-1-frederic.danis@collabora.com> From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Danis?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Luiz, On 13/12/2023 18:27, Luiz Augusto von Dentz wrote: > Hi Frédéric, > > On Wed, Dec 13, 2023 at 3:50 AM Frédéric Danis > wrote: >> PTS test HOGP/RH/HGRF/BV-01-I fails as inconclusive after waiting for >> second report map read request with message 'Please send ReadRequest to >> read Report Map characteristic with handle = 0x00E7'. >> Handle which has already been read, as it can be seen in btmon traces. >> >> This commit change the recursion order to read instance characteristics >> before recurring to next instances. >> >> Closes: https://github.com/bluez/bluez/issues/657 >> --- >> profiles/input/hog-lib.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c >> index 7ff1ede3d..db62a3c9f 100644 >> --- a/profiles/input/hog-lib.c >> +++ b/profiles/input/hog-lib.c >> @@ -1780,12 +1780,6 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt) >> >> queue_foreach(hog->bas, (void *) bt_bas_attach, gatt); >> >> - for (l = hog->instances; l; l = l->next) { >> - struct bt_hog *instance = l->data; >> - >> - bt_hog_attach(instance, gatt); >> - } >> - >> if (!hog->uhid_created) { >> DBG("HoG discovering characteristics"); >> if (hog->attr) >> @@ -1798,6 +1792,12 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt) >> char_discovered_cb, hog); >> } >> >> + for (l = hog->instances; l; l = l->next) { >> + struct bt_hog *instance = l->data; >> + >> + bt_hog_attach(instance, gatt); >> + } >> + >> if (!hog->uhid_created) >> return true; > While I don't oppose this change, but this seems to be a limitation on > the PTS side which expects a certain order of the operation which > doesn't seem to be a requirement coming from the spec, so perhaps we > should file an issue to PTS. Yes, I opened an issue to PTS. Let's see what they will reply. Regards, Fred -- Frédéric Danis Senior Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, United Kingdom Registered in England & Wales, no. 5513718