Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp203281rwl; Wed, 9 Aug 2023 13:15:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDWawpfCHsGVm+c9o1IcHna0m/St1gBGS3s5mci1squdafDAZuJdfaoBSUCKYc3VmhFSuv X-Received: by 2002:a05:6a20:1cf:b0:137:40ba:d91f with SMTP id 15-20020a056a2001cf00b0013740bad91fmr193992pzz.10.1691612104822; Wed, 09 Aug 2023 13:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691612104; cv=none; d=google.com; s=arc-20160816; b=Y+u8O7ym8ZB6cUceJX5VuZDPiZIah68wvI7AEa4KDt22eJq5SGVxkoEO6ilesjy3gw LjLYcoIIflYme2nNbXBZDDAoPu15AIJbTtEDkIz2oytZYQiphbhs4tmTlZrIM7+eQ9Wk nJw9ma6szNKxnOuJRe9tojOdAwgVe8Mk6TO1qp5IgreUiGRY5ZMnQdXrcOxupn891QAw M9NFOTaXi4qnki/d1+7+5xrnAQhRF4H+iDwBmglfL0rIsA88pI8OuHCbAYLExCRxgHNY j9JgE0X6OcFxg7yiVjwgvCJs0ezCpOwcvJMOv5bkG4pfTT9zuAGVW3Cnqa5CJOPf1WpB EgIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=EG5RAg0g2ru7BjKxksjGel0KA2xEoxS3HbUDxCS9Mtc=; fh=V2LL5OuZUBGeSu6TXDWykcThOoazTGUpkln19rrO2KM=; b=WHqqLzDZuYNqkGHylaglqNIROKipPpsHM+eHImZlnIIL2LaC2wUxACn8ggCpjKeL4K DOfHxztfz3a/cw32gdzDnWMgaR7cAIRTsWpvynii3pVGWBVD9hM1MsHW/4+WOLw6ZSSe DTjTVXLCQQ3AlDwh16yPKGDNiJ1aXUgnpDDLm3/2mR3X6JWUcOg1c5JXmOW0yXP1M1ON S/y6bGU2X/ZjUde1b9CYxm7sUn38q0Yfzv8WnWcgphClaCIXa41GZc5OmPqCem/V1qO/ lQ+vEtVrR7KTkNgfF3GXHPMuVK2k/aEkyFf/MroiAaVj7wxI0AiZnJDij3lHZzFqQpjy haWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KCymxo1G; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y187-20020a638ac4000000b0055c79555b90si9885423pgd.333.2023.08.09.13.14.49; Wed, 09 Aug 2023 13:15:04 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KCymxo1G; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231588AbjHITqZ (ORCPT + 99 others); Wed, 9 Aug 2023 15:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbjHITqY (ORCPT ); Wed, 9 Aug 2023 15:46:24 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCFD010DC for ; Wed, 9 Aug 2023 12:46:23 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1bc63ef9959so2136115ad.2 for ; Wed, 09 Aug 2023 12:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691610382; x=1692215182; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=EG5RAg0g2ru7BjKxksjGel0KA2xEoxS3HbUDxCS9Mtc=; b=KCymxo1GcuvsC4ph0v6yylOZqSDxGsJ6WbHA9CvDlZjeLE8Ep16aI/F409iVn4ZE2V geSsaP+aL4LS7H8PGBO2+ReMDD+GWmQAd7/IPuNwlWJzWngc+x1lsbfSm3Sxw2y7u1XH +DyXXWo+sSNP9Z0Z1Ap8YVfaKHPcD4u1MzgeH7XmA7ocTqwgrK/fbTq33uphI+y/ZCj0 3ZWw+fxCVIO9WszVDphR/DXcivUFya09GABWnQwTXc9p5HsTIFtKvFv5SxOIs449Kytl nGj87b6Z+PYmeppOmsQAM7SHkaWtUtHZ5ERjRTIAU51fNCLFwYAG8DCKpUmXmUeIqkLn I/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691610382; x=1692215182; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EG5RAg0g2ru7BjKxksjGel0KA2xEoxS3HbUDxCS9Mtc=; b=QlwUiKPEMWPpB7+RJLw/2liL+rMj2lEl4n90tt5z8exNkJE5/Tj2Eqn9Rk2D3V3jd4 RplcdPka2udwMfZYolVN0g1f79G8+97QeB1ijL+lkd9GDB9Y7kNL44H+xWCkzVgFQkiB /b0bHl3oC8cr3Gq7S1O9e9Zz26ZDlSp8YjY+iEYXG+kPgD5E6KhjilR/XkeztAI1/EE9 nfqFluCHd2lSNKf3BdpzxVFntazeOUMtJkb10htaWoijXC2ck0L0SuW/PvaE+W2qNb1r /mOVG+ngGcWbcKTckHJn42Ji6+lthHjoFHm3UWqjkJcO5zxu2iBCRQYWOCl9XDbpkczT iyrQ== X-Gm-Message-State: AOJu0YzekmPkZWYdZtFaJN5noTuL+egUn+3o8LDNURx/O4gFNYQTOAkl hApSUvi3Zslv3qGircxA3LBJm8T8854= X-Received: by 2002:a17:903:32d2:b0:1b8:2c6f:3248 with SMTP id i18-20020a17090332d200b001b82c6f3248mr121497plr.39.1691610382330; Wed, 09 Aug 2023 12:46:22 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-236-201-58.hsd1.or.comcast.net. [71.236.201.58]) by smtp.gmail.com with ESMTPSA id a4-20020a170902ecc400b001b8b4730355sm11545274plh.287.2023.08.09.12.46.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:46:21 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] device: Fix not probing drivers at startup Date: Wed, 9 Aug 2023 12:46:20 -0700 Message-ID: <20230809194620.1595792-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 From: Luiz Augusto von Dentz Patch 67a26abe53bf ("profile: Add probe_on_discover flag") introduced a regression which prevents drivers to be properly loaded at startup since at that point they are not connected when code shall testing if the devide is temporary instead. --- src/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 19ae03f7d98a..ecd385cf813a 100644 --- a/src/device.c +++ b/src/device.c @@ -3933,10 +3933,10 @@ static bool device_match_profile(struct btd_device *device, if (profile->remote_uuid == NULL) return false; - /* Don't match if device was just discovered (not connected) and the + /* Don't match if device was just discovered, is temporary, and the * profile don't have probe_on_discover flag set. */ - if (!btd_device_is_connected(device) && !profile->probe_on_discover) + if (device->temporary && !profile->probe_on_discover) return false; if (g_slist_find_custom(uuids, profile->remote_uuid, -- 2.41.0