Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1307098pxv; Fri, 23 Jul 2021 05:18:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUFLS8r1TK2NKyMmBTmxoXqV2wEm+dSt8HkJGdBsEdxJENN6d0yyl8Ky6axBSw2Xg9svrB X-Received: by 2002:a17:906:90ca:: with SMTP id v10mr4466085ejw.325.1627042730230; Fri, 23 Jul 2021 05:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627042730; cv=none; d=google.com; s=arc-20160816; b=uI1PpPaMeuUudyZz7vy7WD1b5v0ow8oz85NKDAFkpMScKUibxBYdlF9ESvnYBV3H/I 7GDlmD3iyqf4mkTMbqIOhInPYYbibH+E770u6qMeHmMEd5dL7eCFGO8Yc1DCNWfjT9dq HYIaBFSyUJBVNA7e0CsgtrWhq26ljHzGCSE7vHcA0nJ6Us2lC1N1U+v8teOEmbxROVaG GT0drlh8KUAq6NXiO7wGn6mTMEemnhlDEHf2oOEfGsp7Y9tncKEimvmfxq2csc6GGkIy A/3w6DlLwe1+GzU5LERn2kGajWA7E8r+oeP6zm4b1NqHrh7QBVcXKZSdzFSYiOJa34H4 vpCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=RgZRdYPN13QSyaZUuYcC+UWxsaMPn3NegcHcKxbOu5s=; b=tT8uzRqWsp/Vk+XQvxhOEgNq7xV4Ucc7TtMFRggxaujy4OrFPD8Iuz8DKqvYZOqu8I cs+eE1ZOOTmLhDHaDNP+p7FEy+wrS0TjL8IE08zXD6UzUG4Huj9xTm6bEjtSmf6O1d45 +QX742FXPk9o8fu4tqR44a5o4ZuLgqUbeGkOUA/+XHOwA+BQGs7zsnuJsGHeAVYin+US mlDsvGnCOzvbtsN343R7p1dCn3LuKhqxU/b4Tjl8vmofQOvyOS3kN98//6p1qR0/xc0h Cq3WPjPvAlxAsY8ZejFzwcU4XVe+FjYVdBS+yGBJK9YPJVvPsOdJv+q6grfqk3c9Nr78 gPoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si26454372eds.201.2021.07.23.05.18.25; Fri, 23 Jul 2021 05:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234782AbhGWLgt convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jul 2021 07:36:49 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:33580 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234735AbhGWLgp (ORCPT ); Fri, 23 Jul 2021 07:36:45 -0400 Received: from smtpclient.apple (p5b3d2eb8.dip0.t-ipconnect.de [91.61.46.184]) by mail.holtmann.org (Postfix) with ESMTPSA id 21607CED02; Fri, 23 Jul 2021 14:17:16 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH v2 1/3] Bluetooth: hci_h5: add WAKEUP_DISABLE flag From: Marcel Holtmann In-Reply-To: Date: Fri, 23 Jul 2021 14:17:15 +0200 Cc: linux-bluetooth , CrosBT Upstreaming , Archie Pusaka , Abhishek Pandit-Subedi , Hilda Wu , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20210715225146.v2.1.I68649745bd11a83265f1e816bf34ecc82775e95a@changeid> <57AE120A-78AE-4990-8D7F-BA8D8077B610@holtmann.org> To: Archie Pusaka X-Mailer: Apple Mail (2.3654.100.0.2.22) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Archie, >>> Some RTL chips resets the FW on suspend, so wakeup is disabled on >>> those chips. This patch introduces this WAKEUP_DISABLE flag so that >>> chips that doesn't reset FW on suspend can leave the flag unset and >>> is allowed to wake the host. >>> >>> This patch also left RTL8822 WAKEUP_DISABLE flag unset, therefore >>> allowing it to wake the host, and preventing reprobing on resume. >>> >>> Signed-off-by: Archie Pusaka >>> Reviewed-by: Abhishek Pandit-Subedi >>> Reviewed-by: Hilda Wu >>> >>> --- >>> >>> Changes in v2: >>> * Remove unnecessary variable >>> >>> drivers/bluetooth/hci_h5.c | 83 +++++++++++++++++++++++++++----------- >>> 1 file changed, 59 insertions(+), 24 deletions(-) >> >> so the set does not apply cleanly to bluetooth-next >> >> Applying: Bluetooth: hci_h5: Add runtime suspend >> error: patch failed: drivers/bluetooth/hci_h5.c:11 >> error: drivers/bluetooth/hci_h5.c: patch does not apply > > Hmm, it applies cleanly for me. Not sure what's going on. > Anyway I rebased and made a little change as v3, please take a look! the v3 applied cleanly. >> >> >> And I am really close to not accepting any patches for hci_h5.c anymore. This thing turns into crazy hacking and nobody is taking my hint to redo this as clean H:5 3-Wire serdev standalone driver. > > Pardon my unfamiliarity, but could you share more about your vision of > a clean h5 driver? Should the RTL component be moved out to btrtl? > Do we have something as a reference? so a while back I send a bt3wire.c sample driver around. That would be a good starting point. Anyhow, the problem is that hci_uart.ko is inherent a line discipline driver from 2.4.x kernel days and it has been stacked and hacked on top of it. It has become a burden, especially in the light that you can have clean serdev based drivers now (like btmtkuart.c). And yes, it would be following the 3-Wire H:5 spec and then deal with vendor specific details like btusb.c for example. And my hope would be that especially in the Realtek and Broadcom (RPi3 etc.) cases this can move into vendor specific blocks and shared between USB and UART transports. I also send around a btuart.c sample driver that is solely serdev based and should replace all the cases where we have H:4 as transport. Regards Marcel