Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5469932rdb; Wed, 13 Dec 2023 09:28:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/v5Xl59CNEY0a/FXvlqtt3D66lcCtvo4LpW0HyLIT8EQtxcrEiD8IKbrZqG0Jd8UjrS/A X-Received: by 2002:a05:622a:118d:b0:423:77e2:6fe3 with SMTP id m13-20020a05622a118d00b0042377e26fe3mr10953933qtk.14.1702488481351; Wed, 13 Dec 2023 09:28:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702488481; cv=none; d=google.com; s=arc-20160816; b=M3efu000AwD0PUJ280+Kj1+NH7uDsuifXT6dZq6WmWmztqRJWJZjPlF3u0nad7QjMz 7Mcc/+jjTrObgg24atkEXHJmiiZ2ohsZFPpEvXqu3eaVqAXiN6hl3a5IEKuRsxjYy/xX +NT4velBeX1HaUeMstPh6z2zvLqgZwcaOI7sSg0UoV8IrX2jCLnE93p/RjlQoEycoWaB onGlf6o4Rl5trSi+Gm6SASjc9Kspb3l60ydLxV7kXrAWzq9QkE2Swe5TdCBUo0UpTeNn lsQOTfqvzj/Xf8FjzcnIIXQVgyg5UPov5ifDMQ84EfGC3jxuq5UbeBZ6lTm6WHxjHq74 yfVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=jekjRedosn0K6wXEhT0sK4bryG2cjli8f9x/8clxpHE=; fh=ImHaVp9LKIGjD0tRyxgUyPXd5WNSYdKgZ1TGxuDzvzM=; b=UAkIKhe50iCuJEF/Zk574KwsKDBXDIWBDxgSr+R+Zzn7qdEJiIgFjoGpI6NzTUbMnZ 7dWpY8oON2zvMJ2NFul3MK3a0hv988wxz4NsHhKFeHiOEMo58QKCnpw5Ar+ZYoE5G26p ey6V/BWKa810s++W9Q1EsiAj3B+u7ITvNTXmmu0cdhT4AOP7oW36ZFloeylZ91Fx4Hx5 RNo+HROANKoCRZpV3H5WuGMBu5PF97cblIAEd+/wfxoGM5TQTXpioXCTXyropZWiCpTJ GLz+QLOH/+ZYxC5z4a6AvuanezXc3Sk+zW1TnEIiwBU1UpfWb1hSWk8zqbIelBHX9Ylh YKsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m8G0B47A; spf=pass (google.com: domain of linux-bluetooth+bounces-580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 kf21-20020a05622a2a9500b00423dfae3022si11990244qtb.806.2023.12.13.09.28.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:28:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-580-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=@gmail.com header.s=20230601 header.b=m8G0B47A; spf=pass (google.com: domain of linux-bluetooth+bounces-580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 E1EE61C21108 for ; Wed, 13 Dec 2023 17:28:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A61856B7A; Wed, 13 Dec 2023 17:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m8G0B47A" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BDBBC9 for ; Wed, 13 Dec 2023 09:27:52 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2cc3602ae44so14093551fa.2 for ; Wed, 13 Dec 2023 09:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702488470; x=1703093270; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jekjRedosn0K6wXEhT0sK4bryG2cjli8f9x/8clxpHE=; b=m8G0B47AplkpDVUAqCrlJH9b7LKOeU3gHVLWvYIES+RnVayAVEt7fMWb16XRnc5IXV BG85WEQ4GGOelaWf7kx3ziAfmlc3s7+t4dZDeNKKDZ0STENiOxUGnhOW06qLccd7zkL6 NOiKEyVUzwfmj52pAqKfnz390IkK3RLF0j61UEXPVuUjTImJqzOB1MHihAeikhZ4C5l9 PPBL4j31cfFeMk0qKp7c+ZLPMk+XNf7qSS0+dzUcicaJJLPJsSYUvp+9cAvcbqYrZtQh rgafPTZJpHUHBAeY9ASFgomc+XMkx8/8RW61m/+/tdpRIzilvV6jADu6RkI40vMLZncv YbsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702488470; x=1703093270; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jekjRedosn0K6wXEhT0sK4bryG2cjli8f9x/8clxpHE=; b=dbs3r6yR2Iup4siiwvl7sZfFm+DBq5pgjRcSbTLUpOSogjQuwuDlvZ/fBhxr7RVj44 2nuga/MVFDbY5SJmaGM7BGEi7VBLmIU5F9Me6v7mnZCohGiyw/FzTJX10A5hc1Wa2ll4 +tuqi2PDRXQPqG3I2VXCUrVOA4IISFy64MZ+zzzrlhRL1A+YYV0NF7K5E/LbZpDH2rR2 /rGF89CYFKTE1LMc727JRy50vBSsf0AGTyldW7A6J22Xnx7MmvxYchow8iia9e8q98YK +VeSSZZWOCac0LdYRTnCzDxO4pL4WUkMx+VbJ/2PIkLTF2cunG5DkegSRoi3j9wfZkqv hHug== X-Gm-Message-State: AOJu0Yz1qwnwWkfxfVZGSqTwagl6TnE2pqpmbqI4AfqhrhabumxXuS5H kwHm5w5n2OW8wb7zNOVuMYPxHmbXHguWcrmIFVG1ji9N X-Received: by 2002:a2e:a103:0:b0:2cc:1c8a:466a with SMTP id s3-20020a2ea103000000b002cc1c8a466amr5022609ljl.13.1702488470103; Wed, 13 Dec 2023 09:27:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231213085011.1152912-1-frederic.danis@collabora.com> In-Reply-To: <20231213085011.1152912-1-frederic.danis@collabora.com> From: Luiz Augusto von Dentz Date: Wed, 13 Dec 2023 12:27:37 -0500 Message-ID: Subject: Re: [PATCH BlueZ] hog-lib: Fix HoG discovering characteristics order To: =?UTF-8?B?RnLDqWTDqXJpYyBEYW5pcw==?= Cc: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Fr=C3=A9d=C3=A9ric, On Wed, Dec 13, 2023 at 3:50=E2=80=AFAM Fr=C3=A9d=C3=A9ric 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 =3D 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 =3D hog->instances; l; l =3D l->next) { > - struct bt_hog *instance =3D 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 =3D hog->instances; l; l =3D l->next) { > + struct bt_hog *instance =3D 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. > -- > 2.34.1 > > --=20 Luiz Augusto von Dentz