Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3132201rdh; Mon, 27 Nov 2023 07:10:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQ3DA2Tru+jifrIlRJtwTCrED7SdWce+vQFDFsRDVIdpXFB5rOPOAxxi8ww8Pp/4l+qQdH X-Received: by 2002:a05:6358:280e:b0:16d:aead:f74f with SMTP id k14-20020a056358280e00b0016daeadf74fmr8030901rwb.13.1701097801669; Mon, 27 Nov 2023 07:10:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701097801; cv=none; d=google.com; s=arc-20160816; b=jX/bydZpgx1kN/+ej1+Or1HXGHOv6mO5tn10G+L6bqGaZWG5H58YoZeOHd71591DnG nVqo5Vwbmsf5u63xgb+YrbckyseBi1eJSrpmRwH/WbAn8bXf4mMg31760olM4BKOPEa4 g51QHJyh2QhmsNJCP0JD+l0gywTytVEeS7COlW9+Z7IOvgI9RyAZOK3r2uzhZKsSoM+r qXj1lgux4FJniLbvtwULSTM0GMNcvkLe+mL/BTR4kxS+p1zEboC+3fmAkMwj03aqVMa1 6tAQW5zVrINrdL4akF6HVZyHTsAPRHFCy+QzVTo1zT8VrqB2q9p4R+9BISuiv9kJ8UJg A3nA== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=4DZi3/gKrmncctcD4iP7upZga4RW9XIFLQD9mo52sYI=; fh=1nUO7lCfj11uyYsxI49pR4EwCOFpxSH00yssLvpDIVQ=; b=CG/WXnQnxXfz/Go/lISs7q1LtNvDHMECW2AqlO9vM/mKFsZWDof/ljs7WAhhde5kml Agjikfs70llJfxrtwHzixzEW4z00lmns9OMUd3IveGlErJGOu3w7JGy5fAt7Iw01BC01 DP3Y+n5V1iwU29m3uCPtkhDNW50J+NWW5pc8Xtwew0IhPKqbilLqxW3GheJmm1/PnLAy rUI70oCkS6Pf5cmnIhx5rWYQj85t2xG7B6iQsgKTpz2K8rKu4CRgUnr4EiCNGpCnygDt PH6bi9J93Jjp1tS6NzJdMymuloltWjJHf94Z59KZdlOblMJrNm/GJKN7ke+7mAj0t/C5 NuQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-238-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ce6-20020a056122410600b004b06c8c3e52si3469798vkb.96.2023.11.27.07.10.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:10:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth+bounces-238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-238-linux.lists.archive=gmail.com@vger.kernel.org" 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 5E8611C209D2 for ; Mon, 27 Nov 2023 15:10:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26FCF31A64; Mon, 27 Nov 2023 15:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C53A5C6; Mon, 27 Nov 2023 07:09:49 -0800 (PST) Received: from [141.14.220.40] (g40.guest.molgen.mpg.de [141.14.220.40]) (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 A356D61E5FE01; Mon, 27 Nov 2023 16:08:58 +0100 (CET) Message-ID: <207e13bb-e0d9-49b6-824f-99a8d0944dff@molgen.mpg.de> Date: Mon, 27 Nov 2023 16:08:58 +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] Bluetooth: hci_sync: fix BR/EDR wakeup bug To: 15013537245@163.com Cc: marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Clancy Shang References: <20231127090545.117162-1-15013537245@163.com> Content-Language: en-US From: Paul Menzel In-Reply-To: <20231127090545.117162-1-15013537245@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Clancy, Thank you for the patch. Am 27.11.23 um 10:05 schrieb 15013537245@163.com: > From: "clancy.shang" It’d be great, if you spelled your name “Clancy Shang”. $ git config --global user.name "Clancy Shang" $ git commit -s --amend --author="Clancy Shang " > Steam deck in suspending state, but bt controller send hci > mode change event to host. cause Steam Deck can't into sleep. Could you please elaborate on the fix little more, for example, mention the mode change (0xf7). > Signed-off-by: clancy.shang > --- > net/bluetooth/hci_sync.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c > index a15ab0b874a9..a26a58cb2c38 100644 > --- a/net/bluetooth/hci_sync.c > +++ b/net/bluetooth/hci_sync.c > @@ -3800,12 +3800,14 @@ static int hci_set_event_mask_sync(struct hci_dev *hdev) > if (lmp_bredr_capable(hdev)) { > events[4] |= 0x01; /* Flow Specification Complete */ > > - /* Don't set Disconnect Complete when suspended as that > - * would wakeup the host when disconnecting due to > - * suspend. > + /* Don't set Disconnect Complete and mode change when > + * suspended as that would wakeup the host when disconnecting > + * due to suspend. > */ > - if (hdev->suspended) > + if (hdev->suspended) { > events[0] &= 0xef; > + events[2] &= 0xf7; > + } > } else { > /* Use a different default for LE-only devices */ > memset(events, 0, sizeof(events)); Kind regards, Paul Menzel